New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i set ruby version in cron job? #325
Comments
Are you using RVM or rbenv to manage ruby versions? |
Yes, i am using RVM |
Any reason you're leaving out the |
Thank you @javan , i resolved the problem, i changed the job_type :runner, "source $HOME/.rvm/scripts/rvm && rvm use 1.9.3-p392 && cd :path && script/rails runner -e :environment ':task' :output" And it works now. |
The solution has no resemblance to the examples, which could explain the past 4 hours trying to solve this. I have RVM. I can verify all gems, rake, etc are accessible from the command-line where I run wherever; they should be getting passed and set-up automatically, right? I've tried every proposed solution in StackO, and there are many. None of them work. What is the closest thing to ... "rake "my_task" ... which I can put in the schedule.rb file so that it will find the pieces it needs to run. |
My schedule.rb :
Then whenever generated cron job:
It work when it executed by my self, but
log/cron.log
said:Who know how i can change ruby version to 1.9.3 in cron job?
The text was updated successfully, but these errors were encountered: