Errno :: EACCES:运行捆绑软件时权限被拒绝,并且它命中json 1.8.1,pg 0.17 [英] Errno::EACCES: Permission denied when running bundle and it hits json 1.8.1, pg 0.17

查看:171
本文介绍了Errno :: EACCES:运行捆绑软件时权限被拒绝,并且它命中json 1.8.1,pg 0.17的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚买了一台新笔记本电脑,并使用Migration Assistant完全传输了所有内容.似乎一切正常,并处于适当的位置,所以我不知道这是否是问题.对于调试此类环境错误,我还是很陌生.

I just got a new laptop and fully transferred everything using Migration Assistant. It seems like everything works normally and is in its proper place, so I don't know if that's the issue. I'm still pretty new to debugging environment errors like this.

我一直在Windows上开发Rails项目,这台笔记本电脑是Mac OS X 10.8.我之前已经在其上克隆了一个GitHub项目,并且运行良好.这是 github存储库供参考.我运行捆绑软件

I've been developing a rails project on Windows and this laptop is a Mac OS X 10.8. I've cloned a GitHub project onto it before and it ran fine. Here's the github repo for reference. This project hits an error when I run bundle

错误

Using rake (10.1.0) 
Using i18n (0.6.1) 
Using multi_json (1.8.2) 
Using activesupport (3.2.13) 
Using builder (3.0.4) 
Using activemodel (3.2.13) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.13) 
Using mime-types (1.25) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.13) 
Using arel (3.0.2) 
Using tzinfo (0.3.38) 
Using activerecord (3.2.13) 
Using activeresource (3.2.13) 
Using bundler (1.3.5) 
Using rack-ssl (1.3.3) 
TheInstalling json (1.8.1) 
Errno::EACCES: Permission denied - /Users/user/.rvm/gems/ruby-2.0.0-p247/gems/json-1.8.1/.gitignore
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

Ruby Gem Env

Ruby Gem Env

Users-MacBook:soundtrackshare user$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.0.6
  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.3.0]
  - INSTALLATION DIRECTORY: /Users/user/.rvm/gems/ruby-2.0.0-p247
  - RUBY EXECUTABLE: /Users/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/user/.rvm/gems/ruby-2.0.0-p247/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-12
  - GEM PATHS:
     - /Users/user/.rvm/gems/ruby-2.0.0-p247
     - /Users/user/.rvm/gems/ruby-2.0.0-p247@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/

我的路径

Users-MacBook:soundtrackshare user$ echo $PATH
/Users/user/.rvm/gems/ruby-2.0.0-p247/bin:/Users/user/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/user/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/user/.rvm/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

试图将其添加到我的宝石文件中

Tried adding this to my gemfile

gem 'json', '1.8.0'

现在,在捆绑更新json之后,我得到了这个新错误...我的上一个项目也只在生产中使用了Postgres,但是当我将那个捆绑在一起时却没有看到pg gem.

Now I get this new error after bundle update json... My last project did Postgres only in production too, but I didn't see the pg gem when I bundle that one.

You have requested:

json = 1.8.0

json = 1.8.0

The bundle currently has json locked at 1.8.1.
Try running `bundle update json`
Run `bundle install` to install missing gems.
Users-MacBook:soundtrackshare user$ bundle update json
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0) 
Using i18n (0.6.1) 
Using multi_json (1.8.2) 
Using activesupport (3.2.13) 
Using builder (3.0.4) 
Using activemodel (3.2.13) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.5) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.4.1) 
Using sprockets (2.2.2) 
Using actionpack (3.2.13) 
Using mime-types (1.25) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.5.4) 
Using actionmailer (3.2.13) 
Using arel (3.0.2) 
Using tzinfo (0.3.38) 
Using activerecord (3.2.13) 
Using activeresource (3.2.13) 
Using bundler (1.3.5) 
Using rack-ssl (1.3.3) 
Using json (1.8.0) 
Using rdoc (3.12.2) 
Using thor (0.18.1) 
Using railties (3.2.13) 
Using rails (3.2.13) 
Using acts-as-taggable-on (2.4.1) 
Using atomic (1.1.14) 
Using bcrypt-ruby (3.1.2) 
Using sass (3.2.12) 
Using bootstrap-sass (2.3.2.2) 
Using cancan (1.6.10) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.2) 
Using coffee-script (2.2.0) 
Using coffee-rails (3.2.2) 
Using orm_adapter (0.4.0) 
Using thread_safe (0.1.3) 
Using warden (1.2.3) 
Using devise (3.1.1) 
Using faker (1.2.0) 
Using jquery-rails (3.0.4) 
Installing pg (0.17.0) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /Users/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb 
checking for pg_config... yes
Using config values from /usr/bin/pg_config
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
    --with-pg
    --without-pg
    --with-pg-config
    --without-pg-config
    --with-pg_config
    --without-pg_config
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/
/Users/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0'
    from /Users/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:534:in `try_link'
    from extconf.rb:39:in `<main>'


Gem files will remain installed in /Users/user/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.0 for inspection.
Results logged to /Users/user/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.0/ext/gem_make.out

An error occurred while installing pg (0.17.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.17.0'` succeeds before bundling.

有任何线索吗?

推荐答案

您可能需要安装Xcode控制台工具,而这至少是我遇到的问题.

You probably need to install the Xcode console tools, atleast that was the problem I had.

您可以通过运行以下操作来实现:

you can do this by running:

xcode-select --install

有关更多信息,请参见此链接

See this link for more information

在Mavericks上安装Rails

这篇关于Errno :: EACCES:运行捆绑软件时权限被拒绝,并且它命中json 1.8.1,pg 0.17的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆