为什么乘客服务器尝试启动Redmine Web应用程序时会遇到内部错误?

时间:2018-09-28 23:45:12

标签: ruby rubygems passenger bundler

我打算在运行Apache和Phusion的CentOS 7.5服务器上运行Redmine Web应用程序。

安装并配置完所有内容后,当我在网络浏览器中访问http://时,我收到一条消息,提示

  

启动Web应用程序时出错

在virtualhost配置文件中启用PassengerFriendlyErrorPages并重新启动apache之后,我收到以下错误报告:

The Phusion Passenger application server tried to start the web application. But the application itself (and not Passenger) encountered an internal error.

Error details:

cannot load such file -- bundler/setup (LoadError)
  /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
  /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem'
  /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
  /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler'
  /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
  /usr/share/passenger/helper-scripts/rack-loader.rb:86:in `load_app'
  /usr/share/passenger/helper-scripts/rack-loader.rb:116:in `block in <module:App>'
  /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
  /usr/share/passenger/helper-scripts/rack-loader.rb:115:in `<module:App>'
  /usr/share/passenger/helper-scripts/rack-loader.rb:28:in `<module:PhusionPassenger>'
  /usr/share/passenger/helper-scripts/rack-loader.rb:27:in `<main>'

到目前为止,子进程的stdout / stderr输出为:

Error: The application encountered the following error: cannot load such file -- bundler/setup (LoadError)
    /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
    /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
    /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:363:in `activate_gem'
    /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:221:in `block in run_load_path_setup_code'
    /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:527:in `running_bundler'
    /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:220:in `run_load_path_setup_code'
    /usr/share/passenger/helper-scripts/rack-loader.rb:86:in `load_app'
    /usr/share/passenger/helper-scripts/rack-loader.rb:116:in `block in <module:App>'
    /usr/share/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:380:in `run_block_and_record_step_progress'
    /usr/share/passenger/helper-scripts/rack-loader.rb:115:in `<module:App>'
    /usr/share/passenger/helper-scripts/rack-loader.rb:28:in `<module:PhusionPassenger>'
    /usr/share/passenger/helper-scripts/rack-loader.rb:27:in `<main>'

我的virtualhost配置文件如下:

<VirtualHost *:80>
    ServerName x.x.x.x
    DocumentRoot /var/www/redmine-3.4/public
    PassengerEnabled on 
    PassengerFriendlyErrorPages on
    PassengerRoot /usr/share/ruby/vendor_ruby/phusion_passenger/locations.ini
    PassengerRuby /usr/bin/ruby
    PassengerUser root

即使我将PassengerRuby文件路径更改为``/ usr / local / rvm / gems / ruby​​-2.5.1 / wrappers / ruby​​`,我也收到404页面未找到错误。

我的设置如下:

  • rvm -v:1.29.4
  • ruby -v:2.5.1
  • rubygem -v:2.7.7
  • passenger -v:5.3.5
  • bundler -v:1.16.5
  • mariadb -v:10.3.9

对不起,我是红宝石和乘客的新手。仅在上周才开始。请帮助我找到解决方案。

0 个答案:

没有答案