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 !
Bookmarks