0

For a Rails app, I tried running $ bundle install. But, even after I ran $ gem install bundler, I got the same message.

this is what happened:

Run `bundle install` to install missing gems.
Davids-iMac-2:213calendar davidburton$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
Davids-iMac-2:213calendar davidburton$ gem install bundler
Successfully installed bundler-1.3.5
1 gem installed
Installing ri documentation for bundler-1.3.5...
Installing RDoc documentation for bundler-1.3.5...
Davids-iMac-2:213calendar davidburton$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.

UPDATE1

rvm list

rvm rubies

   ruby-1.9.2-p290 [ x86_64 ]
=* ruby-1.9.3-p374 [ x86_64 ]

# => - current
# =* - current && default
#  * - default
4

1 回答 1

0

检查您的主目录中的~/.bash_profile文件。

如果它存在,并且您不记得创建它,请将其内容复制到该文件并完全~/.bashrc删除。.bash_profile

默认情况下,rvm 会在安装.bash_profile后附加使用 rvm 功能更新路径的命令rvm。Ubuntu,一次只.bash_profile在它存在或不存在.bashrc时使用.bash_profile。这会导致PATH设置不正确,并且即使安装了 gem,也不会检测到它,因为它不在您的路径上。

于 2013-09-13T20:02:56.643 回答