2011-02-03 59 views
1

你好 我目前正在使用:Glassfish的,JRuby的,Rails 3中拋出耙錯誤

  • Ubuntu的10.04LTS
  • Netbeans的6.9.1(帶嵌入的JRuby 1.5.1)
  • JDK6u17
  • GlassFish的寶石1.0.2

我使用的,因爲這個錯誤的舊JDK: http://jira.codehaus.org/browse/JRUBY-4785

我已經部分完成了應用程序,但是我想遷移到rails 3(目前應用程序在rails 2.3.8中)。

所以我去: $HOME/netbeans-6.9.1/ruby/jruby-1.5.1/bin和類型:jruby gem install rails -v=3.0.3。一切都好。

然後我創建一個示例RoR項目並使用一些簡單的腳手架。作品。

但是,當我選擇在Netbeans rake db:migrate它顯示我的消息:"db:migrate" taks does not exist

任何想法如何解決這個問題?

我將不勝感激的幫助。

UPDATE

我已經在Ubuntu測試這和它工作正常。 但在Mac OS X中,這個技巧不起作用。 所以我做了所謂的jrake的符號鏈接jruby/bin/rake

cd /bin 
ln -s /Applications/NetBeans/NetBeans\ 6.9.1.app/Contents/Resources/NetBeans/ruby/jruby-1.5.1/bin/rake jrake 

,我只是在項目目錄類型jrake db:migrate和它的作品。

回答

1

這是否鏈接幫助?:

http://www.blakes-site.co.uk/blog/13/Fix-NetBeans-dbmigrate-task-does-not-exists-error/

UPDATE

鏈接打破 - 從布萊克辛普森的博客的谷歌緩存:

I have recently reinstalled Ruby on Rails 3.0.0 and created a new Rails project in NetBeans 9.6.1

I could not migrate my database, or any other rake tasks for that matter. I kept getting the error:

"db:migrate" task does not exist 

The solution is to right click your project select "Run/Debug Rake Task" and then click the button titled "Refresh Tasks".

Once this is done you should see a list of all your rake tasks. After this you can simply re-run the db:migrate task and it will work.

+0

是。現在一切正常。謝謝! – 2011-02-03 13:45:34