我正在开发 2.0.2 rails 应用程序。现在,当我从 Windows pc 执行命令时,rake db:migate
它会给出Errno::ENOEXEC in SystemsController#index
.
有没有其他方法可以从 windows pc 上的 rails 应用程序执行系统命令?
这是错误:
Errno::ENOEXEC in SystemsController#index
Exec format error - rake db:migrate
RAILS_ROOT: E:/RoR/ibt/InstantRails-2.0-win/rails_apps/config
Application Trace | Framework Trace | Full Trace
E:/RoR/ibt/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``' ``
E:/RoR/ibt/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/kernel/agnostics.rb:7:in ``'`
app/controllers/systems_controller.rb:24:in `index'
我正在使用 ruby 控制台:
irb(main):001:0> system('dir')
Volume in drive E has no label.
Volume Serial Number is 522C-BDB1
Directory of E:\RoR\ibt\InstantRails-2.0-win\rails_apps\config
11/29/2012 03:11 PM <DIR> .
11/29/2012 03:11 PM <DIR> ..
11/29/2012 02:41 PM <DIR> app
11/29/2012 02:42 PM <DIR> config
=> true
irb(main):002:0> system('rake db:migrate')
=> false
irb(main):003:0>