2

I want webrick running at startup. So I execute this command in terminal:

crontab -e

Then added this line to the end of the file

@reboot /home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production

and restarted Ubuntu. However, the server still didn't start when my Ubuntu booted.

Any help on this problem?

0

I think the right way is to add this two lines in crontab:

PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
@reboot ruby script/rails server webrick -e production

Or, better, use this post to start webrick automatically on login.

  • Radeanu thanks for your answer but they both are not working for me. Any other idea? – petwho Jul 7 '13 at 15:33
  • @petwho Can you start it from terminal? If yes, how? – Radu Rădeanu Jul 7 '13 at 15:48
  • I am not sure what do you mean by starting it from terminal. However, I tried both on terminal and GUI approaches. For GUI approach (which you linked on your answer): I entered this line: "/home/myname/.rvm/rubies/ruby-2.0.0-head/bin/ruby /home/myname/redmine-2.3.1/script/rails server webrick -e production &" to "command" field (and event removed the ampersand character at the end of the command). They both not working. I also added "x" permission to all users to file under ~/.config/autostart/webrick and /etc/rc.local. I'm really getting hairy with this. – petwho Jul 8 '13 at 2:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.