Skip to content

Instantly share code, notes, and snippets.

@dblooman
Created March 17, 2014 00:02
Show Gist options
  • Select an option

  • Save dblooman/9591731 to your computer and use it in GitHub Desktop.

Select an option

Save dblooman/9591731 to your computer and use it in GitHub Desktop.

source /usr/local/opt/chruby/share/chruby/chruby.sh source /usr/local/opt/chruby/share/chruby/auto.sh

@Crystalh

Copy link
Copy Markdown

Thanks, I ran this but still getting the same error when I run bundle install. Always errors when installing the json gem. Here it is in full:

~/projects ❯❯❯ bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Using rake (10.1.1)
Using activesupport (3.0.0)
Using active_support (3.0.0)
Using addressable (2.3.5)
Using dalli (2.7.0)

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
creating Makefile

make "DESTDIR="
compiling generator.c
linking shared-object json/ext/generator.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [generator.bundle] Error 1


Gem files will remain installed in /Users/crystalhirschorn/.bundler/tmp/716/gems/json-1.8.1 for inspection.
Results logged to /Users/crystalhirschorn/.bundler/tmp/716/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
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.

@dblooman

Copy link
Copy Markdown
Author

After you changed your path, then check which bundle. Assuming that now shows the /.gem/ now, you will need to install bundler as it will still be using system bundler.

@dblooman

Copy link
Copy Markdown
Author

Then run bundle install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment