Clone一个新Rails项目到Mac, bundle install 的时候遇到下面的提示

 

Fetching source index from http://rubygems.org/ Your user account isn't allowed to install to the system Rubygems. You can cancel this installation and run: bundle install --path vendor/bundle to install the gems into ./vendor/bundle/, or you can enter your password and install the bundled gems to Rubygems using sudo. Password:

 

也就是说,rbenv 要往你系统的自带Ruby里面安装gem.

gem list | grep bundler

用上面的命令看看你是否通过rbenv安装了bundler. 如果没有那就对了,所以只能去找系统的ruby了,那么你可能不希望这样。

所以解决办法已经明了:

gem install bundler
rbenv rehash

  

 

相关文章:

  • 2021-05-06
  • 2022-12-23
  • 2022-12-23
  • 2021-06-13
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
猜你喜欢
  • 2022-12-23
  • 2021-06-16
  • 2022-02-17
  • 2021-09-27
  • 2021-12-18
  • 2022-01-23
相关资源
相似解决方案