我有跟随错误,似乎无法弄清楚原因以及如何解决它。
设置
cannot load such file -- bundler/setup (LoadError)
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21/src/helper-scripts/rack-preloader.rb:29:in `<main>'
<VirtualHost *:80>
ServerName HOSTNAME
ServerAdmin sudo@localhost
DocumentRoot /var/www/APP_NAME/current/public
PassengerRoot /usr/local/rvm/gems/ruby-2.2.2/gems/passenger-5.0.21
RailsEnv qa
<Directory /var/www/APP_NAME/current/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.2.2 (2015-04-13 patchlevel 95) [armv7l-linux-eabihf]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-2.2.2
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-2.2.2/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-2.2.2/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/rvm/rubies/ruby-2.2.2/etc
- RUBYGEMS PLATFORMS:
- ruby
- armv7l-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-2.2.2
- /usr/local/rvm/gems/ruby-2.2.2@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/rvm/gems/ruby-2.2.2/bin
- /usr/local/rvm/gems/ruby-2.2.2@global/bin
- /usr/local/rvm/rubies/ruby-2.2.2/bin
- /usr/local/rvm/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
答案 0 :(得分:2)
答案 1 :(得分:1)
我的安装中遇到了类似的错误,除了找不到预加载器,这就是问题所在。
我从apache-passenger安装程序安装了乘客并从源头安装了这个,所以它是最新的。
当我安装宝石时,我刚刚使用了宝石安装乘客,这是不是最新的。丢失的文件是在旧版本中,但不是在较新版本中,所以我最终不得不这样做
rsync -av --ignore-existing /path/to/passenger-out-of-date-folder/ /path/to/passenger-up-to-date-folder/