Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old June 9th, 2007   #1
Eric_Jardas
5 Cups of Ubuntu
 
Eric_Jardas's Avatar
 
Join Date: Jun 2007
Location: Rijeka, Croatia
Beans: 30
Ubuntu 7.04 Feisty Fawn
Post HOWTO: add support for .rhtml, .html.erb, .rjs, .rxml, .builder

After you installed Ruby on Rails its time to add support for it's extensions.

1. First we need to add new extensions to file mime.types located in /etc folder.

1.1 Lets do that. We have to add new extensions at the end of mime.types file. We'll do that with the following command:
Code:
echo -e "text/x-ruby-source                    rhtml html.erb \ntext/x-eruby                    rjs \napplication/xml                    rxml builder"  | sudo tee -a /etc/mime.types
1.2 Now we have to update mime-types so our new extensions get loaded with:
Code:
sudo update-mime-database /usr/share/mime
2. Now it's time to download files.tar.gz from attachment

2.1 Unpack it with command:
Code:
 tar -xzvf files.tar.gz
2.2 Now we have to copy .xml file to /usr/share/mime/package:
Code:
sudo cp x-rhtml.xml /usr/share/mime/packages
2.3 And .lang files to /usr/share/gtksourceview-1.0/language-specs:
Code:
sudo cp *.lang /usr/share/gtksourceview-1.0/language-specs
And we are done ! Now editors like gedit can recognize rails extensions and you have syntax coloring for them !

Enjoy !
Attached Files
File Type: gz files.tar.gz (3.3 KB, 207 views)
__________________
Constructive lurker

Last edited by Eric_Jardas; June 10th, 2007 at 04:26 AM.. Reason: typo
Eric_Jardas is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:37 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry