2013-10-24 2 views
4

방금 ​​새 노트북이 생겨서 마이그레이션 지원을 사용하여 모든 것을 완전히 전송했습니다. 모든 것이 정상적으로 작동하고 적절한 위치에있는 것처럼 보이므로 그게 문제인지는 알 수 없습니다. 나는 아직도 이와 같은 환경 오류를 디버깅하는 데있어 새로운 경험이있다.Errno :: EACCES : 번들을 실행할 때 사용 권한이 거부되고 json 1.8.1, pg에 도달했습니다. 0.17

저는 Windows에서 레일 프로젝트를 개발 해왔고이 랩톱은 Mac OS X 10.8입니다. 이전에 GitHub 프로젝트를 복제했고 정상적으로 실행되었습니다. 참고 용으로 github repo입니다. 이 프로젝트는 내가 실행할 때 오류 안타 번들

오류

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. 

루비 보석 봉투

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/[email protected] 
    - 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/[email protected]/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 

내 gemfile이 추가 시도 내 경로

gem 'json', '1.8.0' 

번들 업데이트 json 이후에이 새로운 오류가 발생했습니다. 마지막 프로젝트는 Postgres를 생산에만 사용했으나이 패키지를 번들로 만들 때 pg 보석을 보지 못했습니다.

You have requested: 

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. 

모든 단서는?

+0

희망 http://stackoverflow.com/questions/9668753/rails이 링크를 참조하십시오 -3-cant-install-pg-gem – LHH

답변

8

Xcode 콘솔 도구를 설치해야합니다. 적어도 내가 가지고있는 문제였습니다.

다음을 실행하여이 작업을 수행 할 수 있습니다

xcode-select --install 

자세한 내용이 도움이 될 것입니다

Installing Rails on Mavericks

+0

다행 이걸 발견했습니다. 감사. – Gowiem

+0

이것은 올바른 대답으로 플래그되어야합니다. –

+0

필자가이 문제를 해결했는지 (필자는 필자가 필요로하는 모든 xcode 설치/툴킷을 이미 수행 한 것으로 생각 했음)이를 테스트했지만 필자는 대답 – Mpron

관련 문제