在 Mac OS 10.6.8 上安装 Webistrano RAILS_ENV=生产 rake db:migrate 失败

发布于 11-27 22:41 字数 1182 浏览 2 评论 0原文

我一直在尝试安装 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倾城月光淡如水﹏2024-12-04 22:41:44

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文