【问题标题】:Rails mongrel with RVM fails to startup - mongrel_rails (MissingSourceFile)带有 RVM 的 Rails mongrel 无法启动 - mongrel_rails (MissingSourceFile)
【发布时间】:2011-09-18 01:52:12
【问题描述】:

我在 RVM 和 mongrel_rails 相处方面遇到了麻烦,因此我们将不胜感激。

我可以使用 Ruby gem mongrel 愉快地启动带有脚本/服务器的 Rails 2.x 应用程序。 细节: 哪个轨道 /opt/local/bin/rails 哪个 mongrel_rails /opt/local/bin/mongrel_rails 哪个宝石 /opt/local/bin/gem

但是,我刚刚使用 Ruby 1.8.7 添加了 RVM 并安装了我的所有 gem,包括 mongrel,但是当我尝试使用脚本/服务器启动我的 rails 应用程序时,我现在得到: 没有要加载的文件 -- mongrel_rails (MissingSourceFile)

运行一些我发现的检查:

哪个 mongrel_rails /Users/daniellewis/.rvm/gems/ruby-1.8.7-p334@nacore/bin/mongrel_rails 哪个轨道 /Users/daniellewis/.rvm/gems/ruby-1.8.7-p334@nacore/bin/rails 哪个宝石 /Users/daniellewis/.rvm/rubies/ruby-1.8.7-p334/bin/gem

.profile 有: 导出 PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

(我正在使用 macports)

关于为什么脚本/服务器找不到 mongrel_rails 的任何想法?我只能猜测这与 .profile 有关,但我不确定是什么。

谢谢!

【问题讨论】:

    标签: ruby-on-rails rvm mongrel


    【解决方案1】:

    问题是您在 RVM 中安装的“gem”版本比在系统 ruby​​ 中安装的版本更新。降级您的 gem,它应该可以工作:

    gem update --system 1.4.1
    

    【讨论】:

    • yip 修复了它好吧.. 我最终将系统的 gem 更新到最新版本,现在只需将 rvm 用于所有应用程序而不是系统。谢谢布莱恩!
    • 谢谢先生,我今天仍然需要这个(2012 年 4 月)
    • 如果您在 2013 年 11 月仍在使用它,请竖起大拇指
    猜你喜欢
    • 2011-07-10
    • 2013-11-25
    • 1970-01-01
    • 2012-03-26
    • 2010-11-30
    • 2011-03-18
    • 2010-09-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多