gpt4 book ai didi

ruby-on-rails - rails `bundle install` 尝试在系统范围内安装

转载 作者:太空宇宙 更新时间:2023-11-03 16:19:04 24 4
gpt4 key购买 nike

我不小心运行了 sudo bundle install,现在当我只运行 bundle install 时,我得到一个错误:

Error details:

Errno::EACCES: Permission denied @ rb_sysopen -

这里是环境/ bundler 设置:

Environment

Bundler 1.12.3
Rubygems 2.6.4
Ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]
GEM_HOME /Users/abdulahmad/.rvm/gems/ruby-2.3.0
GEM_PATH /Users/abdulahmad/.rvm/gems/ruby-2.3.0:/Users/abdulahmad/.rvm/gems/ruby-2.3.0@global
RVM 1.27.0 (latest)
Git 2.5.4 (Apple Git-61)
rubygems-bundler (1.4.4)

Bundler settings

orig_path
Set via BUNDLE_ORIG_PATH: "/Users/abdulahmad/.rvm/gems/ruby-2.3.0/bin:/Users/abdulahmad/.rvm/gems/ruby-2.3.0@global/bin:/Users/abdulahmad/.rvm/rubies/ruby-2.3.0/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/abdulahmad/.rvm/bin"
orig_gem_path
Set via BUNDLE_ORIG_GEM_PATH: "/Users/abdulahmad/.rvm/gems/ruby-2.3.0:/Users/abdulahmad/.rvm/gems/ruby-2.3.0@global"

它是否试图安装系统 gems 而不仅仅是我的 Rails 应用程序?我该如何解决这个问题?

最佳答案

更新全局 ruby​​gems :

sudo gem update --system --no-user-install.

或者试试这个:

bundle install --path ~/.gem

其他选项只是卸载 bundler 并重新安装。

关于ruby-on-rails - rails `bundle install` 尝试在系统范围内安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37750780/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com