1
  • 最近、古いWebアプリケーションをRails 4.2.7.1とRuby 2.3.1(これはRails 3とRuby 1.9で動作していました)に更新しました。
  • rvmを使用して、本番環境のnginx-pasengerサーバー上で動作するアプリケーション。
  • 生産時にRVMとrubyが更新され、新しいルビーバージョンが に設定されています。
  • カプリストラノと共に配備されました。

アプリはnginxのログから、動作していない:本番サーバに "バンドル" を実行配備時にrake-11.3.0が見つかりませんでした

[ 2016-12-01 07:00:34.0368 1509/7fbcbf7fe700 agents/HelperAgent/RequestHandler.h:2306 ]: [Client 20] Cannot checkout session because a spawning$ 
App 6899 stdout: 
App 6899 stdout: 
[ 2016-12-01 07:01:13.2625 1509/7fbccdf3b700 Pool2/Implementation.cpp:287 ]: Could not spawn process for application /home/deploy/porinstinto/c$ 
    Error ID: 9864a1e8 
    Error details saved to: /tmp/passenger-error-NDJl0Z.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. T$ 

    <pre class="commands">bundle install</pre> 

<p>If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. $ 

<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.3.0 in any of the sources (Bundler::GemNotFound) 
<pre> /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/spec_set.rb:92:in `block in materialize&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/spec_set.rb:85:in `map!&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/spec_set.rb:85:in `materialize&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/definition.rb:132:in `specs&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/definition.rb:177:in `specs_for&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/definition.rb:166:in `requested_specs&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/environment.rb:18:in `requested_specs&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/runtime.rb:13:in `setup&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler.rb:121:in `setup&#39; 
    /home/deploy/.rvm/gems/[email protected]/gems/bundler-1.7.3/lib/bundler/setup.rb:17:in `&lt;top (required)&gt;&#39; 
    /home/deploy/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require&#39; 
    /home/deploy/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require&#39; 
    /home/deploy/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require&#39; 
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:263:in `block in run_load_path_setup_code&#39; 
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:366:in `running_bundler&#39; 
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:261:in `run_load_path_setup_code&#39; 
    /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app&#39; 
    /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `&lt;module:App&gt;&#39; 
    /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `&lt;module:PhusionPassenger&gt;&#39; 
    /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `&lt;main&gt;&#39;</pre> 

[ 2016-12-01 07:01:13.2791 1509/7fbcbf7fe700 agents/HelperAgent/RequestHandler.h:2306 ]: [Client 20] Cannot checkout session because a spawning$ 

UPDATE

  • 私は熊手-11.3.0は見ることができますインストールされます。
  • 宝石についてはlinkをお読みください。
  • エラーログを読んで、また思えるすべての宝石をgemset [email protected]
  • をinstaledているようだ、その乗客が[email protected] gemsetを使用している、ウィッヒはインストールなし適切な宝石を持っていません。

    ここで、正しい「デフォルト」ジェムセットを使用するには、乗客のgemset設定を変更する必要があります。どんな助け?

答えて

0

で試してみてください。

bundle exec rake 'option' 
+0

? –

+0

あなたは何をしているのでしょうか教えてください。 – vipin

+0

プロダクションサーバーまたは自分の開発マシンで以前のsugerence 'bundle exec rake rake-command'を実行しましたか? –

0

問題が解決し、それはnginxの乗客の設定に問題でした。ファイルnginx.conf

は2.1.3ルビーために(私が使用したルビーの前のバージョン)を指していたので、私は単純にこの行を置き換える:本番サーバー上

passenger_ruby /home/deploy/.rvm/wrappers/ruby-2.3.1/ruby; 
関連する問題