Bundler :: GemNotFound:在任何来源中都找不到nokogiri-1.5.5

时间:2015-10-28 08:35:46

标签: ruby-on-rails

我正在尝试使用crontab @reboot

从脚本运行rake任务

crontab看起来像这样:

@reboot cd /home/me/apps/packaged/X/ && ./resque_startup.sh > /home/me/sss.txt 2>&1

resque_startup脚本(是的,代码可能更惯用,但事实并非如此):

if [ -z ${1+x} ]; then
  RAILS_ENV=xxx /usr/local/bin/rake deploy:resque
else
 if [ $1 = 'start' ]; then
  RAILS_ENV=xxx rake deploy:resque
elif [ $1 = 'stop' ]; then
  echo "stop resque"
else
  echo "Invalid command, use start|stop"
fi
fi

我收到以下错误:

rake aborted!
Bundler::GemNotFound: Could not find nokogiri-1.5.5 in any of the sources
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/spec_set.rb:92:in `block in materialize'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `map!'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/spec_set.rb:85:in `materialize'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/definition.rb:140:in `specs'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/definition.rb:185:in `specs_for'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/definition.rb:174:in `requested_specs'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/environment.rb:18:in `requested_specs'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/runtime.rb:13:in `setup'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler.rb:127:in `setup'
/var/lib/gems/1.9.1/gems/bundler-1.10.6/lib/bundler/setup.rb:18:in `<top (required)>'
/home/me/apps/packaged/X/config/boot.rb:6:in `<top (required)>'
/home/me/apps/packaged/X/config/application.rb:1:in `<top (required)>'
/home/me/apps/packaged/X/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

请注意,如果我从X文件夹手动运行脚本,一切正常

感谢。

1 个答案:

答案 0 :(得分:0)

尝试使用:

bundle install --path vendor/cache