2015-11-17 18 views

回答

-1

我自己找到了答案。 在rc.local文件中,我在下面寫了這個。

#!/bin/bash 
# 
# rc.local 
# 
# This script is executed at the end of each multiuser runlevel. 
# Make sure that the script will "exit 0" on success or any other 
# value on error. 
# 
# In order to enable or disable this script just change the execution 
# bits. 
# 
# By default this script does nothing. 
cd /home/jeff/[email protected] 
source /etc/profile.d/rvm.sh 
source $(rvm 2.1.0 do rvm env --path) 
rvm use 2.1.5 
sh /var/www/[email protected]/rails.sh 

exit 0