Rails/Passenger:没有要加载的文件——bundler

发布于 2024-09-26 01:42:35 字数 280 浏览 4 评论 0原文

我有一个运行旧版本 Rails (2.2.2) 和 Passenger 的应用程序,我使用 Ruby Enterprise Edition 1.8.7 启动并运行该应用程序。然而,我很快发现旧版本的 Rails 和 Ruby 1.8.7 之间存在一些不兼容性,并决定降级到 REE 1.8.6。但是,现在应用程序无法启动,并出现 LoadError:

no such file to load -- bundler

我假设某些路径设置不正确,但我不确定在哪里查找。有什么建议吗?

I have an application running an old version of Rails (2.2.2) and Passenger that I got up and running using Ruby Enterprise Edition 1.8.7. However, I soon found there were some incompatibilities between older versions of Rails and Ruby 1.8.7, and decided to downgrade to REE 1.8.6. However, now the application fails to start with a LoadError:

no such file to load -- bundler

I assume some path is not set correctly, but I'm not sure where to look. Any suggestions?

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

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

发布评论

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

评论(2

素食主义者 2024-10-03 01:42:35

经过多次用头撞墙后,我意识到这是因为 /opt/ruby-enterprise-... 中的文件不是组可读的(所以我认为运行 Apache 的用户没有访问权限)。

After much banging my head against the wall, I realized it was because files in /opt/ruby-enterprise-... weren't group readable (so the user running Apache didn't have access, I assume).

知你几分 2024-10-03 01:42:35

我有同样的错误,但有不同的解决方案。

在我的deploy.rb文件中有一个像这样的块:

set :default_environment, {
  'PATH' => "/usr/local/rvm/gems/ruby-1.9.2-p0/bin:/usr/local/rvm/rubies/ruby-1.9.2-p0//bin:$PATH",
  'RUBY_VERSION' => 'ruby 1.9.2',
  'GEM_HOME'     => '/usr/local/rvm/gems/ruby-1.9.2-p0',
  'GEM_PATH'     => '/usr/local/rvm/gems/ruby-1.9.2-p0',
  'BUNDLE_PATH'  => '/usr/local/rvm/gems/ruby-1.9.2-p0'  # If you are using bundler.
}

我将这些路径指向新安装的ruby(在服务器上),并且它起作用了。

I had the same error, but a different solution.

In my deploy.rb file is a block like:

set :default_environment, {
  'PATH' => "/usr/local/rvm/gems/ruby-1.9.2-p0/bin:/usr/local/rvm/rubies/ruby-1.9.2-p0//bin:$PATH",
  'RUBY_VERSION' => 'ruby 1.9.2',
  'GEM_HOME'     => '/usr/local/rvm/gems/ruby-1.9.2-p0',
  'GEM_PATH'     => '/usr/local/rvm/gems/ruby-1.9.2-p0',
  'BUNDLE_PATH'  => '/usr/local/rvm/gems/ruby-1.9.2-p0'  # If you are using bundler.
}

I pointed these paths to the new install of ruby (on the server), and it worked.

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