简体   繁体   English

Debian Passenger错误:无法加载此类文件-捆绑软件(LoadError)

[英]Debian Passenger error: cannot load such file — bundler (LoadError)

I am running Apache on my Raspberry Pi (Raspbian) and struggling to get Passenger working properly with my site. 我在Raspberry Pi(Raspbian)上运行Apache,并且努力使Passenger在我的网站上正常工作。 When I go to visit my site (which is set up as a VirtualHost), I get the error: "cannot load such file -- bundler". 当我访问我的网站(设置为VirtualHost)时,出现错误:“无法加载此类文件-捆绑程序”。 The first line of the backtrace is 回溯的第一行是

/usr/lib/ruby/1.9.1/rubygems/custom_require.rb

To install Passenger, I followed the instructions here: http://www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu . 要安装Passenger,我按照此处的说明进行操作: http : //www.modrails.com/documentation/Users%20guide%20Apache.html#install_on_debian_ubuntu In particular, I ran the command 我特别执行了命令

sudo apt-get install libapache2-mod-passenger  

This link says, "The Apache package provides configuration snippets for you, so you don't need to modify any Apache configuration to get it to load Phusion Passenger". 该链接说:“ Apache软件包为您提供了配置摘要,因此您无需修改​​任何Apache配置即可加载Phusion Passenger。” The way the installation went on my machine was that it automatically added and enabled the passenger module through the files "passenger.conf" and "passenger.load": 安装在我的机器上的方式是它通过文件“ passenger.conf”和“ passenger.load”自动添加并启用了乘客模块:

passenger.conf: passenger.conf:

<IfModule mod_passenger.c>
  PassengerRoot /usr
  PassengerRuby /usr/bin/ruby 
</IfModule>

passenger.load: passenger.load:

LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so

Running "gem env" gives me the following output: 运行“ gem env”会显示以下输出:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.7
  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [armv6l-linux-eabihf]
  - INSTALLATION DIRECTORY: /home/user/.rvm/gems/ruby-2.0.0-p247
  - RUBY EXECUTABLE: /home/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
  - EXECUTABLE DIRECTORY: /home/user/.rvm/gems/ruby-2.0.0-p247/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - armv6l-linux
  - GEM PATHS:
     - /home/user/.rvm/gems/ruby-2.0.0-p247
     - /home/user/.rvm/gems/ruby-2.0.0-p247@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/

I tried looking all over for a mod_passenger.so file elsewhere in the file system with no luck. 我尝试到处寻找文件系统中其他地方的mod_passenger.so文件,但是没有运气。 I am reluctant to simply reinstall rails or passenger because I am unsure what the implications will be for the modules and configuration. 我不愿意简单地重新安装滑轨或乘客,因为我不确定模块和配置的含义。 Any advice is appreciated, thanks! 任何建议表示赞赏,谢谢!

Maybe you didn't configure your app to use Ruby 2.0.0? 也许您没有将应用程序配置为使用Ruby 2.0.0? If you don't do that explicitly, it will use the default Ruby, which is /usr/bin/ruby. 如果您未明确进行此操作,它将使用默认的Ruby,即/ usr / bin / ruby​​。 This section from the manual tells you how to specify a different Ruby: http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby 手册中的这一部分告诉您如何指定其他Ruby: http : //www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerRuby

Note that multiple Ruby supports requires Phusion Passenger >= 4.0.0. 请注意,多个Ruby支持需要Phusion Passenger> = 4.0.0。

问题最终导致我需要在.htaccess文件中设置GEM_PATH的环境变量!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 docker apache passenger:错误无法加载此类文件捆绑程序/安装程序(LoadError) - docker apache passenger: error cannot load such file bundler/setup (LoadError) 无法加载此类文件 - bundler / setup(loaderror) - Passenger / Apache2 - Cannot load such file — bundler/setup (loaderror) - Passenger / Apache2 Apache / Passenger-无法加载此类文件-捆绑程序/安装程序(LoadError) - Apache/Passenger - cannot load such file — bundler/setup (LoadError) 使用nginx的乘客:无法加载此类文件 - bundler / setup(LoadError) - Passenger with nginx: cannot load such file — bundler/setup (LoadError) 需要“捆绑器”错误,无法加载此类文件 — 捆绑器 (LoadError) - require 'bundler' error, cannot load such file — bundler (LoadError) Ruby on Rails:错误“require”:无法加载此类文件——bundler/setup (LoadError) - Ruby on Rails: Error `require': cannot load such file -- bundler/setup (LoadError) 在全新安装的Nginx / Passenger上运行Rails应用程序会导致错误“没有此类文件可加载-捆绑程序/安装程序(LoadError)” - running a Rails app on a fresh installation of Nginx/Passenger causes error “no such file to load — bundler/setup (LoadError)” `require&#39;:无法加载此类文件-捆绑程序/安装程序(LoadError) - `require': cannot load such file — bundler/setup (LoadError) LoadError:无法加载此类文件—捆绑程序/设置capistrano - LoadError: cannot load such file — bundler/setup capistrano 加载错误:无法加载此类文件 -- 捆绑程序/设置 - LoadError: cannot load such file -- bundler/setup
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM