Reputation: 2417
hi i need to execute a ruby program from a init script i need to run the script as
sudo /etc/bin/differ.sh start
but the problem is rvm is not installed on root(super user) . so code in the differ script ruby "filename" wont execute because the gems and rvm is not installed in root.
i need solve how to add rvm and its gems to root (i have not installed by system wide installation).i have even tried the rvmsudo
rvmsudo ruby "filename"
but it's not working in script works good in terminal. please free to ask any files or outputs i will post along with this question.
Upvotes: 0
Views: 118
Reputation: 54704
This page on integrating RVM with init.d may help: https://rvm.io/integration/init-d
Upvotes: 1