{"id":7355,"date":"2014-06-07T02:35:48","date_gmt":"2014-06-07T02:35:48","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/errnoeacces-permission-denied-when-running-bundle-and-it-hits-json-1-8-1-pg-0-17-collection-of-common-programming-errors\/"},"modified":"2014-06-07T02:35:48","modified_gmt":"2014-06-07T02:35:48","slug":"errnoeacces-permission-denied-when-running-bundle-and-it-hits-json-1-8-1-pg-0-17-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/06\/07\/errnoeacces-permission-denied-when-running-bundle-and-it-hits-json-1-8-1-pg-0-17-collection-of-common-programming-errors\/","title":{"rendered":"Errno::EACCES: Permission denied when running bundle and it hits json 1.8.1, pg 0.17-Collection of common programming errors"},"content":{"rendered":"<p>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&#8217;t know if that&#8217;s the issue. I&#8217;m still pretty new to debugging environment errors like this.<\/p>\n<p>I&#8217;ve been developing a rails project on Windows and this laptop is a Mac OS X 10.8. I&#8217;ve cloned a GitHub project onto it before and it ran fine. Here&#8217;s the github repo for reference. This project hits an error when I run bundle<\/p>\n<p>The Error<\/p>\n<pre><code>Using rake (10.1.0) \nUsing i18n (0.6.1) \nUsing multi_json (1.8.2) \nUsing activesupport (3.2.13) \nUsing builder (3.0.4) \nUsing activemodel (3.2.13) \nUsing erubis (2.7.0) \nUsing journey (1.0.4) \nUsing rack (1.4.5) \nUsing rack-cache (1.2) \nUsing rack-test (0.6.2) \nUsing hike (1.2.3) \nUsing tilt (1.4.1) \nUsing sprockets (2.2.2) \nUsing actionpack (3.2.13) \nUsing mime-types (1.25) \nUsing polyglot (0.3.3) \nUsing treetop (1.4.15) \nUsing mail (2.5.4) \nUsing actionmailer (3.2.13) \nUsing arel (3.0.2) \nUsing tzinfo (0.3.38) \nUsing activerecord (3.2.13) \nUsing activeresource (3.2.13) \nUsing bundler (1.3.5) \nUsing rack-ssl (1.3.3) \nTheInstalling json (1.8.1) \nErrno::EACCES: Permission denied - \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247\/gems\/json-1.8.1\/.gitignore\nAn error occurred while installing json (1.8.1), and Bundler cannot continue.\nMake sure that `gem install json -v '1.8.1'` succeeds before bundling.\n<\/code><\/pre>\n<p>Ruby Gem Env<\/p>\n<pre><code>Users-MacBook:soundtrackshare user$ gem env\nRubyGems Environment:\n  - RUBYGEMS VERSION: 2.0.6\n  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.3.0]\n  - INSTALLATION DIRECTORY: \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247\n  - RUBY EXECUTABLE: \/Users\/user\/.rvm\/rubies\/ruby-2.0.0-p247\/bin\/ruby\n  - EXECUTABLE DIRECTORY: \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247\/bin\n  - RUBYGEMS PLATFORMS:\n    - ruby\n    - x86_64-darwin-12\n  - GEM PATHS:\n     - \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247\n     - \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247@global\n  - GEM CONFIGURATION:\n     - :update_sources =&gt; true\n     - :verbose =&gt; true\n     - :backtrace =&gt; false\n     - :bulk_threshold =&gt; 1000\n  - REMOTE SOURCES:\n     - https:\/\/rubygems.org\/\n<\/code><\/pre>\n<p>My Path<\/p>\n<pre><code>Users-MacBook:soundtrackshare user$ echo $PATH\n\/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\n<\/code><\/pre>\n<p>Tried adding this to my gemfile<\/p>\n<pre><code>gem 'json', '1.8.0'\n<\/code><\/pre>\n<p>Now I get this new error after bundle update json&#8230; My last project did Postgres only in production too, but I didn&#8217;t see the pg gem when I bundle that one.<\/p>\n<pre><code>You have requested:\n<\/code><\/pre>\n<p>json = 1.8.0<\/p>\n<pre><code>The bundle currently has json locked at 1.8.1.\nTry running `bundle update json`\nRun `bundle install` to install missing gems.\nUsers-MacBook:soundtrackshare user$ bundle update json\nFetching gem metadata from https:\/\/rubygems.org\/...........\nFetching gem metadata from https:\/\/rubygems.org\/..\nResolving dependencies...\nUsing rake (10.1.0) \nUsing i18n (0.6.1) \nUsing multi_json (1.8.2) \nUsing activesupport (3.2.13) \nUsing builder (3.0.4) \nUsing activemodel (3.2.13) \nUsing erubis (2.7.0) \nUsing journey (1.0.4) \nUsing rack (1.4.5) \nUsing rack-cache (1.2) \nUsing rack-test (0.6.2) \nUsing hike (1.2.3) \nUsing tilt (1.4.1) \nUsing sprockets (2.2.2) \nUsing actionpack (3.2.13) \nUsing mime-types (1.25) \nUsing polyglot (0.3.3) \nUsing treetop (1.4.15) \nUsing mail (2.5.4) \nUsing actionmailer (3.2.13) \nUsing arel (3.0.2) \nUsing tzinfo (0.3.38) \nUsing activerecord (3.2.13) \nUsing activeresource (3.2.13) \nUsing bundler (1.3.5) \nUsing rack-ssl (1.3.3) \nUsing json (1.8.0) \nUsing rdoc (3.12.2) \nUsing thor (0.18.1) \nUsing railties (3.2.13) \nUsing rails (3.2.13) \nUsing acts-as-taggable-on (2.4.1) \nUsing atomic (1.1.14) \nUsing bcrypt-ruby (3.1.2) \nUsing sass (3.2.12) \nUsing bootstrap-sass (2.3.2.2) \nUsing cancan (1.6.10) \nUsing coffee-script-source (1.6.3) \nUsing execjs (2.0.2) \nUsing coffee-script (2.2.0) \nUsing coffee-rails (3.2.2) \nUsing orm_adapter (0.4.0) \nUsing thread_safe (0.1.3) \nUsing warden (1.2.3) \nUsing devise (3.1.1) \nUsing faker (1.2.0) \nUsing jquery-rails (3.0.4) \nInstalling pg (0.17.0) \nGem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.\n\n    \/Users\/user\/.rvm\/rubies\/ruby-2.0.0-p247\/bin\/ruby extconf.rb \nchecking for pg_config... yes\nUsing config values from \/usr\/bin\/pg_config\n*** extconf.rb failed ***\nCould not create Makefile due to some reason, probably lack of necessary\nlibraries and\/or headers.  Check the mkmf.log file for more details.  You may\nneed configuration options.\n\nProvided configuration options:\n    --with-opt-dir\n    --without-opt-dir\n    --with-opt-include\n    --without-opt-include=${opt-dir}\/include\n    --with-opt-lib\n    --without-opt-lib=${opt-dir}\/lib\n    --with-make-prog\n    --without-make-prog\n    --srcdir=.\n    --curdir\n    --ruby=\/Users\/user\/.rvm\/rubies\/ruby-2.0.0-p247\/bin\/ruby\n    --with-pg\n    --without-pg\n    --with-pg-config\n    --without-pg-config\n    --with-pg_config\n    --without-pg_config\n    --with-pg-dir\n    --without-pg-dir\n    --with-pg-include\n    --without-pg-include=${pg-dir}\/include\n    --with-pg-lib\n    --without-pg-lib=${pg-dir}\/\n\/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)\nYou have to install development tools first.\n    from \/Users\/user\/.rvm\/rubies\/ruby-2.0.0-p247\/lib\/ruby\/2.0.0\/mkmf.rb:519:in `try_link0'\n    from \/Users\/user\/.rvm\/rubies\/ruby-2.0.0-p247\/lib\/ruby\/2.0.0\/mkmf.rb:534:in `try_link'\n    from extconf.rb:39:in `'\n\n\nGem files will remain installed in \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247\/gems\/pg-0.17.0 for inspection.\nResults logged to \/Users\/user\/.rvm\/gems\/ruby-2.0.0-p247\/gems\/pg-0.17.0\/ext\/gem_make.out\n\nAn error occurred while installing pg (0.17.0), and Bundler cannot continue.\nMake sure that `gem install pg -v '0.17.0'` succeeds before bundling.\n<\/code><\/pre>\n<p>Any clues?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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&#8217;t know if that&#8217;s the issue. I&#8217;m still pretty new to debugging environment errors like this. I&#8217;ve been developing a rails project on Windows and this laptop is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7355","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7355","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7355"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7355\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}