A cornerstone of any development is the development environment you’re working in. If you’re plumbing you don’t just walk in and start twisting pipes together with your hands - you’ve got a tool belt and box and more stuff in the truck. So a big step on the learning Ruby project has been to figure out what that’s going to be.

Eclipse logo

Started first by looking online. Some things here and here lead me to believe it’s going to be jEdit with it’s Ruby plugin or Eclipse with RadRails. I’ve used Eclipse before with a colleague when we were learning Java, and in spite of that experience it looked like that was the one to try first. Here’s what it took to get running on Ubuntu Feisty desktop 7.04

sudo apt-get eclipse

Okay so it ran right off the bat, but RadRails requires the Sun jdk 1.5 or higher and Eclipse comes out of the box with only java-1.4.2-gcj-4.1-1.4.2.0. (Can you say out of the box with an apt-get package?) So the next thing to do is grab and configure that jdk in Eclipse.

sudo apt-get install sun-java6-jre
sudo nano /etc/eclipse/java_home

In that file the line /usr/lib/jvm/java-6-sun was added to the front of the list. After restarting Eclipse the “Help -> About Eclipse SDK -> Configuration Details” contains the line “java.home=/usr/lib/jvm/java-6-sun-1.6.0.00/jre”.

So… The next steps are to install Aptana and install RadRails! I won’t repeat the steps - if you follow the links they’re plenty clear enough.

Now the big question - did it work? To find out, you’d turn to Eclipse:

  • Use “File -> New -> Other…” and choose a Rails Project.
  • Give it a name like “stuff” and click Finish.
  • Use “Window -> Open Perspective -> Other…” and choose Rails.
  • In the Servers tab at the bottom, select stuffServer and click the Start play-button.

You’ll see the following in the Console tab’s output:

=> Booting WEBrick...
=> Rails application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2007-06-05 13:36:16] INFO WEBrick 1.3.1
[2007-06-05 13:36:16] INFO ruby 1.8.5 (2006-08-25) [i486-linux]
[2007-06-05 13:36:16] INFO WEBrick::HTTPServer#start: pid=1187 port=3000

Point your browser at localhost:3000 and you’re riding the rails again. w00t.

Actually - after using the Eclipse RadRails for a bit I’m not feeling the love. It seems more like the “stuff in the truck” solution than the “toolbelt” solution. There seems to be a lot of things it can do and none of them appear obvious. I was able to get breakpoints and variable inspection working (which I consider a critical milestone with any environment where you’ll be doing non-trivial work) but I have to say I’d probably prefer something that feels leaner. Or at least less forced together.

2 Responses to “Looking for efficient Rails environment”

Jamie Thingelstad

June 5th, 2007 - 1:52 pm

1. Boot up your Mac

2. Install and run Textmate

Light.

Louis

June 5th, 2007 - 2:17 pm

Yeah…

Leave a Reply

Note: This post is over a year old. You may want to check later in this blog to see if there is new information relevant to your comment.