Skip to content

Conversation

@adelevie
Copy link

@adelevie adelevie commented Jan 4, 2015

Shamelessly copied the solution described here http://benscheirman.com/2013/12/using-rbenv-in-cron-jobs/.

For rake tasks, just use rbenv_rake "my:rake:task" instead of rake "my:rake:task.

Added rbenv_rake example to README.md

Fix small README typo
@adelevie
Copy link
Author

I think I want to close my own PR. The code here is OSX specific. FWIW, here's how I got this working on Ubuntu:

job_type :rbenv_rake, %Q{export PATH=/home/alan/.rbenv/shims:/home/alan/.rbenv/bin:/usr/bin:$PATH; eval "$(rbenv init -)"; \
                         cd :path && bundle exec rake :task --silent :output }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant