Sunday, March 11, 2007

Using Rails migration with Netbeans 6.0 M7

I hit a temporary road block while following the steps from this article, If You Thought Rails Development Was Fast Before.... I wanted to use migration instead of sql to create the table in the database. After using the generator to create the migration file, I couldn't figure out how to call the db:migrate task in rake. There is no obvious way to call it from Netbeans 6 itself. I look everywhere but I couldn't find anything. I look in jruby-0.9.2 directory and rake is there but there is no bat file to call it. So, I created a bat file to call rake then execute rake db:migrate directly from the command prompt. That did the trick.

Here is the link to a Derby tutorial on how to create a new database in Derby from Netbeans.

Derby Tutorial

2 comments:

Steve said...

Not sure if this is new to final Netbeans 6.0 release but you can now rightclick on your RoR project and select 'Migrate Database'>'Current Version'

Conrad said...

Netbeans has come a long way. This is not a problem anymore. Netbeans is my primary IDE for Rails development now.