CRON Job on Server Reboot Not Working (Ruby on Rails)

software development

#1

Hey all,

Followed instructions here (bottom of the page) to get a Ruby 1.9.3-p194 and Rails 3.2.3 app running on my Dreamhost dedicated server using Passenger.

The CRON job I set up to run on server reboot does not appear to be working:

. /etc/profile && . /home/boombotix/.bashrc && cd /home/boombotix/swagonomics && RAILS_ENV=production passenger start -p 8000 > /home/boombotix/swagonomics/log/cron.log & disown

The super weird thing is I can run this ^ command in SSH and the Passenger server starts fine!

I get no output in my cron.log file…any ideas? Dreamhost support refuses to help me.


#2

Dreamhost fail. Im also having Cron issues… maybe not like yours but Cron dont work no more.


#3

Hi there!

As a cron job, the RVM source must be defined. Please see this example:

source /home/boombotix/.rvm/environments/ruby-1.9.3-p194 && . /home/boombotix/.bashrc && cd /home/boombotix/swagonomics && RAILS_ENV=production passenger start -p 8000 > /home/boombotix/swagonomics/log/cron.log & disown

Without that top line the cron is unable to read the RVM gemset, and will instead say Passenger is not installed.

Please give that a try and let us know how it goes!

Hope this helps,

Elle S


#4

Same here… the cron jobs doesn’t work (on the new northumberland-server)…
:frowning: