4

I am trying to install latest version of json using gem bundle install and it results in an error. I am trying to install within aptana studio 3 workspace.

I get the following error - can anyone throw some light on this issue -

Installing json (1.7.5) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

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

After seeing this error I just ran install json and it runs fine but json doesnt seem to install.

-- Sandesh

sandesh sk
  • 41
  • 1
  • 2

2 Answers2

1

I had the same json 1.7.5 error while creating or doing bundle install on a new rails 3.2.9 app on ruby 1.9.3. This is what worked for me:

  1. Get the latest version of Xcode (4.5.2 in my case). Open up Xcode. Go to Preferences. Go to downloads, and click INSTALL on the Command Line Tools.
  2. In your terminal do: rvm reinstall 1.9.3
  3. Create your new rails app, you will get the same json 1.7.5 error, but it's ok. Then open up the app and go to your Gemfile. At the top of the file, change source 'https://rubygems.org' to source 'http://rubygems.org'
  4. run gem install json -v '1.7.5'
  5. run bundle install

This should work, as it did in my case!

gabriel
  • 379
  • 4
  • 8
0

I forgot about it sorry. Please check these questions:

When I try sudo gem install json I get the following error

Why won't bundler install the json 1.7.4 gem on OS X 10.8?

Probably you need to install XCode Command Line tools.

Community
  • 1
  • 1
HungryCoder
  • 7,506
  • 1
  • 38
  • 51