2

I have a redmine script in /etc/init.d/ folder which was working fine before I broke the ruby and rails packages link. Then I played with ruby gems and finally fixed the broken links. Then I tried to restart redmine script, But strangely, I got the below error

sudo service redmine stop
Shutting down redmine: /etc/init.d/redmine: line 49: killproc: command not found

user@studio:~$ sudo service redmine start
Starting redmine: /etc/init.d/redmine: /usr/local/bin/bundle: /usr/local/bin/ruby: bad interpreter: No such file or directory
/etc/init.d/redmine: line 35: echo_failure: command not found
Kenshin
  • 1,030
  • 2
  • 12
  • 41

2 Answers2

1

killproc is part of init.d, so there isn't a missing package at play here. If the process isn't found, it won't run, as well.

However, the next line is more of a red flag. It sounds like your redmine installation is looking for ruby in the incorrect location. This may also be the source of the killproc error as it looks like redmine is not starting up properly.

You can get some more information by running which ruby and comparing that to the path that redmine is looking in. Reinstalling redmine may also resolve the path issue automatically since it sounds like you did a reinstall of rails earlier. Good luck.

telemark
  • 448
  • 5
  • 10
1

My question has two answers, telemark already given answer for my 2nd problem ( ie, I had broken ruby links ). I solved path issues by uninstalling all ruby, rails and gem packages and reinstalled using apt repository. using rvm, chruby, etc everything failed when I switch between users. So I thought of going with the system ruby installation, relying on apt. Fortunately brightbox comes to the rescue.

https://www.brightbox.com/blog/2015/01/05/ruby-2-2-0-packages-for-ubuntu/

Using brightbox and apt solved my path issues.

Then, /etc/init.d/functions, this was missing. It says, No such file or directory. I searched in google and found this link

http://www.linuxfromscratch.org/lfs/view/6.4/scripts/apds02.html

I just copy pasted to /etc/init/functions and given execute permission

sudo chmod a+x /etc/init.d/functions

Thats it!.

UPDATE:

I forgot to mention one important thing, some functions like log_end_message, log_progress_message, etc are not available in functions file. So it's better to include . /lib/lsb/init-functions file.

Kenshin
  • 1,030
  • 2
  • 12
  • 41