How does one run Rake tasks from Eclipse (using the Aptana RadRails plugin)?

3.4k views Asked by At

As an XEmacs user, I'm a firm believer that if you're using a powerful editor / IDE, you should attempt to do as many of your development tasks as possible without leaving the environment (e.g. why M-Tab into bash to run make clean when you can just M-! make clean <RET>?).

Given this, how can I run Rake tasks from within Eclipse, using the Aptana Studio / RadRails plugin? I'd like to be able to run, e.g. rake db:migrate and rake db:test:prepare.

Update 2: The easiest way to do it is to right-click on your Ruby project in the Project Explorer pane, then select Rake > your task name (e.g. Rake > db > migrate).

Update 1: Thanks to Shadwell's answer, here's how I did it:

  1. Opened Ruby perspective
  2. Clicked on Window menu and selected Show View > Rake Tasks
  3. In the Rake Tasks tab which appeared, clicked on the Tasks dropbox and selected a task (e.g. db:migrate)
  4. Clicked the green run button to the right of the Tasks / Parameters line
2

There are 2 answers

0
Shadwell On BEST ANSWER

There's actually a rake tasks view provided by the aptana plugin which allows you to run rake tasks.

You can also run rake tasks from a 'rails shell'. I open this from the "open shell" menu on the console view but I'm sure there's a better way to do it.

0
Christopher Williams On

Just a note that in Studio 3, there's an embedded Terminal view that you'd use to do the equivalent inside the IDE now. It is just like using the command line outside the IDE, and on Windows is typically a cygwin/msys shell setup.