Redmine not starting after reboot

Added by Andrejs Eigus about 8 years ago

Dear all,

I am struggling with this issue for a long time now but having no experience with Ruby on Rails I cannot identify and solve the issue so far. I would really appreciate if you can help me with any hints.

I have set up Redmine on Gentoo Linux: 'emerge redmine'. I followed installation instructions and redmine is now working under nginx. Every time I reboot the machine, redmine would not start complaining that it could not find the "yard" gem. I can solve it by doing 'bundle update' or 'bundle install' in the redmine home directory, which I already did upon installation, but this I have to do EACH time after reboot, as if this and other gems somehow mysteriously dissappear.

In my attempt to solve the issue, I have then installed thin and configured redmine to work with thin, according to instructions found on the internet. I created a '/etc/init.d/redmine-thin' initscript, that would start Thin with Redmine at boot (attached is the initscript and the Redmine configuration file for thin). I also set up nginx configuration according to instructions (attached nginx.conf).

It is all working, but next time when I reboot I am getting '404 Not Found' error and the logs indicate again that the yard gem could not be found.

Do you have any ideas how to make redmine start automatically at boot without the need to do 'bundle update' or 'bundle install' ??

Best regards and many thanks in advance,

redmine-thin (1.32 KB) redmine-thin redmine-thin Gentoo initscript
nginx.conf (1003 Bytes) nginx.conf nginx.conf: Redmine configuration
redmine.yml (328 Bytes) redmine.yml Thin configuration for redmine

Replies (2)

RE: Redmine not starting after reboot - Added by Andrejs Eigus over 7 years ago

Sent this 8 months ago and still experiencing the isue.

Since then I moved redmine to a thin service. Eg I do /etc/init.d/thin.redmine restart to restart redmine now. But after each reboot of the server, redmine would not start automatically.

Could someone please help?


RE: Redmine not starting after reboot - Added by George Notaras over 7 years ago

Hello Andrejs,

Maybe you could try exporting the GEM_HOME and GEM_PATH environment variables in the launcher script:

export GEM_HOME="$(ruby -rubygems -e 'puts Gem.user_dir')" 
export PATH="$GEM_HOME/bin:$HOME/bin:$PATH" 

Maybe you should hard-code the GEM_HOME env variable. I use the above in a launcher script that is run as the user that runs unicorn.