简体   繁体   English

如何正确安装捆绑器(gem)?

[英]How can I properly install bundler (gem)?

Having some serious bundler issues. 存在一些严重的捆绑器问题。

This series of events has been occurring after I installed a gem from the command line. 我从命令行安装了gem之后,就发生了这一系列事件。

I'm using RVM (1.8.7) with a project-specific gemset. 我正在将RVM(1.8.7)与特定于项目的gemset一起使用。 I also have a global gemset. 我也有一个全球性的宝石。

$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
$ 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...
$ bundle install
ERROR: Gem bundler is not installed, run `gem install bundler` first.
$

Any help would be much appreciated so I can get my dev environment back up and running! 任何帮助将不胜感激,所以我可以恢复并运行我的开发环境!

This looks like you did not used rvm installed ruby. 看起来您没有使用rvm安装的ruby。

  1. Start with updating RVM: 从更新RVM开始:

     rvm get stable 
  2. List which rubies are installed: 列出已安装的红宝石:

     rvm list 
  3. Use one of the listed rubies 使用列出的红宝石之一

     rvm use ruby-1.9.3-p448 
  4. Make the ruby default so it is loaded with your shell 将ruby设为默认值,以便它随您的外壳一起加载

     rvm use ruby-1.9.3-p448 --default 

At any point make sure to carefully read the outputs, they will give you information about your system and if it is something is wrong how to fix it. 在任何时候,请确保仔细阅读输出,它们将为您提供有关您的系统的信息,如果出了问题,如何修复它。

尝试使用sudo gem install bundler在计算机的根目录(而不是在rvm中)安装bundler

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM