Tools for Rails Development on Linux

Hello again! Lately I’ve been learning to use the Ruby language as well as the Rails framework for building web apps. Ruby/Rails are a lot of fun, as are the tools I’ve been using throughout my projects. I’d like to share a few of these tools/tips.

For Rails work, either a simple text editor or a full-blown IDE will do. I’m usually doing something in between. I noticed all over the web in photos and screencasts that many who work on Rails use a Mac-only text editor called TextMate. TextMate seems like a great app–and it’s also enormously popular for that–but I’m just fine using gEdit, the GNOME text editor. That is, after a little tweaking. If you’re able to use gEdit (and that’s anybody now that there are Windows and Mac binaries), try these out:

gEdit Tweaks/Plugins

  • You might want to start by getting all the low-hanging fruit out of the way, like Line Numbering and the dark theme. Context coloring of code will happen on its own when you open/edit a file with the proper extension. Don’t forget about Find & Replace right on your main toolbar.
  • The default set of plugins that come with gEdit are a great start for making the editor work harder for you. Among these defaults (toggled in the Preferences > Plugins menu) are External Tools, which adds to your standard Tools menu, allowing the user to pipe output to a shell command or script, as well as the “Open a Terminal Here” feature and so on. This tool is easily extensible by you.
  • A very essential default plugin is the File Browser panel. When you enable it in the plugins menu and make the left panel visible, this makes navigating the file tree of your Rails project effortless. This tool is huge for productivity. I also think having the file browser open at the left provides a very useful mental reference as you move through your Rails project and focus on making adjustments in the Model, View, Controller framework. The ubiquitous TextMate also offers the same.
  • The Indent tool allows you to quickly indent/un-indent lines of code with either <Ctrl>T  or  <Ctrl><Shift>T. Quite useful.
  • Another tweak that adds TextMate-like functionality is the Snippets plugin. After entering a short tag you specify and using Tab completion (like bash tab-completion), gEdit will insert lines of code you often enter, saving you time and your hands the typing. Even higher productivity, less carpal tunnel.
  • Session Saver helps you be more productive and efficient in editing your Rails project, by saving all open files as a session. You can even name the sessions and keep track of many, as your workload increases.
  • And finally, the indispensable Terminal. This tool sits at the bottom of your gEdit window, completing your Ruby on Rails work environment. The terminal is great for running Ruby scripts, generating app components, debugging, and starting the application server–all without moving away from the file tree on your left and any open text files.

You will find all of the plugins I mentioned in gEdit by default, or with the addition of the “gedit-plugins” package from the repositories.

Firefox Add-Ons

Of course, no web developer’s arsenal would be complete without a few very effective Firefox Add-ons. Here’s what I’m using…

  • Firebug (but you probably have this already) to edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. ‘Right-click > Inspect Element’ is probably the fastest way to find out what I’m working with in unfamiliar code.
  • YSlow for diagnosing performance problems in your web apps. Note that this requires the Firebug Add-on.
  • SQLite Manager for working with the SQLite databases created and used by my Rails apps. This is an excellent tool for quickly examining data you are working with on pages in your browser. You can view and update records in a snap with the SQLite Manager.
  • Screengrab lets you take screen shots of entire web pages or just a certain section, and save it to a file or your clipboard. This is nice for storing and sharing a snapshot of your Rails App, without worrying about cutting off the bottom as with a regular screenshot.

I hope you find some or all of these tools to be helpful in your Ruby on Rails development. They only add to the fun and ease of use that Rails provides. If you have any questions or something to add, please leave a comment or use other methods. Good luck!

About these ads

2 responses to “Tools for Rails Development on Linux

  1. Nice work, I didn’t realise gEdit could do all of this. Vi is also a good choice ;) I develop on osx myself and find very little friction in setting up and getting everything going.

  2. Thanks! I had forgotten gEdit was so extensible until I built it out for my Rails purposes. Vi is my one and only editor for HTML/CSS! I’ve picked up some extra packages that make Rails editing in Vi even better. Glad to hear you don’t use emacs :-P hehe

    Lately, working with Ruby/Rails has got me thinking about buying a MacBook again. I think it’d be a nice platform for working with web apps in general.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s