我刚刚安装了一个ubuntu服务器,需要部署一个小型rails应用程序。我在用米娜。
当我执行"mina安装程序“时,下面的代码会给我一条消息(您可以在代码下面找到它),但是安装过程成功地完成了。
deploy.rb
task :environment do
invoke :'rvm:use[ruby-2.2.2@default]'
end-
$ rvm use "ruby-2.2.2@default" --create
RVM is not a function, selecting rubies with 'rvm use ...' will not work.
You need to change your terminal emulator preferences to allow login shell.
Sometimes it is required to use `/bin/bash --login` as the command.
Please visit https://rvm.io/integration/gnome-terminal/ for an example.我怎样才能摆脱这条信息?
我发现了一些类似的话题,但这并没有解决我的问题。
这里是我安装rvm的方式:
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | sudo bash -s stable
$ sudo usermod -a -G rvm `whoami`ps
在安装过程中,我使用了以下文章中的信息:
在数字海洋上设置Ruby on Rails
我注意到第二篇文章中的deploy.rb有.bash_profile。我没有这个文件(只有.profile)
task :environment do
queue 'source ~/.bash_profile'
# For those using RVM, use this to load an RVM version@gemset.
invoke :'rvm:use[ruby-2.1.4]'
end发布于 2015-08-10 14:46:11
这很可能是因为rvm仍然没有加载到bash。使用以下方法加载它:
source ~/.rvm/scripts/rvm 其次是:
rvm use "ruby-2.2.2@default" --create永久的修复方法是在~/.bashrc中添加以下行:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"https://stackoverflow.com/questions/31922488
复制相似问题