2

cap deploy を実行しましたが、次のエラーが表示されます。

* executing "cd /home/deployer/apps/nthat1/releases/20130911190337 && bundle install --gemfile /home/deployer/apps/nthat1/releases/20130911190337/Gemfile --path /home/deployer/apps/nthat1/shared/bundle --deployment --quiet --without development test"
  servers: ["192.241.225.72"]
  [192.241.225.72] executing command
** [out :: 192.241.225.72] /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/psych-1.3.4/lib/psych.rb:96: warning: already initialized constant VERSION
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] /home/deployer/.rvm/gems/ruby-1.9.3-p448/gems/psych-1.3.4/lib/psych.rb:99: warning: already initialized constant LIBYAML_VERSION
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] /home/deployer/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] Gem files will remain installed in /home/deployer/apps/nthat1/shared/bundle/ruby/1.9.1/gems/libv8-3.16.14.3 for inspection.
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] Results logged to  /home/deployer/apps/nthat1/shared/bundle/ruby/1.9.1/gems/libv8- 3.16.14.3/ext/libv8/gem_make.out
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] An error occurred while installing libv8 (3.16.14.3), and Bundler cannot
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] continue.
** [out :: 192.241.225.72] 
** [out :: 192.241.225.72] Make sure that `gem install libv8 -v '3.16.14.3'` succeeds before bundling.
** [out :: 192.241.225.72] 
command finished in 174014ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deployer/apps/nthat1/releases/20130911190337; true"

サーバーにログインし、 gem install libv8 -v '3.16.14.3' を実行しました

Building native extensions.  This could take a while...
Successfully installed libv8-3.16.14.3
1 gem installed
Installing ri documentation for libv8-3.16.14.3...
Installing RDoc documentation for libv8-3.16.14.3...

再度 cap deploy を実行しましたが、上記と同じエラーが発生します。

4

1 に答える 1

0

デプロイメントでは、RVM で構築された Ruby を使用しています。ボックスにログインして libv8 を手動でインストールする場合は、デプロイ時に使用しているものと同じ RVM ベースの Ruby を使用していることを確認してください。手動でログインした後、これを試してください:

$ rvm use ruby-1.9.3-p448
$ gem install libv8 -v '3.16.14.3'

Ruby が rvm からのものであることを確認します。

$ which ruby
/home/deployer/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
于 2013-09-12T04:37:25.667 に答える