Cannot start rails from command line with rvm installation

I just did a new installation of rvm with rails on a new Linux Mint machine
I see the rails are set in my gems.

gem query --local *** LOCAL GEMS *** ...other stuff ... rails (3.2.8) ...other stuff ... 

but if I try to start from the console, I do not see it

 $ rails -v The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails 

this is my PATH variable

 /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/motta/.rvm/bin 

What should I add to the rail access path? thanks

UPDATE: This is the output of the rvm list

 rvm rubies =* ruby-1.9.3-p286 [ x86_64 ] # => - current # =* - current && default # * - default 

Installation is performed according to rvm instructions
https://rvm.io/rvm/install/

SOLVE: When I finished the installation, I found out that rvm changed the file /home/user/.bashrc with this line

 PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting 

so I thought that the next one is no longer needed, which is not so.

 [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. 

adding above so that .bashrc solves my problem

+4
source share
2 answers

Your PATH is clearly wrong, make sure you use ruby:

 rvm use 1.9.3 

To make this permanent for the following sessions, set the default value:

 rvm use 1.9.3 --default #OR: rvm alias create default 1.9.3 

Finally, you may need to enable the login shell for it to work (there are already several answers to this topic).

0
source

Source: https://habr.com/ru/post/1440267/


All Articles