I don't understand what's going on here. I can do this in my shell script after installing ruby/rails/rspec/cucumber with RVM then 3x gem install __.
[name@server subapp]$ which ruby
~/.rvm/rubies/ruby-2.0.0-p481/bin/ruby
[name@server subapp]$ which rails
~/.rvm/gems/ruby-2.0.0-p481/bin/rails
[name@server subapp]$ which rspec
~/.rvm/gems/ruby-2.0.0-p481/bin/rspec
[name@server subapp]$ which cucumber
~/.rvm/gems/ruby-2.0.0-p481/bin/cucumber
[name@server subapp]$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [x86_64-linux]
[name@server subapp]$ rails -v
Rails 4.1.6
[name@server subapp]$ rspec -v
3.1.2
[name@server subapp]$ cucumber --version
1.3.16
Then I open a new shell window, and I source ~/.bashrc and say which ruby.
[name@server rubyDev]$ source ~/.bashrc
[name@server rubyDev]$ which ruby
/usr/bin/which: no ruby in (/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/name/.rvm/bin:/home/name/.rvm/bin:/home/name/.rvm/bin:/home/name/.rvm/bin)
[name@deliv rubyDev]$ ruby -v
-bash: ruby: command not found
Oh, and cucumber doesn't work, even before I open a new shell window. That looks like this: http://pastebin.com/WvMy6gQu ... I feel like a lot of things are going wrong with my install, but I don't know what or how to mend it. I installed this all yesterday and cucumber was working, I open the shell and it acts like it's never had cucumber or even ruby installed.
System info Centos 6.5 via ssh.
rvm info: ruby-2.1.2: system: uname: "Linux deliv.dev.corp.lyris.com 2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux" system: "centos/6/x86_64" bash: "/bin/bash => GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu) " zsh: " => not installed" rvm: version: "rvm 1.25.30 (stable) by Wayne E. Seguin , Michal Papis [https://rvm.io/]" updated: "1 hour 12 minutes 42 seconds ago" path: "/home/name/.rvm" ruby: interpreter: "ruby" version: "2.1.2p95" date: "2014-05-08" platform: "x86_64-linux" patchlevel: "2014-05-08 revision 45877" full_version: "ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]" homes: gem: "/home/name/.rvm/gems/ruby-2.1.2" ruby: "/home/name/.rvm/rubies/ruby-2.1.2" binaries: ruby: "/home/name/.rvm/rubies/ruby-2.1.2/bin/ruby" irb: "/home/name/.rvm/rubies/ruby-2.1.2/bin/irb" gem: "/home/name/.rvm/rubies/ruby-2.1.2/bin/gem" rake: "/home/name/.rvm/gems/ruby-2.1.2/bin/rake" environment: PATH: "/home/name/.rvm/gems/ruby-2.1.2/bin:/home/name/.rvm/gems/ruby-2. 1.2@global/bin:/home/name/.rvm/rubies/ruby-2.1.2/bin:/usr/bin:/bin:/usr/sbin:/sbin:/hom e/name/.rvm/bin:/home/name/.rvm/bin:/usr/local/sbin:/home/name/.rvm/bin" GEM_HOME: "/home/name/.rvm/gems/ruby-2.1.2" GEM_PATH: "/home/name/.rvm/gems/ruby-2.1.2:/home/name/.rvm/gems/ruby-2.1.2@ global" MY_RUBY_HOME: "/home/name/.rvm/rubies/ruby-2.1.2" IRBRC: "/home/name/.rvm/rubies/ruby-2.1.2/.irbrc" RUBYOPT: "" gemset: ""
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
export PATH="$HOME/.rvm/rubies/ruby-2.0.0-p481/bin:$PATH" #hack-fix
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
rvm info
to your question by editing it and copy/pasting that information. How did you install RVM and what instructions did you follow? Have you read through the official RVM installation page and followed the troubleshooting tips? – the Tin Man/etc/profile.d/rvm.sh
or something similar to it is not being loaded when your shell starts. Without that RVM doesn't work. – tadman