An Error Occurred While Installing Json 1 8 2 and Bundler Cannot Continue Windows

Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Iris Avalon

Having trouble with bundle install asking for json 1.8.6

Hey everyone,

I'm trying to set up by ruby on rails development environment and I got up the the point where I created a test app (ruby new testapp).

After that was done I used cd testapp and tried running the bin/rails server line.

It spit out an error telling me "Could not find gem 'sdoc ( >= 0) ruby' in the gems available on this machine. Run bundle install to install missing gems.

So I ran bundle install afterwards. It seems to work okay at first, but in the middle of the process I get an error. It tells me it "Failed to build gem native extension" and near the bottom of this error it says Make sure that 'gem install json -v '1.8.6' succeeds before bundling

So then I ran sudo gem install json -v '1.8.6' since just gem instal blah blah blah gave me a write permission error. This also pops out a neat little error that I saw before saying it failed to build gem native extension.

So now I'm completely out of ideas. I'm not really sure what I'm supposed to do next.

My ruby version is 2.0.0p247

bundler version 1.6.2

Help please? :)

5 Answers

Neil Northrop

Neil Northrop

Hey Raven,

After you ran sudo gem install json -v '1.8.6', what was the error output the console gave you? Will you toss that up here in a reply?

Thanks!

Iris Avalon

Hey Neil,

Here is what gets outputted when I run the gem install:

Building native extensions. This could take a while... ERROR: Error installing json: 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 /Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection. Results logged to /Library/Ruby/Gems/2.0.0/gems/json-1.8.1/ext/json/ext/generator/gem_make.out

I hope that helps! I really can't wait to start learning Rails :)

Thanks for the reply by the way!

EDIT: Sorry, I said I ran 1.8.6 in the first post, but I meant to say 1.8.1 for the json gem

Iris Avalon

Hello again :)

I gave that a try, and after running the xcode line it told me that xcode-select requires the command line developer tools and asked me if I'd like to install those now. I clicked yes, it agree, and let it go through its process. Once it finished, the download window disappeared and the command had seemed to finish. I tried to sudo gem install json -v '1.8.1' again but the same error occurred. Bundle install is still tossing up the same error on the json file again as well :(

I had tried running the xcode command again just in case it hadn't finished what it was doing. The same prompt telling me it needed the command line developer tools came up again and asked me to install once more. I clicked yes just to see what would happen. It starts the process but then stops suddenly saying it can't install software because it is not currently available from the Software Update Service. There was also a button when it asked to install the tools that said, "Get xcode", which I clicked after trying this again. It brings up the app store but it shows me that xcode is already installed.

I'm not sure if it was something on my end, but it seems I'm still stuck here :( Sorry!

Iris Avalon

Hey again.

Was browsing around and decided to see if I could find another solution. After a while I decided to just reinstall rbenv, ruby, rails, bundler, sqlite3 and try again. So I updated my rails from 2.0.0 to 2.1.1 went through all the jigga-ma-roll, and now suddenly I am able to launch my rails server without it asking me to bundle install first. I'm not super sure what the difference was, but apparently this time my macbook likes me :)

Thanks for the help anyway! I'm glad someone was trying to lend me a hand :)

palmerints1937.blogspot.com

Source: https://teamtreehouse.com/community/having-trouble-with-bundle-install-asking-for-json-186

0 Response to "An Error Occurred While Installing Json 1 8 2 and Bundler Cannot Continue Windows"

Enviar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel