宝石安装 - 权限被拒绝@ dir_s_mkdir

时间:2014-09-20 13:15:01

标签: ruby gem neat

我正在尝试安装一些宝石,特别是Bourbon和Neat。当试图安装Neat时,似乎安装得很好。但是当我运行neat -vneat install时,我收到此错误。

/Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tmpdir.rb:85:in `mkdir': ERROR: Failed to build gem native extension. (Gem::Ext::BuildError)

    Permission denied @ dir_s_mkdir - ./.gem.20140920-60083-s3sack

Gem files will remain installed in /Users/raph/.rvm/gems/ruby-2.1.1@global/gems/json-1.5.5 for inspection.
Results logged to /Users/raph/.rvm/gems/ruby-2.1.1@global/extensions/x86_64-darwin-14/2.1.0-static/json-1.5.5/gem_make.out
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tmpdir.rb:85:in `block in mktmpdir'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tmpdir.rb:142:in `create'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/tmpdir.rb:85:in `mktmpdir'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/ext_conf_builder.rb:14:in `build'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:161:in `block (2 levels) in build_extension'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `chdir'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:160:in `block in build_extension'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `synchronize'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:159:in `build_extension'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:198:in `block in build_extensions'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `each'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/ext/builder.rb:195:in `build_extensions'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:1436:in `block in build_extensions'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/user_interaction.rb:45:in `use_ui'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:1434:in `build_extensions'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/stub_specification.rb:60:in `build_extensions'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/basic_specification.rb:56:in `contains_requirable_file?'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:925:in `block in find_inactive_by_path'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:924:in `each'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:924:in `find'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/specification.rb:924:in `find_inactive_by_path'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems.rb:185:in `try_activate'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
    from /Users/raph/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /Users/raph/.rvm/gems/ruby-2.1.1@global/gems/rubygems-bundler-1.4.3/lib/rubygems_executable_plugin.rb:4:in `block in <top (required)>'
    from /Users/raph/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `call'
    from /Users/raph/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:50:in `block in run'
    from /Users/raph/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `each'
    from /Users/raph/.rvm/gems/ruby-2.1.1@global/gems/executable-hooks-1.3.1/lib/executable-hooks/hooks.rb:49:in `run'
    from /Users/raph/.rvm/gems/ruby-2.1.1/bin/ruby_executable_hooks:10:in `<main>'

我不知道这里发生了什么。如果有人有线索,我会很感激被指向正确的方向。

感谢任何帮助。提前谢谢!

1 个答案:

答案 0 :(得分:1)

您似乎正在使用RVM和RBENV的混合来安装Ruby和您的宝石。大多数用户选择其中一种:您看到的行为很难预测,通常不会被看到。