Topic: Any good Aptana Studio 3 Ruby tutorial?

New to Ruby. I'm not finding the Aptana Studio 3 Getting Started Guide very helpful. I imported my project into it but don't know what to do next. I'm particularly interested in getting its server feature going at 127.0.0.1:3000 but don't know how. Any tips or tutorial pointers will be greatly appreciated. Thanks.

Last edited by mel2000 (2011-08-12 13:25:07)

Re: Any good Aptana Studio 3 Ruby tutorial?

I just got it working with rails 3. I doubt this will work in Aptana 2 since they handle gems differently. I'll try to point out the differences in the config between rails 2 and 3. The following explains how to setup Apatana to start and stop WEBrick. I'm using rails 3!

  1. Get your rails app created or imported into Aptana.

  2. Select run configurations from the run menu

  3. Highlight Ruby Application and press the new configuration button.

  4. In the new configuration parameters, on the main tab, fill in the program field with the location of your server executable.  In rails 3 this is 'project/script/rails'. For rails 2 do 'project/script/server'.

  5. On the arguments tab set the working directory to the root of you project.  For me it's '/home/username/web-apps/project'.  For rails 3 apps you also need to add the word 'server' to program arguments.

  6. On the common tab it is convenient to add the configuration to your favorites

  7. Now you can hit the run button to test the configuration.  Later you can launch it from the run menu or icon

That should get it started on port 3000.  If you imported an app with custom routing you'll have to do other system changes to get it working (hosts file).  Your new configuration will also show up in the debug menu.  That should work fine as long as you've installed/bundled the 3 debug gems for your specific ruby version.