我的行为很奇怪:
bundle install
工作正常,它可以正确安装所有内容。捆绑器正确安装了wicked_pdf
:
DEBUG [7879938b] Using wicked_pdf (0.9.10)
但是当我开始使用独角兽来运行应用程序时,我得到了:
INFO starting unicorn
INFO [b1c58c46] Running /usr/bin/env sudo /etc/init.d/unicorn_shop start on server
DEBUG [b1c58c46] Command: cd /var/www/shop/releases/20140201010816 && /usr/bin/env sudo /etc/init.d/unicorn_shop start
DEBUG [b1c58c46] stdin: is not a tty
DEBUG [b1c58c46] /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find wicked_pdf-0.9.10 in any of the sources (Bundler::GemNotFound)
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb:85:in `map!'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/spec_set.rb:85:in `materialize'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:133:in `specs'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:178:in `specs_for'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/definition.rb:167:in `requested_specs'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/environment.rb:18:in `requested_specs'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/runtime.rb:13:in `setup'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler.rb:119:in `setup'
DEBUG [b1c58c46] from /var/lib/gems/1.9.1/gems/bundler-1.5.2/lib/bundler/setup.rb:17:in `<top (required)>'
DEBUG [b1c58c46] from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
DEBUG [b1c58c46] from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
cap aborted!
这些日志是从我执行capistrano中捕获的,但是当我从shell运行两个命令bundle install
和sudo service unicorn start
时出现类似错误。
我不确定为什么独角兽正在寻找/var/lib/gems
中的wicked_pdf宝石wicked_pdf的宝石是~/.rvm/gems/ruby-2.0.0-p353/gems/wicked_pdf-0.9.10
任何线索?
提前谢谢。答案 0 :(得分:1)
看起来unicorn使用你的系统ruby(忽略RVM及其gemsets)。尝试设置默认的ruby版本和gemset,或者在使用包装器脚本启动服务器之前切换到所需的组合。