gems, bundle command, and ruby not found in new terminal window

Posted by user3579987 on Stack Overflow See other posts from Stack Overflow or by user3579987
Published on 2014-06-08T02:54:56Z Indexed on 2014/06/08 3:25 UTC
Read the original article Hit count: 148

Filed under:
|
|
|
|

So I installed ruby with rvm, ran a bundle install and installed a bunch of gems, etc. It all works just fine in the original terminal window I did all of this in but I opened up a new terminal window and now I'm getting errors like bundle: command not found and gem command not found.

I tried doing a symbolic link for the gem command but then when I do gem list it displays a much shorter list of my local gems and not at all the ones I need for bundle install. Is there something I need to do to configure bash or rvm so that it recognizes that I did indeed install all the gems I have installed?

name@crunchbang:~/ug_research_portal$ which gem
/home/name/.rvm/rubies/ruby-2.1.1/bin/gem
name@crunchbang:~/ug_research_portal$ which ruby
/home/name/.rvm/rubies/ruby-2.1.1/bin/ruby

And in ~/.bashrc:

GEM_HOME="/home/name/.rvm/gems/ruby-2.1.1"
GEMGLOBAL_HOME="/home/ name/.rvm/gems/ruby-2.1.1@global"

export PATH=$PATH:$GEM_HOME/bin:$GEMGLOBAL_HOME/bin:$HOME/.rvm/bin

Edit:

Looks like my $PATH is somehow wrong?

bash: /home/name/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/name/.rvm/gems/ruby-2.1.1/bin:/home/name/.rvm/gems/ruby-2.1.1@global/bin:/home/name/.rvm/bin/: No such file or directory

which is odd since ls for /home/name/.rvm/bin and /home/name/.rvm/gems/ruby-2.1.1@global/bin and /home/name/.rvm/gems/ruby-2.1.1/bin work just fine

Psych, I was just doing $PATH instead of echo "$PATH" which was giving me the No such file or directory error. The original problem still stands though.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about bash