New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jekyll broke after 2.5 upgrade #3084

Closed
nicodev3 opened this Issue Nov 9, 2014 · 44 comments

Comments

Projects
None yet
@nicodev3

nicodev3 commented Nov 9, 2014

I just updated jekyll to the latest 2.5 and when i "jekyll serve" i have the following

WARN: Unresolved specs during Gem::Specification.reset:
      redcarpet (~> 3.1)
      jekyll-watch (~> 1.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.4/lib/mercenary.rb:20:in `program': cannot load such file -- mercenary/program (LoadError)
    from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.0/bin/jekyll:20:in `<top (required)>'
    from /usr/bin/jekyll:23:in `load'
    from /usr/bin/jekyll:23:in `<main>'

What's wrong ?

@ghost

This comment has been minimized.

ghost commented Nov 9, 2014

Same here:

WARN: Unresolved specs during Gem::Specification.reset:
      jekyll-watch (~> 1.1)
      classifier-reborn (~> 2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/x/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/mercenary-0.3.4/lib/mercenary.rb:20:in `program': cannot load such file -- mercenary/program (LoadError)
    from /Users/x/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-2.5.0/bin/jekyll:20:in `<top (required)>'
    from /Users/x/.rbenv/versions/2.1.3/bin/jekyll:23:in `load'
    from /Users/x/.rbenv/versions/2.1.3/bin/jekyll:23:in `<main>'
@nicodev3

This comment has been minimized.

nicodev3 commented Nov 9, 2014

I tried to uninstall and reinstall some gems but had to rollback to jekyll 2.4.0

@LubomirGeorgiev

This comment has been minimized.

LubomirGeorgiev commented Nov 9, 2014

Ref: #3068

Go back to 2.4.0

@parkr

This comment has been minimized.

Member

parkr commented Nov 9, 2014

@LubomirGeorgiev This is a separate issue.

The mercenary/program file is there, so it's not an issue with Jekyll or Mercenary.

It looks like there are conflicting gem versions. If you use Bundler, you should see this problem go away. Otherwise, try gem cleanup.

@parkr parkr closed this Nov 9, 2014

@LubomirGeorgiev

This comment has been minimized.

LubomirGeorgiev commented Nov 9, 2014

Are you going to fix so that it can be used without Bundler?

@parkr

This comment has been minimized.

Member

parkr commented Nov 9, 2014

Are you going to fix so that it can be used without Bundler?

It works fine on my machine without using Bundler, and this is the first I've heard of such an issue. The problem may have to do with the use of $LOAD_PATH in Mercenary, but it's more likely an issue with RubyGems and Kernel#require.

@persand

This comment has been minimized.

persand commented Nov 12, 2014

@nicodev3 @GeneLocklin

Are you using Bundler to manage gems? Then you have to run:

$ bundle exec jekyll s

Not:

$ jekyll s

@nicodev3

This comment has been minimized.

nicodev3 commented Nov 12, 2014

@persand : yes it works this way, thanks

@parkr

This comment has been minimized.

Member

parkr commented Nov 12, 2014

Please update Mercenary to v0.3.5. Does it fix the problem?

@ghost

This comment has been minimized.

ghost commented Nov 13, 2014

@parkr updated to 0.3.5. new error:

WARN: Unresolved specs during Gem::Specification.reset:
      celluloid (>= 0.15.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Users/x/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-2.5.1/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
    from /Users/x/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
    from /Users/x/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/jekyll-2.5.1/bin/jekyll:20:in `<top (required)>'
    from /Users/x/.rbenv/versions/2.1.3/bin/jekyll:23:in `load'
    from /Users/x/.rbenv/versions/2.1.3/bin/jekyll:23:in `<main>'

@persand thanks for the tip. will try and report back as soon as i have a chance.

@internaut

This comment has been minimized.

internaut commented Nov 13, 2014

I can confirm this error. Mercenary 0.3.5. doesn't fix this issue.

@nicodev3

This comment has been minimized.

nicodev3 commented Nov 13, 2014

doesn't fix here.

@parkr

This comment has been minimized.

Member

parkr commented Nov 13, 2014

Can you investigate what's going on with your $LOAD_PATH variable? We use the $LOAD_PATH. Maybe it has to do with this: https://github.com/bundler/bundler/blob/8c7283921ea444528e0bb333efd52ff518a0dbb9/lib/bundler/shared_helpers.rb#L103

@nicodev3

This comment has been minimized.

nicodev3 commented Nov 13, 2014

I am not a ruby specialist, so if someone else find the solution. At this moment i'll stick with bundle exec jekyll serve who is working. Made an alias in my .zshrc file, so it's not annoying

@internaut

This comment has been minimized.

internaut commented Nov 13, 2014

Same with me. Furthermore, bundle exec jekyll serve doesn't work with my installation either. It fails loading mini_magick, which I need in my customized version of the image_tag plugin.
How do I need to set the $LOAD_PATH variable? Is it a shell variable? To which destination do I need to set it?

@parkr

This comment has been minimized.

Member

parkr commented Nov 13, 2014

Nothing you can do about $LOAD_PATH right now – just needs to be preserved in bin/jekyll around the Bundler call. bundle exec should work – do you have mini_magickin your Gemfile?

@DomT4

This comment has been minimized.

DomT4 commented Nov 13, 2014

Same issue here. The latest version of Jekyll absolutely refuses to serve pages. I even removed all the gems I had installed and rebuilt afresh and still hit the same issue.

~> jekyll serve
WARN: Unresolved specs during Gem::Specification.reset:
      redcarpet (~> 3.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
~> redcarpet --version
Redcarpet 3.2.0

bundle exec jekyll serve does seem to work for now.

@internaut

This comment has been minimized.

internaut commented Nov 14, 2014

@parkr Thanks! After modifying my Gemfile, bundle exec ... works for me now, too. Nevertheless, the original bug remains :(

@parkr

This comment has been minimized.

Member

parkr commented Nov 14, 2014

Yep, I figured out why! Working on a fix but the bundler team is so far opaque about it.

@djacquel

This comment has been minimized.

djacquel commented Nov 25, 2014

Same issue here on Ubuntu 14.04, ruby 1.9.3, Jekyll 2.5.x, github-pages 29

/var/lib/gems/1.9.1/gems/jekyll-2.5.2/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
    from /var/lib/gems/1.9.1/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
    from /var/lib/gems/1.9.1/gems/jekyll-2.5.2/bin/jekyll:20:in `<top (required)>'
    from /usr/local/bin/jekyll:23:in `load'
    from /usr/local/bin/jekyll:23:in `<main>'

This is fixed when I delete the Gemfile that is :

source 'https://rubygems.org'
gem 'github-pages'

But even an empty Gemfile makes Jekyll crash.

@parkr

This comment has been minimized.

Member

parkr commented Nov 25, 2014

That's due to the bundler integration... hm. What happens when you have a Gemfile and run bundle exec jekyll build --trace?

@djacquel

This comment has been minimized.

djacquel commented Nov 25, 2014

bundle exec jekyll build --trace build = OK

@arlen43

This comment has been minimized.

arlen43 commented Dec 12, 2014

@DomT4 you can simply uninstall redcarpet 3.2.0 to fix that issue. Prompt has been said.

pketh added a commit to pketh/pketh.github.io that referenced this issue Dec 14, 2014

@sr-murthy

This comment has been minimized.

sr-murthy commented Jan 4, 2015

Hi

I had the same problem (it's OK now!) after I had added a Gemfile to my local static Jekyll site with the content

source 'https://rubygems.org'
require 'json'
require 'open-uri'
versions = JSON.parse(open('https://pages.github.com/versions.json').read)
gem 'github-pages', versions['github-pages']

and ran bundle install, followed by (after a lot of content changes) jekyll build. I got the following error

WARN: Unresolved specs during Gem::Specification.reset:
  redcarpet (~> 3.1)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:21:in `block in <top (required)>': cannot load     such file -- jekyll/version (LoadError)
from /Library/Ruby/Gems/2.0.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
from /Library/Ruby/Gems/2.0.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
from /usr/bin/jekyll:23:in `load'
from /usr/bin/jekyll:23:in `<main>'

Could someone please explain what bundler does, because I'm still not sure, and what its relationship to jekyll is?

Thanks in advance.

yourwebmaker added a commit to yourwebmaker/gaya that referenced this issue Jan 22, 2015

Update README.md
Trying to serve jekyll without `bundle exec` throws an error (jekyll/jekyll#3084)

yourwebmaker added a commit to yourwebmaker/gaya that referenced this issue Jan 22, 2015

Update Rakefile
Trying to serve jekyll without `bundle exec` throws an error (jekyll/jekyll#3084)
@themestechnology

This comment has been minimized.

themestechnology commented Feb 6, 2015

  1. try to install the gem file listed under WARN i.e. gem install redcarpet
  2. delete gemfile.lock
@themestechnology

This comment has been minimized.

themestechnology commented Feb 14, 2015

try npm i and then bundle exec jekyll serve

@ghost

This comment has been minimized.

ghost commented Mar 7, 2015

I have the same problem ,but when I tried gem cleanup and bundle exec jekyll serve ,I got the output.


wapple@wapple-Lenovo-G470:~/Downloads/hpstr-jekyll-theme-master$ gem cleanup
Cleaning up installed gems...
Clean Up Complete
wapple@wapple-Lenovo-G470:~/Downloads/hpstr-jekyll-theme-master$ bundle exec jekyll serve
Could not find gem 'github-pages (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
wapple@wapple-Lenovo-G470:~/Downloads/hpstr-jekyll-theme-master$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll":
  In Gemfile:
    github-pages (>= 0) x64-mingw32 depends on
      jekyll (= 1.1.2) x64-mingw32
    octopress (~> 3.0.0.rc.12) x64-mingw32 depends on
      jekyll (2.5.3)
wapple@wapple-Lenovo-G470:~/Downloads/hpstr-jekyll-theme-master$ 

@themestechnology

This comment has been minimized.

themestechnology commented Mar 8, 2015

Have you tried removing octopress or even removing all gems and starting over.

# gem list --no-version | xargs gem uninstall -aIx
@envygeeks

This comment has been minimized.

Contributor

envygeeks commented Mar 8, 2015

Show us your Gemfile and update your github-pages.

@ghost

This comment has been minimized.

ghost commented Mar 8, 2015

problems solved maybe I should usecd .. to bundle install

@themestechnology

This comment has been minimized.

themestechnology commented Mar 9, 2015

How?

@swirlsnap

This comment has been minimized.

swirlsnap commented Mar 17, 2015

Jekyll broke for me as well, and now its not able to parse my CSS? cryptotap.com -- got the same error as OP -- bundle exec jekyll serve works, but now my whole sites formatting is broken. Funsies.

@parkr

This comment has been minimized.

Member

parkr commented Mar 17, 2015

@swirlsnap Try the latest 3.0 beta.

@chaitanyav

This comment has been minimized.

chaitanyav commented May 2, 2015

I am using jekyll 2.5.3 and it works

Gemfile

source 'https://rubygems.org'

gem 'jekyll'
gem 'kramdown'
gem 'coderay'
gem 'rake'
gem 'thor'
gem 'activesupport'
gem 'stringex'

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    activesupport (4.2.0)
      i18n (~> 0.7)
      json (~> 1.7, >= 1.7.7)
      minitest (~> 5.1)
      thread_safe (~> 0.3, >= 0.3.4)
      tzinfo (~> 1.1)
    blankslate (2.1.2.4)
    celluloid (0.16.0)
      timers (~> 4.0.0)
    classifier-reborn (2.0.3)
      fast-stemmer (~> 1.0)
    coderay (1.1.0)
    coffee-script (2.3.0)
      coffee-script-source
      execjs
    coffee-script-source (1.8.0)
    colorator (0.1)
    execjs (2.2.2)
    fast-stemmer (1.0.2)
    ffi (1.9.6)
    ffi (1.9.6-x86-mingw32)
    hitimes (1.2.2)
    hitimes (1.2.2-x86-mingw32)
    i18n (0.7.0)
    jekyll (2.5.3)
      classifier-reborn (~> 2.0)
      colorator (~> 0.1)
      jekyll-coffeescript (~> 1.0)
      jekyll-gist (~> 1.0)
      jekyll-paginate (~> 1.0)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 1.1)
      kramdown (~> 1.3)
      liquid (~> 2.6.1)
      mercenary (~> 0.3.3)
      pygments.rb (~> 0.6.0)
      redcarpet (~> 3.1)
      safe_yaml (~> 1.0)
      toml (~> 0.1.0)
    jekyll-coffeescript (1.0.1)
      coffee-script (~> 2.2)
    jekyll-gist (1.1.0)
    jekyll-paginate (1.1.0)
    jekyll-sass-converter (1.3.0)
      sass (~> 3.2)
    jekyll-watch (1.2.1)
      listen (~> 2.7)
    json (1.8.2)
    kramdown (1.5.0)
    liquid (2.6.2)
    listen (2.8.5)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
    mercenary (0.3.5)
    minitest (5.5.1)
    parslet (1.5.0)
      blankslate (~> 2.0)
    posix-spawn (0.3.9)
    pygments.rb (0.6.2)
      posix-spawn (~> 0.3.6)
      yajl-ruby (~> 1.2.0)
    rake (10.4.2)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.5)
      ffi (>= 0.5.0)
    redcarpet (3.2.2)
    safe_yaml (1.0.4)
    sass (3.4.10)
    stringex (2.5.2)
    thor (0.19.1)
    thread_safe (0.3.4)
    timers (4.0.1)
      hitimes
    toml (0.1.2)
      parslet (~> 1.5.0)
    tzinfo (1.2.2)
      thread_safe (~> 0.1)
    yajl-ruby (1.2.1)

PLATFORMS
  ruby
  x86-mingw32

DEPENDENCIES
  activesupport
  coderay
  jekyll
  kramdown
  rake
  stringex
  thor

The only thing i did to get around this error was

/usr/local/lib/ruby/2.2.0/fileutils.rb:1450:in `unlink': Operation not permitted @ unlink_internal - /Users/nagachaitanyavellanki/Documents/projects/minimal-mistakes/_site/tags (Errno::EPERM)

Change the line 82 in

/usr/local/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll/static_file.rb

to

FileUtils.rm_rf(dest_path) if File.exist?(dest_path)

This must be something to do with my _site directory.

~/Documents/projects/minimal-mistakes (master ✘)✭ ᐅ bundle exec jekyll serve -w -t
Configuration file: /Users/nagachaitanyavellanki/Documents/projects/minimal-mistakes/_config.yml
       Deprecation: Auto-regeneration can no longer be set from your configuration file(s). Use the --[no-]watch/-w command-line option instead.
       Deprecation: The 'server' configuration option is no longer accepted. Use the 'jekyll serve' subcommand to serve your site with WEBrick.
            Source: .
       Destination: ./_site
      Generating...
     Build Warning: Layout 'none' requested in feed.xml does not exist.
     Build Warning: Layout 'nil' requested in sitemap.xml does not exist.
                    done.
 Auto-regeneration: enabled for '.'
Configuration file: /Users/nagachaitanyavellanki/Documents/projects/minimal-mistakes/_config.yml
       Deprecation: Auto-regeneration can no longer be set from your configuration file(s). Use the --[no-]watch/-w command-line option instead.
       Deprecation: The 'server' configuration option is no longer accepted. Use the 'jekyll serve' subcommand to serve your site with WEBrick.
    Server address: http://0.0.0.0:4000//
  Server running... press ctrl-c to stop.

Conclusion: jekyll 2.5.3 works!!

@Pajamaman

This comment has been minimized.

Pajamaman commented May 9, 2015

Can anyone explain why bundle exec jekyll serve works but jekyll serve does not?

Edit: uh, nevermind.

@parkr

This comment has been minimized.

Member

parkr commented May 9, 2015

@Pajamaman bundle exec makes sure you have the right versions of everything. :)

@envygeeks

This comment has been minimized.

Contributor

envygeeks commented May 10, 2015

Gem does too @parkr since quite a while now (sometime last year -- it will use the Gemfile,) don't include a path @Pajamaman and bundler will install to the system, you can also force it with --system if I remember right, we do on our Docker images so we can pre-spawn.

@willianribeiro

This comment has been minimized.

willianribeiro commented Jul 6, 2015

Works for me when I added the Gemfile posted by @chaitanyav at the root of my jekyll project, and after it executed the command bundle install. Thank you! (:

@hanserino

This comment has been minimized.

hanserino commented Jan 10, 2016

Worked for me after I installed Bundler by running $ bundle install and then $ bundle exec jekyll serve

@hanserino

This comment has been minimized.

hanserino commented Jan 18, 2016

@robotutu I'm sorry, I don't understand what you mean

@SuriyaaKudoIsc

This comment has been minimized.

Member

SuriyaaKudoIsc commented Feb 18, 2016

@parkr Still the same problem on newer versions of Jekyll.


I need to run: bundle exec jekyll serve!

@themestechnology

This comment has been minimized.

themestechnology commented Feb 18, 2016

install ruby-full; Make sure you install ruby-full not ruby! https://www.ruby-lang.org/en/documentation/installation/
install gem; https://rubygems.org/pages/download
gem install bundler;
bundle install;
install nodejs; https://nodejs.org/en/download/package-manager/
npm install -g npm; https://docs.npmjs.com/getting-started/installing-node
npm install -g bower; http://bower.io/#install-bower

Remove any .loc files ie "Gemfile.lock"

gem install rubygems-update;
gem update;
bundle update;
npm install -g npm;
npm install -g bower;
npm install;
npm update;
bower install --allow-root;
bower update --allow-root;

then run bundle exec jekyll serve

@jekyll jekyll locked and limited conversation to collaborators Feb 18, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.