3
  1. I am getting Bundle Updated when I run bundle update
  2. Json 1.8.6 is installed.
  3. But when I run jekyll build, I get this error:

    WARN: Unresolved specs during Gem::Specification.reset: listen (< 3.1, ~> 3.0) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.14.5/lib/bundler/runtime.rb:40:in block in setup': You have already activated json 2.0.2, but your Gemfile requires json 1.8.6. Prependingbundle exec` to your command may solve this. (Gem::LoadError)

1
  • As the warning suggest you can prepend bundle exec to your command Commented Feb 23, 2017 at 7:11

1 Answer 1

4

Seems like you have multiple versions of json installed and the wrong version is being used

Prepending bundle exec to your command may solve this.

As the warning suggest you can add bundle exec before your command. This will make sure to use the Gem versions mentioned in your Gemfile.

bundle exec jekyll build 

and

bundle exec jekyll serve 
Sign up to request clarification or add additional context in comments.

3 Comments

So, from now on, I can't use bundle serve? Always use exec? It works, though. Thanks.
bundle exec just ensure that the right version of gem will be used
@maximusdooku: alias j='bundle exec jekyll' - lets you "j serve". Much easier!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.