开发者

Rails/Passenger: no such file to load -- bundler

开发者 https://www.devze.com 2023-01-19 03:55 出处:网络
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 betwe

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 开发者_JS百科where to look. Any suggestions?


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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消