[英]Error while installing ruby on rails on server
当我运行这个安装rvm后
source $HOME/rvm/scripts/rvm
我得到错误
-bash: /root/rvm/scripts/rvm: No such file or directory
参考: 部署Ruby + RVM和daemontools时出现问题
我找到了答案,但查看了与rvm一起安装的rvmsudo脚本,这是一个有效的运行脚本:
#!/bin/sh
# redirect stderr to stdout
exec 2>&1
cd /app
# load rvm
. /usr/local/rvm/scripts/rvm
# select ruby version for this application
rvm use 1.9.1
# # depending on your configuration you may need to provide the absolute path to rvm, like that:
# /usr/local/bin/rvm use 1.9.1
# build the exec command line preserving the rvm environment
command="exec sudo -u app_user /usr/bin/env PATH='$PATH'"
[[ -n "${GEM_HOME:-}" ]] && command="${command} GEM_HOME='$GEM_HOME' "
[[ -n "${GEM_PATH:-}" ]] && command="${command} GEM_PATH='$GEM_PATH' "
# this is where your real command line goes
command="${command} ruby main.rb"
# run the application
eval "${command}"
尝试使用源代码〜/ .rvm / scripts / rvm。 退出当前的shell,然后重试它应该可以工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.