Eric_Jardas
June 9th, 2007, 07:00 PM
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:
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:
sudo update-mime-database /usr/share/mime2. Now it's time to download files.tar.gz (http://ubuntuforums.org/attachment.php?attachmentid=34843&stc=1&d=1181429596) from attachment
2.1 Unpack it with command:
tar -xzvf files.tar.gz 2.2 Now we have to copy .xml file to /usr/share/mime/package:
sudo cp x-rhtml.xml /usr/share/mime/packages 2.3 And .lang files to /usr/share/gtksourceview-1.0/language-specs:
sudo cp *.lang /usr/share/gtksourceview-1.0/language-specsAnd we are done ! Now editors like gedit can recognize rails extensions and you have syntax coloring for them !
Enjoy !
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:
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:
sudo update-mime-database /usr/share/mime2. Now it's time to download files.tar.gz (http://ubuntuforums.org/attachment.php?attachmentid=34843&stc=1&d=1181429596) from attachment
2.1 Unpack it with command:
tar -xzvf files.tar.gz 2.2 Now we have to copy .xml file to /usr/share/mime/package:
sudo cp x-rhtml.xml /usr/share/mime/packages 2.3 And .lang files to /usr/share/gtksourceview-1.0/language-specs:
sudo cp *.lang /usr/share/gtksourceview-1.0/language-specsAnd we are done ! Now editors like gedit can recognize rails extensions and you have syntax coloring for them !
Enjoy !