Friday, 14 April 2017

// // Leave a Comment

An error occurred while installing json (1.8.1), and Bundler cannot continue.

Not able to install gem json -v '1.8.1'

Install json gem on Ubuntu

When you install bundler using apt-get repository of ubuntu, it does not install latest version of bundler. It causes trouble sometimes with some gems installation process. One scenario is described below:

If you have some gems defined in your Gemfile that have dependency over json gem, then while running 

$ bundle install

you may encounter following error:

DEBUG [gk760254] An error occurred while installing json (1.8.1), and Bundler cannot continue.
DEBUG [gk760254] Make sure that `gem install json -v '1.8.1'` succeeds before bundling.

To solve this error follow:

$ bundle update
$ bundle install

First command will update the version of bundle which will solve the error and you will be able to install all required gems successfully.

0 comments:

Post a Comment