Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while installing rails json gem - bundler cannot continue

I'm having problems with the Rails installation on Windows. It cannot install the json gem, with the error message below.

      create  test/integration/.keep
      create  test/test_helper.rb
      create  tmp/cache
      create  tmp/cache/assets
      create  vendor/assets/javascripts
      create  vendor/assets/javascripts/.keep
      create  vendor/assets/stylesheets
      create  vendor/assets/stylesheets/.keep
         run  bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...........
Using rake 10.4.2
Using i18n 0.7.0

Gem::InstallError: The 'json' native gem requires installed build tools.

Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
like image 822
Sandro Palmieri Avatar asked Jun 10 '15 06:06

Sandro Palmieri


2 Answers

Run this command-

sudo apt-get install libgmp-dev
like image 199
Mashpy Rahman Avatar answered Nov 08 '22 04:11

Mashpy Rahman


From reading the error screenshot, it seems as if your system is missing the necessary build tools required by some native C/C++ extensions.

You can try installing the RubyInstaller Development Kit. This toolkit helps with using native C/C++ extensions for Ruby on your Windows machine.

Installation instructions can be found here.

After it's installed, run gem update --system, then try again.

Hope this helps!

like image 5
Zoran Avatar answered Nov 08 '22 04:11

Zoran