我已使用bundle --standalone
在CentOS 7上部署了我的webapp,并已使用.bundle/config
将应用配置为使用正确的gem。我使用rails server
时效果很好,但是当我set it up to use passenger时出现以下错误:
[ 2016-02-02 13:27:50.7037 5134/7fb8225b8700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/rails-web: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger.
Error ID: 7b0eafb9
Error details saved to: /tmp/passenger-error-YR2EzW.html
Message from application: An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read <a href="https://github.com/phusion/passenger/wiki/Debugging-application-startup-problems">this article</a> for more information about this problem.<br>
<h2>Raw process output:</h2>
<pre>
/usr/share/rubygems/rubygems/path_support.rb:68:in `path=': undefined method `+' for nil:NilClass (NoMethodError)
from /usr/share/rubygems/rubygems/path_support.rb:30:in `initialize'
from /usr/share/rubygems/rubygems.rb:357:in `new'
from /usr/share/rubygems/rubygems.rb:357:in `paths'
from /usr/share/rubygems/rubygems.rb:379:in `path'
from /usr/share/rubygems/rubygems/specification.rb:794:in `dirs'
from /usr/share/rubygems/rubygems/specification.rb:658:in `each_normal'
from /usr/share/rubygems/rubygems/specification.rb:669:in `_all'
from /usr/share/rubygems/rubygems/specification.rb:822:in `each'
from /usr/share/rubygems/rubygems/specification.rb:864:in `find'
from /usr/share/rubygems/rubygems/specification.rb:864:in `find_inactive_by_path'
from /usr/share/rubygems/rubygems.rb:175:in `try_activate'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:144:in `require'
from <internal:abrt_prelude>:2:in `<compiled>'
</pre>
path_support.rb:68
周围的代码涉及设置GEM_PATH。这个错误消息是什么意思,我该如何解决它。感谢。
答案 0 :(得分:0)
这似乎是乘客在/home/<username>/.gem/ruby
中查看其生成过程的一部分。如果/home/<username>
不存在(与没有主目录的系统用户一样),则会出现此错误。
这是bug report。