In about 4 days a long awaited version of Ubuntu will be released. I'm not one of those who can just sit and wait for the final release, thus I've been already using Gutsy for a few weeks now.
The most visible changes include compiz turned on by default on capable hardware (that means intel-based cards and some of the ATI cards) and can be easily turned on on hardware that needs proprietary drivers (ie. AMD/NVidia and most ATI cards). Spotlight fans will be pleased to see tracker installed by default and deskbar on their top panels. Network manager got some love too, and now should work for many more users and be able to talk to a wider range of hardware.
The bad news is that deskbar has undergone a total GUI redesign, which turned out to be a big mistake - most people just hated it. Fortunately the maintainer of the app reacted quickly enough to get lots of bug fixes to Ubuntu's repos on time, so that deskbar is usable again (but it's still far from what it used to be). Another slight disappointment is the kernel version - Ubuntu got stuck with 2.6.22 (which is known to cause many problems) as 2.6.23 didn't make it before kernel freeze.
As a big rails fan I'm very excited about new gtksourceview, which supports context-aware syntax highlighting. That means we'll finally get properly colored Ruby syntax within erb blocks in gedit/scribes! But.. it's too good to work out of box, so you'll need some tweaking. I know there are some HowTos out there, but none of them "just worked" for me, so ... here's what I did.
Associate files with geditFirst of all check if you have a file called Override.xml in your ~/.local/share/mime/packages directory. If you do see if it has definition for x-extension-rhtml file inside - if you don't know how to speak XML just see if the "x-extension-rhtml" phrase exists somewhere in the file. If it does, delete the section containing the definition or, if you don't know how to properly edit XML file, just delete the whole Override.xml file. This is what took me about an hour to figure out as it overrides system-wide .rhtml definition and caused my system not to recognize rhtml files properly.
Now we need to teach gnome to recognize .rhtml files and give them their own mime-type. First, download the
file with mime-type definitions for rails files. and copy it to /usr/share/mime/packages directory.
Then, as root, you'll need to update mime database. To do so, just use this command:
$ sudo update-mime-database /usr/share/mime
Now your Gnome should be able to recognize .rhtml files as text/rhtml mime-type. Now just right click on an .rhtml file, choose "Open with..." and use gedit/scribes to open the file. Nautilus should remember you want your favorite editor to open these files so from now on you can just double-click on a file to open it.
Context-aware syntax highlightingGtksourceview doesn't include definitions for rhtml files by default, so I've had to write them by hand. Here's the
lang definition for RHTML files. Just download it and copy to /usr/share/gtksourceview-2.0/language-specs/ directory and restart gedit/scribes. And enjoy.
Code snippetsEveryone just loves code snippets, and now you can define a set of snippets specifically for RHTML files as it has it's own mime-type now! For some of you who are as lazy as I am, I've posted my
code snippets for rhtml files. They aren't perfect, but I haven't had much time to work on them. Anyways I hope you'll find it useful. If you'd like to share your own snippets with others email me at robert_at_aenima_dot_pl and I'll post them here.
Other useful pluginsThere are some plugins for gedit that can make your life easier. One of them is
SnapOpen - it lets you quickly find a file in application's directory tree. Another plugin I use is Rails Hotkeys, which you can get from SVN by typing:
svn co http://svn.simplesideias.com.br/general/gedit/plugins/rails_hotkeys/
in the command line. Some people may find
Class Browser plugin useful. It's pretty neat, but still very buggy. And of course I recommend to use the terminal plugin bundled with gedit.
Other resources (added 2008-09-29)LT has created a nice cheat sheet for snippets for gedit available at
http://www.scribd.com/doc/6299312/Gedit-Cheat-Sheet-for-Rails-Development (post in Spanish:
http://lt1982.blogspot.com/2008/09/gedit-cheat-sheet-para-ruby-on-rails.html). Thanks!