【问题标题】:Problem running Mongrel with Rails3 and Ruby 1.8.7使用 Rails3 和 Ruby 1.8.7 运行 Mongrel 时出现问题
【发布时间】:2011-09-13 01:00:41
【问题描述】:

我正在运行一个 linux 实例。我的问题和LoadError running Mongrel with Rails3 and Ruby 1.9.2一样 除了我运行的是 Ruby 1.8.7 并且我使用的是 Linux。

这里是 mongrel_cluster.log 的内容:

** Starting Rails with development environment...
/usr/lib64/ruby/gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require': no such file to load -- dispatcher (LoadError)
        from /usr/lib64/ruby/gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
        from /usr/lib64/ruby/gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /usr/lib64/ruby/gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
        from /usr/lib64/ruby/gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
        from /usr/lib64/ruby/gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/rails.rb:148:in `rails'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:113:in `cloaker_'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `call'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:149:in `listener'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `call'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:50:in `initialize'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `new'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:84:in `run'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run'
        from /usr/lib64/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
        from /usr/bin/mongrel_rails:19:in `load'
        from /usr/bin/mongrel_rails:19

我不知道如何解决这个问题。

有人可以帮忙吗? TIA

【问题讨论】:

  • 我们需要查看您的宝石清单。在此处发布:pastebin.com
  • @Cory。我已将“宝石列表”粘贴到您提供的网络链接上。如果您收到,请告诉我。谢谢。
  • 您需要提供粘贴的链接,否则我们看不到它。

标签: ruby-on-rails ruby ruby-on-rails-3 mongrel mongrel-cluster


【解决方案1】:

gem list返回什么?

您的 Gemfile 看起来如何?

您是否尝试重新安装 Rails?

考虑为每个项目使用 RVM 和 Gemset,以便隔离 gem 冲突。

http://nerian.github.com/2011/01/15/RPS-1-RVM.html

【讨论】:

  • @Nerian,宝石列表太长,无法粘贴到此处。但它包括 rails (3.0.8)、mongrel (1.1.5)、rubygems-update (1.8.5)、rvm (1.6.20)。我在 Gemfile 中只有“gem 'rails'、'3.0.8' 和 gem 'pg' 行。我尝试将 gem 'mongrel' 添加到 Gemfile 并进行了“捆绑更新”——没有帮助。不,我没有尝试过重新安装 Rails。我该怎么做?使用“gem”命令?谢谢。
  • @Nerian,我做了“gem uninstall rails”和“gem install rails”——有效地重新安装了 rails。这也没有帮助。我继续看到相同的错误日志。谢谢。
  • @user:您使用的是 RVM?那为什么错误说/usr/lib64/ruby/gems/1.8/。如果您使用的是 RVM,那么它应该在 ~/.rvm 中输出一个文件夹。你确定你使用的是 RVM 安装的 ruby​​ 吗? which ruby 返回什么?
  • @user:那么你没有使用 RVM,你有没有这样的东西 [[ -s "$HOME/.rvm/scripts/rvm" ]] && 。 .bash_profile 中的“$HOME/.rvm/scripts/rvm”?
  • @Nerian,不,我的 .bash_profile 中确实有该行。 export LD_LIBRARY_PATH [[ -s "/home/ec2-user/.rvm/scripts/rvm" ]] && source "/home/ec2-user/.rvm/scripts/rvm" # 这会将 RVM 加载到 shell 会话中。让我尝试按照您之前粘贴的博客中的说明进行操作,看看是否有帮助。谢谢。
猜你喜欢
  • 2011-09-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-12-06
  • 1970-01-01
  • 1970-01-01
  • 2015-06-26
  • 1970-01-01
相关资源
最近更新 更多