在 Mac OS 10.6.8 上安装 Webistrano RAILS_ENV=生产 rake db:migrate 失败
我一直在尝试安装 Webistrano。我已经安装了它所需的所有依赖项,包括 Capistrano,如 github wiki 上所述: https:// /github.com/peritor/webistrano/wiki/Installation。我已经用谷歌搜索了这些错误消息,但没有找到任何有用的信息。
运行 RAILS_ENV=生产 rake db:migrate 时,我收到以下错误消息:
SUDO
webistrano username$ sudo RAILS_ENV=production rake db:migrate
/Users/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rake (>= 0) (Gem::LoadError)
from /Users/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /Users/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /Users/u sername/.rvm/gems/ruby-1.9.2-p180/bin/rake:18:in `<main>'
否 SUDO
webistrano username$ RAILS_ENV=production rake db:migrate
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
uninitialized constant MysqlCompat::MysqlRes
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
谢谢。
I've been trying to install Webistrano. I have installed all the dependencies required for it, including Capistrano, as described on the github wiki: https://github.com/peritor/webistrano/wiki/Installation. I have googled these error messages and have not found any helpful info.
When running RAILS_ENV=production rake db:migrate I get the following error messages:
SUDO
webistrano username$ sudo RAILS_ENV=production rake db:migrate
/Users/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:900:in `report_activate_error': Could not find RubyGem rake (>= 0) (Gem::LoadError)
from /Users/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:248:in `activate'
from /Users/username/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:1276:in `gem'
from /Users/u sername/.rvm/gems/ruby-1.9.2-p180/bin/rake:18:in `<main>'
No SUDO
webistrano username$ RAILS_ENV=production rake db:migrate
rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
rake aborted!
uninitialized constant MysqlCompat::MysqlRes
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
Thank you.
MysqlRes 问题已在这里被询问并解决了很多次。简短的回答是您需要使用自定义设置重新安装gem。
The MysqlRes issue has been asked and solved many times here. Short answer is you need to reinstall the gem with custom settings.