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:
- Opened Ruby perspective
- Clicked on Window menu and selected Show View > Rake Tasks
- In the Rake Tasks tab which appeared, clicked on the Tasks dropbox and selected a task (e.g. db:migrate)
- Clicked the green run button to the right of the Tasks / Parameters line
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.