“没有要加载的文件——捆绑器”使用 Passenger Standalone 启动 redmine 时出错

发布于 2024-12-25 12:22:00 字数 1576 浏览 8 评论 0原文

我一直在互联网上(嗯,有点)搜索此错误的解决方案,但无济于事。有些人有这个错误,但他们的解决方案对我的情况不起作用。

我正在尝试使用乘客(独立版本,不是 nginx 也不是 apache 捆绑器 - 我有一些理由不这样做)设置 redmine。当我使用 passenger start -e production -d 启动 redmine 时,出现错误 no such file to load -- bundler

当然,当我安装了捆绑包时:

# gem list -d bundler

*** LOCAL GEMS ***

bundler (1.0.21)
    Authors: André Arko, Terence Lee, Carl Lerche, Yehuda Katz
    Rubyforge: http://rubyforge.org/projects/bundler
    Homepage: http://gembundler.com
    Installed at: /usr/local/lib/ruby/gems/1.8

    The best way to manage your application's dependencies

并且(看起来)我的 gem、ruby 和此类内容的形式正确:

# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.4.2
  - RUBY VERSION: 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

我遵循了从其他来源学到的所有可能的解决方案。我什至在另一个线程之后为捆绑器创建了从 /usr/local/lib/ruby/gems/1.8/root/.gem/ruby/1.8 的符号链接在 StackOver 流程​​上(好吧,以防万一)。它就是行不通。每次我尝试启动时,都会出现no such file to load -- bundler 的情况。

有人能帮我解决这个问题吗?我无论如何都不是 Rails 大师。

I've been searching all over the internet (well, kind of) for the solution to this error, but to no avail. A few of people out there have this error, but their solutions just don't work for my case.

I'm trying to set up redmine with passenger (standalone version, not nginx nor apache bundler - I have some reasons not to). When I boot up redmine with passenger start -e production -d the error no such file to load -- bundler appears.

When, of course, I have bundle installed:

# gem list -d bundler

*** LOCAL GEMS ***

bundler (1.0.21)
    Authors: André Arko, Terence Lee, Carl Lerche, Yehuda Katz
    Rubyforge: http://rubyforge.org/projects/bundler
    Homepage: http://gembundler.com
    Installed at: /usr/local/lib/ruby/gems/1.8

    The best way to manage your application's dependencies

And (looks like) my gem, ruby and such stuffs are in correct forms:

# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.4.2
  - RUBY VERSION: 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

I've followed like all possible solutions learned from other sources. I've even created a symbolic link for bundler from /usr/local/lib/ruby/gems/1.8 to /root/.gem/ruby/1.8 following another thread on StackOver flow (well, just in case). It just doesn't work. Everytime I try to boot up, that no such file to load -- bundler strikes.

Could anyone help me on this? I'm not in any ways a Rails guru.

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

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

发布评论

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

评论(2

朮生 2025-01-01 12:22:00

我认为您只是使用不同的用户来安装 gem 和运行乘客。因此一个用户的路径不可用于其他用户。也许您以简单用户身份安装 gem 并以 root 身份运行乘客,反之亦然。

I think ou just use different users for installing gem and for passenger running. So paths of one user not available for other. Maybe you install gem as a simple user and run passenger as a root or vice versa.

沫雨熙 2025-01-01 12:22:00

您是否尝试过通过捆绑器运行乘客?

bundle exec passenger start -e production -d

Have you tried running passenger via bundler?

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