The problem when using any jewel

I am trying to use whenevergem in my application, but I cannot run rake's command schedule.rb.

The error that occurs is

/bin/bash: rake: command not found

I also use bundler, so all my gems freeze in the application.

+5
source share
2 answers

Is rake somewhere atypical like / usr / local / bin? Try adding this to schedule.rb:

env :PATH, '/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin'
+4
source

Try using the "command" instead of a rake. My rake is in / usr / local / bin, and I cannot figure out how to make it work. So, here is an example command instead of in sched.rb:

every 5.minutes do
  command "cd " + `pwd`.chomp + " && RAILS_ENV=#{environment} /usr/local/bin/rake rakefile:rakemethod"
end

, . , "when -update_crontab --set environment = beta", schedule.rb.

capistrano , capistrano (. lib dirs ). when_environment capistrano script.

, , . , RAILS_ENV = # {environment}, . , , script.

rake, /usr/local/bin/rake! - ?

0

All Articles