2016-10-13 1 views
2

私はこの1つのエラーが発生しています。開発モードで 'いつでも'の宝石を使用すると、私は理解できません。GemNotFound rakeを開発中いつでも使用する

更新のconfig/schedule.rbと実行

whenever --update-crontab --set environment='development' 

のcrontab -lリストだった私は何をやった:ログの設定で

* * * * * /bin/bash -l -c 'cd /home/vic/Desktop/WorkflowProject && bundle exec bin/rails runner -e development '\''Task.new2'\'' >> log/whenever.log 2>&1' 

/schedule.rb

set :output, 'log/whenever.log' 

every 1.minute do 
    runner "Task.new2" 
end 

/weverever.log

bundler: failed to load command: bin/rails (bin/rails) 
Bundler::GemNotFound: Your bundle is locked to rake (11.3.0), but that version could not be found in any of the sources listed in your Gemfile. If you haven't changed sources, that means the author of rake (11.3.0) has removed it. You'll need to update your bundle to a different version of rake (11.3.0) that hasn't been removed in order to install. 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/definition.rb:179:in `rescue in specs' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/definition.rb:173:in `specs' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/definition.rb:233:in `specs_for' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/definition.rb:222:in `requested_specs' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/runtime.rb:118:in `block in definition_method' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/runtime.rb:19:in `setup' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler.rb:99:in `setup' 
/home/vic/.rvm/gems/ruby-2.3.1/gems/bundler-1.13.2/lib/bundler/setup.rb:20:in `<top (required)>' 
/home/vic/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' 
/home/vic/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require' 

私はgrealyが助けに感謝します、ありがとうございます!

+0

ビクターでこれを試してみてください 、すべてのソリューションは、別のユーザーに非常に役立つ、ここで更新しました。私は同じ問題があります。お知らせ下さい。 – user1780370

答えて

0

以下のコマンドを試してみてください。

gem install rubygems-bundler 
gem regenerate_binstubs 

参考:this

+3

私は両方とも走ったが、まったく同じエラーが続く。 –

0

あなたはbundlerがインストールされていますか?アプリケーションディレクトリ内でbundle installを実行してみてください。 いいえの場合は、上記のJayaprakashの答えをご覧ください。 「はい」の場合は、bundle exec whenever --update-crontab --set environment='development'を試してください。

更新: あなたのタスクが実行されるとエラーが表示されます。あなたのconfig/schedule.rb

env :PATH, ENV['PATH'] 
set :output, "#{ Whenever.path }/log/whenever.log" 

every 1.minute do 
    runner "Task.new2" 
end 
+0

私は 'bundle install'が正しく実行され、次にバンドラがインストールされていると思います。実際、それは実行されました。あなたが指定したコマンドを実行しようとしましたが、crontabファイルは私が投稿したものと全く同じように更新されました。エラーは解決しません。 –

+0

@VictorSprengel私の答えを更新しました。 –

+0

私はschedule.rbを提案通りに更新し、crontab(PATHを含む)を更新しました。エラーは依然として(正確に)持続します。 –

関連する問題