Reputation: 2470
I've just setup an ubuntu server and need to deploy a small rails app. I'm using mina.
When I execute "mina setup", the following part of the code gives me a message(you can find it below the code) But the setup process finishes successfully.
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.
How can I get rid of this message?
I found a few similar topics but it didn't solve my problem.
here's how I installed 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
For the setup process I used info from the following articles:
Setting Up Ruby on Rails On Digital Ocean
I noticed that deploy.rb from second article has .bash_profile. I dont have this file( only .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
Upvotes: 0
Views: 670
Reputation: 16506
This is most probabaly because rvm is still not loaded to your bash. Load it using:
source ~/.rvm/scripts/rvm
followed by:
rvm use "ruby-2.2.2@default" --create
A permanent fix would be to add following line in your ~/.bashrc
:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Upvotes: 1