Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't install json 1.8 gem on Mac OS X 10.8.4
    primarykey
    data
    text
    <p>I'm trying to to install my rails app on a second computer. But when I run <code>bundle install</code> I get an error with the json gem:</p> <pre><code>Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/feuerball/.rvm/rubies/ruby-2.0.0-p195/bin/ruby extconf.rb /Users/feuerball/.rvm/rubies/ruby-2.0.0-p195/bin/ruby: invalid option -D (-h will show valid options) (RuntimeError) Gem files will remain installed in /Users/feuerball/.rvm/gems/ruby-2.0.0-p195/gems/json-1.8.0 for inspection. Results logged to /Users/feuerball/.rvm/gems/ruby-2.0.0-p195/gems/json-1.8.0/ext/json/ext/generator/gem_make.out An error occurred while installing json (1.8.0), and Bundler cannot continue. Make sure that `gem install json -v '1.8.0'` succeeds before bundling. </code></pre> <p>The computer runs Mac OS X 10.8.4 with Xcode 4.6.3 and the latest command line tools.</p> <p>I installed the latest ruby using rvm:</p> <pre><code>$ rvm -v rvm 1.21.2 (stable) by Wayne E. Seguin &lt;wayneeseguin@gmail.com&gt;, Michal Papis &lt;mpapis@gmail.com&gt; [https://rvm.io/] $ ruby -v ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0] $ gem -v 2.0.3 </code></pre> <p>When I try to install the json gem using <code>gem install json</code> I get almost the same error:</p> <pre><code>Building native extensions. This could take a while... ERROR: Error installing json: ERROR: Failed to build gem native extension. /Users/feuerball/.rvm/rubies/ruby-2.0.0-p195/bin/ruby extconf.rb /Users/feuerball/.rvm/rubies/ruby-2.0.0-p195/bin/ruby: invalid option -D (-h will show valid options) (RuntimeError) Gem files will remain installed in /Users/feuerball/.rvm/gems/ruby-2.0.0-p195/gems/json-1.8.0 for inspection. Results logged to /Users/feuerball/.rvm/gems/ruby-2.0.0-p195/gems/json-1.8.0/ext/json/ext/generator/gem_make.out </code></pre> <p>Trying to install using <code>sudo</code> does not change anything.</p> <p>I uninstalled and reinstalled homebrew, rvm, ruby &amp; the command line tools but nothing helps.</p> <p><strong>Update</strong></p> <p>Contentent of <code>/Users/feuerball/.rvm/gems/ruby-2.0.0-p195/gems/json-1.8.0/ext/json/ext/generato‌​r/gem_make.out</code>:</p> <pre><code>/Users/feuerball/.rvm/rubies/ruby-2.0.0-p195/bin/ruby extconf.rb /Users/feuerball/.rvm/rubies/ruby-2.0.0-p195/bin/ruby: invalid option -D (-h will show valid options) (RuntimeError) </code></pre> <p>GCC Version:</p> <pre><code>$ gcc -v Using built-in specs. Target: i686-apple-darwin11 Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.11~182/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1 Thread model: posix gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) </code></pre> <p><strong>Update 2</strong></p> <p>I did a fresh install of OS X, Xcode, Command Line Tools, Homebrew, rvm and Ruby. Ruby is now patch level 247 and the damn problem is still there. What a waste of time... If it is important: rvm installed json 1.7.7 together with ruby</p> <p><strong>Update 3</strong></p> <p>Seems that my machine fails on all native extensions. <code>gem install bcrypt-ruby</code> gives the same error message.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload