Ruby-on-rails – Ruby: “gem install bundler” does not have bundler installed

on-rails – Ruby: “gem install bundler” does not have bundler installed… here is a solution to the problem.

on-rails – Ruby: “gem install bundler” does not have bundler installed

I’m new to Rails and am trying to get the demo application up and running. My Linux system (lubuntu, mostly clean installs) is having trouble running a “bundled install”. Even so, if I close my terminal and start another one, it doesn’t work again. The loop looks like this:

sandbox@75bf7f3:~/railsstuff/sample_app_2nd_ed$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.

sandbox@75bf7f3:~/railsstuff/sample_app_2nd_ed$ gem install bundler
Successfully installed bundler-1.1.4
1 gem installed

sandbox@75bf7f3:~/railsstuff/sample_app_2nd_ed$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.

As far as I know, I’m using the latest version of Ruby, and the rvm seems to be working fine.

Can anyone explain how this is going on?

Solution

I can confirm that this happened in a fresh rvm installation of Linux Mint. I’m using gnome-terminal and I’ve applied the “run commands as login shell” workaround. I’m using ruby 1.9.3 and haven’t done anything with gemsets. When I type “gem list”, I see all the ruby I installed (the first hour I installed the rvm, I installed some projects and it seemed to be in perfect working condition).

It seems to have been added

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

Go to ~/.bashrc to clear the inconsistency. Oddly enough, without it it initially worked just fine … And it should first procure .bash_login….

Related Problems and Solutions