2

我做了上限部署,我收到以下错误,

* 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 回答