Ruby on rails 在服务器上安装ruby on rails时出错

Ruby on rails 在服务器上安装ruby on rails时出错,ruby-on-rails,Ruby On Rails,安装rvm后,当我运行此 source$HOME/rvm/scripts/rvm 我犯了一个错误 -bash: /root/rvm/scripts/rvm: No such file or directory 参考: 我找到了答案,但查看了安装的rvmsudo脚本 rvm,下面是一个运行脚本: 请尝试source~/.rvm/scripts/rvm。退出当前的shell,然后重试。它应该可以工作。告诉我您是如何安装RVM的。这是作为root用户还是作为可以访问sudo的用户?请尝试运行此“rv

安装rvm后,当我运行此

source$HOME/rvm/scripts/rvm

我犯了一个错误

-bash: /root/rvm/scripts/rvm: No such file or directory
参考:

我找到了答案,但查看了安装的rvmsudo脚本 rvm,下面是一个运行脚本:


请尝试source~/.rvm/scripts/rvm。退出当前的shell,然后重试。它应该可以工作。

告诉我您是如何安装RVM的。这是作为
root
用户还是作为可以访问sudo的用户?请尝试运行此“rvm-v”,并显示output.root用户和Wayne E.Seguin,Michal Papis编写的“rvm-v”的输出
rvm 1.22.3(稳定)[https://rvm.io/]
#!/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}"