rails`bundall`试图安装系统

时间:2016-06-10 14:28:58

标签: ruby-on-rails ruby

我不小心跑了sudo bundle install,现在我只跑bundle install时收到错误:

  

错误详情:

     

Errno :: EACCES:权限被拒绝@ rb_sysopen -

这是环境/捆绑设置:

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"

是否尝试安装系统宝石而不仅仅是我的rails应用程序?我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

Update the global rubygems with :

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

Or try this:

bundle install --path ~/.gem

Other option is just uninstall bundler and install it again.