rbenv Your user account isn't allowed to install to the system Rubygems

 

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.

1
gem list | grep bundler

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

所以解决办法已经明了:

1
2
gem install bundler
rbenv rehash

  

 

posted on   小浪鼓  阅读(728)  评论(0编辑  收藏  举报

编辑推荐:
· 如何在 .NET 中 使用 ANTLR4
· 后端思维之高并发处理方案
· 理解Rust引用及其生命周期标识(下)
· 从二进制到误差:逐行拆解C语言浮点运算中的4008175468544之谜
· .NET制作智能桌面机器人:结合BotSharp智能体框架开发语音交互
阅读排行:
· 后端思维之高并发处理方案
· 千万级大表的优化技巧
· 在 VS Code 中,一键安装 MCP Server!
· 想让你多爱自己一些的开源计时器
· 10年+ .NET Coder 心语 ── 继承的思维:从思维模式到架构设计的深度解析
历史上的今天:
2013-05-30 Rails bug: ROR + A server is already running. Check …/tmp/pids/server.pid. Exiting
< 2025年4月 >
30 31 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 1 2 3
4 5 6 7 8 9 10

导航

统计

点击右上角即可分享
微信分享提示