Rails 新手,想通过部署源码学习下部署,现在在 passenger start 之后会出现如下的错误代码
App 18582 stdout:
App 18582 stdout:
[ 2016-05-26 12:13:19.4830 18545/7feee2d60700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /var/www/ruby: An error occurred while starting up the preloader.
Error ID: a8a89028
Error details saved to: /tmp/passenger-error-2e2sNn.html
Message from application: <p>It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:</p>
<pre class="commands">bundle install</pre>
<p>If that didn't work, then maybe the problem is that your gems are installed to <code>/home/deploy/.rvm/gems</code>, while at the same time you set <code>PassengerRuby</code> (Apache) or <code>passenger_ruby</code> (Nginx) to <code>/usr/local/rvm/gems/ruby-2.1.3/wrappers/ruby</code>. Because of the latter, RVM does not load gems from the home directory.</p>
<p>To make RVM load gems from the home directory, you need to set <code>PassengerRuby</code>/<code>passenger_ruby</code> to an RVM wrapper script inside the home directory:</p>
<ol>
<li>Login as deploy.</li>
<li>Enable RVM mixed mode by running:
<pre class="commands">rvm user gemsets</pre></li>
<li>Run this to find out what to set <code>PassengerRuby</code>/<code>passenger_ruby</code> to:
<pre class="commands">/usr/local/rvm/gems/ruby-2.1.3/wrappers/ruby \
/usr/bin/passenger-config --detect-ruby</pre></li>
</ol>
<p>If that didn't help either, then maybe your application is being run under a different environment than it's supposed to. Please check the following:</p>
<ol>
<li>Is this app supposed to be run as the <code>deploy</code> user?</li>
<li>Is this app being run on the correct Ruby interpreter? Below you will
see which Ruby interpreter Phusion Passenger attempted to use.</li>
<li>Please check whether the correct RVM gemset is being used.</li>
<li>Sometimes, RVM gemsets may be broken.
<a href="https://github.com/phusion/passenger/wiki/Resetting-RVM-gemsets">Try resetting them.</a></li>
</ol>
<p>-------- The exception is as follows: -------</p>
Could not find rake-11.1.2 in any of the sources (Bundler::GemNotFound)
<pre> /usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/spec_set.rb:92:in `block in materialize'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/spec_set.rb:85:in `map!'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/spec_set.rb:85:in `materialize'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/definition.rb:132:in `specs'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/definition.rb:177:in `specs_for'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/definition.rb:166:in `requested_specs'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/environment.rb:18:in `requested_specs'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/runtime.rb:13:in `setup'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler.rb:121:in `setup'
/usr/local/rvm/gems/ruby-2.1.3@global/gems/bundler-1.7.3/lib/bundler/setup.rb:17:in `<top (required)>'
/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
/usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
/usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
/usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `<module:App>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
/usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `<main>'</pre>
[ 2016-05-26 12:13:19.4881 18545/7feee3d62700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is a8a89028. Please see earlier logs for details about the error.
尝试使用 bundle install 重装 rake-11.1.2 也一直失败(当时会显示成功,但运行依旧失败),现在重启 Nginx 服务器之后界面是一个 Sentora 的 Control Panel,如链接所示:http://www.besteve.xyz 这是否代表部署已经完成呢?那么怎么进行管理员的注册和网站主界面的登录呢?查了之前关于 admin 的一些帖子,只知道默认 admin 邮箱是 [email protected] 但不知如何注册等步骤,非常疑惑,所以来咨询各位。@huacnlee @rei @lgn21st