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 install leads to immediate errors #6227

Closed
lrdegeest opened this Issue Jul 18, 2017 · 14 comments

Comments

Projects
None yet
10 participants
@lrdegeest

lrdegeest commented Jul 18, 2017

Just starting out with Jekyll. Ruby is up to date. I ran

sudo gem install jekyll

and jekyll installs fine.

But when I run a test command, like, jekyll -v, 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.15.2/lib/bundler/runtime.rb:317:in `check_for_activated_spec!': You have already activated kramdown 1.14.0, but your Gemfile requires kramdown 1.13.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:32:in `block in setup'
	from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/forwardable.rb:229:in `each'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:27:in `map'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:27:in `setup'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.2/lib/bundler.rb:101:in `setup'
	from /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
	from /usr/local/lib/ruby/gems/2.4.0/gems/jekyll-3.5.1/exe/jekyll:9:in `<top (required)>'
	from /usr/local/bin/jekyll:22:in `load'
	from /usr/local/bin/jekyll:22:in `<main>'

What gives?

Edit: tried bundle exec, gem install bundler, nothing works.

@ashmaroli

This comment has been minimized.

Member

ashmaroli commented Jul 18, 2017

Something that's not clearly stated in our docs:

Running Jekyll commands with recent versions, is highly dependent on the presence of a Gemfile in the location (directory) from which the commands are called..

  • If the current location contains a Gemfile, always prepend jekyll commands with bundle exec. i.e. bundle exec jekyll -v or bundle exec jekyll serve . Note: This requires Bundler gem to be installed as well.
  • Otherwise, bare commands work just fine.
  • If not, some other things are conflicting with Jekyll. Get more info by append-ing --trace to the command.
  • Running bundle update may help with slightly older releases.
@pathawks

This comment has been minimized.

Member

pathawks commented Jul 18, 2017

  • Don’t ever install Jekyll with sudo
@lrdegeest

This comment has been minimized.

lrdegeest commented Jul 18, 2017

bundle update doesn't help. --trace returns the same error message.

installed with sudo because it didn't work the way prescribed by the quick-start guide: https://jekyllrb.com/docs/quickstart/

@ashmaroli

This comment has been minimized.

Member

ashmaroli commented Jul 18, 2017

  • Don't run jekyll from the /home directory
@ashmaroli

This comment has been minimized.

Member

ashmaroli commented Jul 18, 2017

it didn't work the way prescribed by the quick-start guide

Please elaborate on this. What was the exact error?
Permission Issues? Perhaps this link might help..
Or other sections might hold an answer..

@i-give-up

This comment has been minimized.

Contributor

i-give-up commented Aug 20, 2017

installed with sudo because it didn't work the way prescribed by the quick-start guide

@ashmaroli in Linux, if you're not the root user and you're using the system's ruby (instead of using version managers like rvm), and you try to run gem install jekyll bundler without sudo, you get this error

ERROR: While executing gem ... (Errno:EACCES) 
    Permission denied - /var/lib/gems

This Stack Overflow question has more details.


@lrdegeest Looking at this part of the error message

You have already activated kramdown 1.14.0, but your Gemfile requires kramdown 1.13.2. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)

It is telling you to add bundle exec in front of all your Jekyll commands. For example, use bundle exec jekyll serve instead of jekyll serve. I get the impression from your post that you seem to be running bundle exec alone by itself. I apologize in advance if I misunderstood your post.

@ashmaroli

This comment has been minimized.

Member

ashmaroli commented Aug 21, 2017

@i-give-up thanks for letting me know 👍

@roelvangils

This comment has been minimized.

roelvangils commented Aug 25, 2017

I experienced the exact same issue. Prepending 'bundle exec ' to each jekyll command (such as bundle exec jekyll serve indeed seems to work. Weird stuff. It's voodoo, I guess.

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Oct 25, 2017

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the 3.3-stable or master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Oct 25, 2017

@DirtyF DirtyF added documentation and removed stale labels Oct 25, 2017

@DirtyF

This comment has been minimized.

Member

DirtyF commented Oct 25, 2017

Do https://jekyllrb.com/docs/troubleshooting/#installation-problems needs to be updated?

I'm no Linux user but @jekyll/documentation would certainly appreciate a contribution here.

@jekyllbot

This comment has been minimized.

Contributor

jekyllbot commented Dec 25, 2017

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the 3.3-stable or master branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider building it first as a plugin. Jekyll 3 introduced hooks which provide convenient access points throughout the Jekyll build pipeline whereby most needs can be fulfilled. If this is something that cannot be built as a plugin, then please provide more information about why in order to keep this issue open.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

@jekyllbot jekyllbot added the stale label Dec 25, 2017

@lsrdg

This comment has been minimized.

lsrdg commented Dec 25, 2017

Hi @DirtyF ,

Installation problems is divided into two mixed sections (at least the Linux part):

  • errors ("gem installation", "bundle exec jekyll serv" error etc) and
  • distro-specific instructions, such as:

If you installed the above - specifically on Fedora 23 - but the extensions would still not compile, you are probably running a Fedora image...

I suppose that it could be divided either according to error message or according to the Linux distribution. I would rather choose the "by error" aproach, but I don't know well it would scale. Anyway, I could add some information on installing on Archlinux, but again, the section is already well "populated"...

Another point: the section starts describing Linux related stuff, from "Rubygems on Gentoo" it jumps onto Windows, Android, MacOS etc, and then is subdivided (by headers) on Mac OS etc. Any thoughts on that?

@jekyllbot jekyllbot removed the stale label Dec 25, 2017

@nonumeros

This comment has been minimized.

nonumeros commented Feb 21, 2018

I suppose that it could be divided either according to error message or according to the Linux distribution. I would rather choose the "by error" aproach

I do agree but I think it's a combination: distro-specific and documentation

@ashmaroli in Linux, if you're not the root user and you're using the system's ruby (instead of using version managers like rvm), and you try to run gem install jekyll bundler without sudo, you get this error

@i-give-up What flavor of Linux are you referring to?

For all I know, jekyll wouldn't run as executable unless the path is set. And I've always tried to stay away from appending bundle exec to jekyll. Usually bundle update does the trick, or even gem update. But appending a bundle exec seems a stretch

@DirtyF

This comment has been minimized.

Member

DirtyF commented Apr 22, 2018

Closing as https://jekyllrb.com/docs/installation/ is now more detailed.

@DirtyF DirtyF closed this Apr 22, 2018

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