I installed RVM using the single instruction mentioned at the RVM website (using git).
Then I installed Ruby version 1.9.2 and 1.8.7 using:
rvm install 1.9.2
rvm install 1.8.7
However, I cannot find the Ruby binary. When I try to execute the command, I get the following error:
[root@server1 support]# rvm use 1.9.2
Using /usr/local/rvm/gems/ruby-1.9.2-p136
[root@server1 support]# ruby
-bash: ruby: command not found
Here is the output of rvm info:
[root@server1 support]# rvm info
system:
system:
uname: "Linux server1.myserver.com 2.6.18-194.26.1.el5.028stab070.14 #1 SMP Thu Nov 18 16:34:01 MSK 2010 x86_64 x86_64 x86_64 GNU/Linux"
bash: "/bin/bash => GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)"
zsh: " => not installed"
rvm:
version: "rvm 1.2.6 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"
homes:
gem: "not set"
ruby: "not set"
binaries:
ruby: ""
irb: ""
gem: ""
rake: ""
environment:
PATH: "/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: ""
IRBRC: ""
RUBYOPT: ""
gemset: ""
[root@server1 support]#
RVM requires a minor addition to your
~/.bashrcor~/.bash_profileto initialize it when you log-in. It is specified in the installation docs in the Post Install section. Did you do that?Per your
rvm infooutput, it looks like you haven’t completed your installation. All the entries in the output should have corresponding values. So, I suspect you haven’t added:to your
~/.bashrcor~/.bash_profileand then started a new session.If you are doing a “Multi-User” installation then you’ll need to do a lot more. Have you modified
/etc/profile, or, if you are using Bash as your shell, have you modified/etc/bash.bashrcto include:and started a new shell?
Personally I don’t like the multi-user install as much as the single-user install, and don’t recommend it but your mileage might vary.
As a FYI: In a discussion with the RVM maintainers on IRC last year, they told me they do not recommend the system-wide installation, and instead recommend the local “single-user” installation, even for servers.