gpt4 book ai didi

ruby-on-rails - 无法加载此类文件 -- 捆绑程序/设置(加载错误)- Passenger/Apache2

转载 作者:太空宇宙 更新时间:2023-11-03 18:11:17 24 4
gpt4 key购买 nike

我有跟随错误,似乎无法弄清楚原因以及如何解决它。

设置

  • Debian 8
  • Ruby 2.2.2(通过 RVM 安装)
  • RVM 1.26.11
  • rails 4.2.4
  • 乘客 5.0.21
  • Capistrano 3.4.0

乘客错误

    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>'

APP_NAME.conf

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

gem 环境

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

最佳答案

你检查过bundler了吗?你的机器上安装了吗?

我更喜欢 rbenv 而不是 rvm,并且不是 100% 熟悉如何使用 RVM 安装 bundler gem,但是这个 article可能会有所帮助。

关于ruby-on-rails - 无法加载此类文件 -- 捆绑程序/设置(加载错误)- Passenger/Apache2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33748136/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com