我正在运行命令
bundle install
在项目文件夹中。在某些项目文件夹中,它会产生错误,而在其他项目文件夹中,它不会产生错误。错误是:
Your user account isn't allowed to install to the system RubyGems
我知道这可以通过遵循推荐的建议来解决:
bundle install --path vendor/bundle
我的问题是为什么行为不一致?
最佳答案
在我的例子中,我按照错误消息的建议解决了问题:
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/
So, instead of:
bundle install
我跑了:
bundle install --path vendor/bundle
这就是 this guy 的解决方案.
该解决方案的缺点是它会在当前文件夹中创建一个vendor
文件夹,如果要通过Git 分发应用程序,可以将其添加到.gitignore
.
关于ruby-on-rails - rails : Your user account isn't allowed to install to the system RubyGems,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42843948/