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.


error occurred while installing json (1.8.2) and bundler cannot continue

Hello, i have a problem when i generate the rails app. I use the sane version of ruby and rails of the course build-a-simple-ruby-on-rails-application

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe -r ./siteconf20150330-5036-nrllhf.rb extconf.rb creating Makefile make clean Makefile:165: *** target pattern contains no %'. Stop. make Makefile:165: *** target pattern contains no%'. Stop. make failed, exit code 2 Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.2 for inspection. Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/json-1.8.2/gem_make.out An error occurred while installing json (1.8.2), and Bundler cannot continue. Make sure that gem install json -v '1.8.2' succeeds before bundling.

First you should try

$ sudo gem install json -v '1.8.2'

in my case (Ubuntu 14.04) that didn't work directly and I had to do this:

$ sudo apt-get install ruby-dev

and then I could install the gem and continue. Had one more problem that was fixed by:

$ sudo apt-get install libsqlite3-dev

Hope that helps.