【发布时间】:2014-10-02 21:39:24
【问题描述】:
我有一个运行 Ruby ruby 1.9.3p194 和 Capistrano 2.12.0 的 Rails 3.2.18 应用程序。
我过去能够部署到我们的生产服务器,但我现在正尝试部署到不同的服务器(Ubuntu 12.04 LTS 64 位)进行测试。所以我用所有正确的信息(服务器 ip、应用程序名称、repo 等)更改了我的 deploy.rb。
当我进行上限部署时,我得到以下信息:
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
executing locally: "git ls-remote git@github.com:app/exigead.git master"
command finished in 920ms
* executing "git clone -q git@github.com:app/exigead.git /home/deploy/exigencad/releases/20140809150103 && cd /home/deploy/exigencad/releases/20140809150103 && git checkout -q -b deploy e6efe3c07a4148d840af414ae0fe113adc05a0fa && (echo e6efe3c07a4148d840af414ae0fe113adc05a0fa > /home/deploy/exigencad/releases/20140809150103/REVISION)"
servers: ["72.14.181.99"]
Password:
[72.14.181.99] executing command
** [72.14.181.99 :: out] Enter passphrase for key '/home/deploy/.ssh/id_rsa':
Password:
** [72.14.181.99 :: out]
command finished in 15062ms
* executing `deploy:finalize_update'
triggering before callbacks for `deploy:finalize_update'
* executing `deploy:assets:symlink'
* executing "rm -rf /home/deploy/exigencad/releases/20140809150103/public/assets &&\\\n mkdir -p /home/deploy/exigencad/releases/20140809150103/public &&\\\n mkdir -p /home/deploy/exigencad/shared/assets &&\\\n ln -s /home/deploy/exigencad/shared/assets /home/deploy/exigencad/releases/20140809150103/public/assets"
servers: ["72.14.181.99"]
[72.14.181.99] executing command
command finished in 66ms
* executing `bundle:install'
* executing "cd /home/deploy/exigencad/releases/20140809150103 && bundle install --gemfile /home/deploy/exigencad/releases/20140809150103/Gemfile --path /home/deploy/exigencad/shared/bundle --deployment --quiet --without development test"
servers: ["72.14.181.99"]
[72.14.181.99] executing command
** [out :: 72.14.181.99] Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
** [out :: 72.14.181.99]
** [out :: 72.14.181.99] /usr/bin/ruby1.9.1 extconf.rb
** [out :: 72.14.181.99] /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
** [out :: 72.14.181.99] from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
** [out :: 72.14.181.99] from extconf.rb:36:in `<main>'
** [out :: 72.14.181.99]
** [out :: 72.14.181.99]
** [out :: 72.14.181.99] Gem files will remain installed in /home/deploy/exigencad/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
** [out :: 72.14.181.99] Results logged to /home/deploy/exigencad/shared/bundle/ruby/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
** [out :: 72.14.181.99] An error occurred while installing bcrypt-ruby (3.0.1), and Bundler cannot
** [out :: 72.14.181.99] continue.
** [out :: 72.14.181.99] Make sure that `gem install bcrypt-ruby -v '3.0.1'` succeeds before bundling.
command finished in 5788ms
*** [deploy:update_code] rolling back
* executing "rm -rf /home/deploy/exigencad/releases/20140809150103; true"
servers: ["72.14.181.99"]
[72.14.181.99] executing command
command finished in 76ms
failed: "sh -c 'cd /home/deploy/exigencad/releases/20140809150103 && bundle install --gemfile /home/deploy/exigencad/releases/20140809150103/Gemfile --path /home/deploy/exigencad/shared/bundle --deployment --quiet --without development test'" on 72.14.181.99
bcrypt-ruby 似乎无法安装。但是即使捆绑器安装在服务器上也无法运行(必须在部署之前手动执行此操作)
有人知道为什么会这样吗?
【问题讨论】:
标签: ruby ruby-on-rails-3 capistrano bundler