Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Can't seem to get bundler to update Jekyll 1.5.1 to latest #218

Closed
jglovier opened this issue Dec 24, 2014 · 19 comments
Closed

Can't seem to get bundler to update Jekyll 1.5.1 to latest #218

jglovier opened this issue Dec 24, 2014 · 19 comments

Comments

@jglovier
Copy link
Member

I'm trying to update my personal site to use Jekyll 2.X.X locally, and cannot seem to get it to update for the life of me. :rage4: I've tried everything I can think of, and it probably stems from my lack of knowledge around bundler, so I'm reaching out in despair for help.

When I try simply running bundle update, bundler does it's thing, but still ends up using Jekyll 1.5.1 at the end (maybe that command doesn't do what I think it should be doing):

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle update
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies..........
Using json 1.8.1
Using minitest 5.5.0
Using thread_safe 0.3.4
Using blankslate 2.1.2.4
Using i18n 0.7.0
Using fast-stemmer 1.0.2
Using colorator 0.1
Using highline 1.6.21
Using ffi 1.9.6
Using RedCloth 4.2.9
Using gemoji 1.5.0
Using liquid 2.5.5
Using rb-fsevent 0.9.4
Using maruku 0.7.0
Using posix-spawn 0.3.9
Using yajl-ruby 1.1.0
Using safe_yaml 1.0.4
Using mini_portile 0.6.1
Using redcarpet 2.3.0
Using kramdown 1.3.1
Using rdiscount 2.1.7
Using bundler 1.6.9
Using tzinfo 1.2.2
Using parslet 1.5.0
Using classifier 1.3.4
Using commander 4.1.6
Using rb-inotify 0.9.5
Using rb-kqueue 0.2.3
Using pygments.rb 0.5.4
Using activesupport 4.2.0
Using nokogiri 1.6.5
Using toml 0.1.2
Using listen 1.3.1
Using html-pipeline 1.5.0
Using jekyll 1.5.1
Using jekyll-mentions 0.0.9
Using jekyll-sitemap 0.3.0
Using jekyll-redirect-from 0.3.1
Using jemoji 0.1.0
Using github-pages 20
Your bundle is updated!

Also tried deleting Gemfile.lock and just running bundle install, but that appears to do the same thing, and the result is just a new Gemfile.lock with the same Jekyll 1.5.1 listed. (Is there something wrong with the way my Gemfile is setup?)

So interestingly, when I run jekyll -v I get the following output, which I don't understand at all:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ jekyll -v
WARN: Unresolved specs during Gem::Specification.reset:
      posix-spawn (~> 0.3.6)
      redcarpet (~> 3.1)
      listen (~> 2.7)
      classifier-reborn (~> 2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/opt/rubies/2.1.4-github1/lib/ruby/gems/2.1.0/gems/jekyll-2.5.3/bin/jekyll:21:in `block in <top (required)>': cannot load such file -- jekyll/version (LoadError)
    from /opt/rubies/2.1.4-github1/lib/ruby/gems/2.1.0/gems/mercenary-0.3.5/lib/mercenary.rb:18:in `program'
    from /opt/rubies/2.1.4-github1/lib/ruby/gems/2.1.0/gems/jekyll-2.5.3/bin/jekyll:20:in `<top (required)>'
    from /opt/boxen/rbenv/versions/2.1.4-github/bin/jekyll:23:in `load'
    from /opt/boxen/rbenv/versions/2.1.4-github/bin/jekyll:23:in `<main>'

Of course, if I run bundle exec jekyll -v I get the expected:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle exec jekyll -v
jekyll 1.5.1

So I tried straight up doing gem update jekyll, and I get:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ gem update jekyll
Updating installed gems
Nothing to update

When I try bundle exec gem update jekyll, and I actually get:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle exec gem update jekyll
Updating installed gems
Updating jekyll
Successfully installed liquid-2.6.1
Successfully installed mercenary-0.3.5
Successfully installed pygments.rb-0.6.0
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.2.2
Successfully installed jekyll-paginate-1.1.0
Successfully installed jekyll-gist-1.1.0
Successfully installed coffee-script-source-1.8.0
Successfully installed execjs-2.2.2
Successfully installed coffee-script-2.3.0
Successfully installed jekyll-coffeescript-1.0.1
Successfully installed sass-3.4.9
Successfully installed jekyll-sass-converter-1.3.0
Building native extensions.  This could take a while...
Successfully installed hitimes-1.2.2
Successfully installed timers-4.0.1
Successfully installed celluloid-0.16.0
Successfully installed listen-2.8.4
Successfully installed jekyll-watch-1.2.0
Successfully installed classifier-reborn-2.0.3
Successfully installed jekyll-2.5.3
Updating jekyll-mentions
Successfully installed classifier-reborn-2.0.3
Building native extensions.  This could take a while...
Successfully installed hitimes-1.2.2
Successfully installed timers-4.0.1
Successfully installed celluloid-0.16.0
Successfully installed listen-2.8.4
Successfully installed jekyll-watch-1.2.0
Successfully installed sass-3.4.9
Successfully installed jekyll-sass-converter-1.3.0
Successfully installed coffee-script-source-1.8.0
Successfully installed execjs-2.2.2
Successfully installed coffee-script-2.3.0
Successfully installed jekyll-coffeescript-1.0.1
Successfully installed jekyll-gist-1.1.0
Successfully installed jekyll-paginate-1.1.0
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.2.2
Successfully installed pygments.rb-0.6.0
Successfully installed mercenary-0.3.5
Successfully installed liquid-2.6.1
Successfully installed jekyll-2.5.3
-------------------------------------------------
Thank you for installing html-pipeline!
You must bundle Filter gem dependencies.
See html-pipeline README.md for more details.
https://github.com/jch/html-pipeline#dependencies
-------------------------------------------------
Successfully installed html-pipeline-1.9.0
Successfully installed jekyll-mentions-0.2.1
Updating jekyll-redirect-from
Successfully installed classifier-reborn-2.0.3
Building native extensions.  This could take a while...
Successfully installed hitimes-1.2.2
Successfully installed timers-4.0.1
Successfully installed celluloid-0.16.0
Successfully installed listen-2.8.4
Successfully installed jekyll-watch-1.2.0
Successfully installed sass-3.4.9
Successfully installed jekyll-sass-converter-1.3.0
Successfully installed coffee-script-source-1.8.0
Successfully installed execjs-2.2.2
Successfully installed coffee-script-2.3.0
Successfully installed jekyll-coffeescript-1.0.1
Successfully installed jekyll-gist-1.1.0
Successfully installed jekyll-paginate-1.1.0
Building native extensions.  This could take a while...
Successfully installed redcarpet-3.2.2
Successfully installed pygments.rb-0.6.0
Successfully installed mercenary-0.3.5
Successfully installed liquid-2.6.1
Successfully installed jekyll-2.5.3
Successfully installed jekyll-redirect-from-0.6.2
Updating jekyll-sitemap
Successfully installed jekyll-sitemap-0.7.0
Gems updated: celluloid classifier-reborn coffee-script coffee-script-source execjs hitimes jekyll jekyll-coffeescript jekyll-gist jekyll-paginate jekyll-sass-converter jekyll-watch liquid listen mercenary pygments.rb redcarpet sass timers celluloid classifier-reborn coffee-script coffee-script-source execjs hitimes html-pipeline jekyll jekyll-coffeescript jekyll-gist jekyll-mentions jekyll-paginate jekyll-sass-converter jekyll-watch liquid listen mercenary pygments.rb redcarpet sass timers celluloid classifier-reborn coffee-script coffee-script-source execjs hitimes jekyll jekyll-coffeescript jekyll-gist jekyll-paginate jekyll-redirect-from jekyll-sass-converter jekyll-watch liquid listen mercenary pygments.rb redcarpet sass timers jekyll-sitemap

...however when I run bundle exec jekyll -v it just shows:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle exec jekyll -v
jekyll 1.5.1

I even tried blowing away my entire local repo via rm -rf, and re-cloning from GitHub, and trying all this stuff again (in case it was just some odd bug), but no avail, and same results.

What am I doing wrong???

img

@mattr-
Copy link
Member

mattr- commented Dec 24, 2014

The github-pages gem is what's constraining your Jekyll version here. A bundle update github-pages should get you the upgraded version of Jekyll you're looking for.

@mattr-
Copy link
Member

mattr- commented Dec 24, 2014

You'll also want to make sure that when you do anything with Jekyll locally, that you always run things through bundle exec as that's the best way to ensure consistency.

@jglovier
Copy link
Member Author

A bundle update github-pages should get you the upgraded version of Jekyll you're looking for.

@mattr- thanks for the help! However, running bundle update github-pages doesn't seem to affect anything. Still uses 1.5.1:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle update github-pages
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies...........
Using json 1.8.1
Using RedCloth 4.2.9
Using i18n 0.7.0
Using minitest 5.5.0
Using thread_safe 0.3.4
Using blankslate 2.1.2.4
Using fast-stemmer 1.0.2
Using colorator 0.1
Using highline 1.6.21
Using ffi 1.9.6
Using gemoji 1.5.0
Using liquid 2.5.5
Using rb-fsevent 0.9.4
Using maruku 0.7.0
Using posix-spawn 0.3.9
Using yajl-ruby 1.1.0
Using redcarpet 2.3.0
Using safe_yaml 1.0.4
Using mini_portile 0.6.1
Using kramdown 1.3.1
Using rdiscount 2.1.7
Using bundler 1.6.9
Using parslet 1.5.0
Using tzinfo 1.2.2
Using classifier 1.3.4
Using commander 4.1.6
Using rb-inotify 0.9.5
Using pygments.rb 0.5.4
Using rb-kqueue 0.2.3
Using toml 0.1.2
Using activesupport 4.2.0
Using nokogiri 1.6.5
Using listen 1.3.1
Using html-pipeline 1.5.0
Using jekyll 1.5.1
Using jekyll-redirect-from 0.3.1
Using jekyll-sitemap 0.3.0
Using jekyll-mentions 0.0.9
Using jemoji 0.1.0
Using github-pages 20
Your bundle is updated!

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle exec jekyll -v
jekyll 1.5.1

@jglovier
Copy link
Member Author

cc jekyll/jekyll#3124 for another example case for that thread.

@jglovier
Copy link
Member Author

A bundle update github-pages should get you the upgraded version of Jekyll you're looking for.

@mattr- also, shouldn't this have already been performed as part of running bundle update??

@alfredxing
Copy link
Member

Perhaps what's confusing it is that you have both github-pages and jekyll in the Gemfile? Maybe try removing jekyll and bundle update again.

@jglovier
Copy link
Member Author

@alfredxing so I tried removing jekyll from the Gemfile, and ran bundle update, but it's still using jekyll 1.5.1 😦

I also tried running gem cleanup, which returned:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ gem cleanup
Cleaning up installed gems...
Attempting to uninstall github-pages-20
Successfully uninstalled github-pages-20
Attempting to uninstall jemoji-0.1.0
Successfully uninstalled jemoji-0.1.0
Attempting to uninstall jekyll-sitemap-0.3.0
Successfully uninstalled jekyll-sitemap-0.3.0
Attempting to uninstall jekyll-redirect-from-0.3.1
Successfully uninstalled jekyll-redirect-from-0.3.1
Attempting to uninstall jekyll-mentions-0.0.9
Successfully uninstalled jekyll-mentions-0.0.9
Attempting to uninstall jekyll-1.5.1
Successfully uninstalled jekyll-1.5.1
Attempting to uninstall html-pipeline-1.5.0
Successfully uninstalled html-pipeline-1.5.0
Attempting to uninstall gemoji-1.5.0
Successfully uninstalled gemoji-1.5.0
Attempting to uninstall redcarpet-2.3.0
Successfully uninstalled redcarpet-2.3.0
Attempting to uninstall pygments.rb-0.5.4
Successfully uninstalled pygments.rb-0.5.4
Attempting to uninstall listen-1.3.1
Successfully uninstalled listen-1.3.1
Attempting to uninstall liquid-2.5.5
Successfully uninstalled liquid-2.5.5
Clean Up Complete

But I ran bundle update again afterward and it's still showing jekyll 1.5.1.

@jglovier
Copy link
Member Author

How do you even computer??

image

@jglovier
Copy link
Member Author

Should I be deleting the Gemfile.lock manually? I'm assuming that supposed to get's overwritten when I run bundle update and there is a new gem available. But is my assumption incorrect?

@jglovier
Copy link
Member Author

What's weird here is when I run bundle install or bundle update again, I see version 20 of the GH pages gem listed:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle update github-pages
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...........
Using json 1.8.1
Using i18n 0.7.0
Using RedCloth 4.2.9
Using minitest 5.5.0
Using blankslate 2.1.2.4
Using thread_safe 0.3.4
Using fast-stemmer 1.0.2
Using colorator 0.1
Using ffi 1.9.6
Using highline 1.6.21
Using gemoji 1.5.0
Using liquid 2.5.5
Using rb-fsevent 0.9.4
Using maruku 0.7.0
Using posix-spawn 0.3.9
Using yajl-ruby 1.1.0
Using redcarpet 2.3.0
Using safe_yaml 1.0.4
Using mini_portile 0.6.1
Using kramdown 1.3.1
Using bundler 1.6.9
Using rdiscount 2.1.7
Using tzinfo 1.2.2
Using classifier 1.3.4
Using parslet 1.5.0
Using commander 4.1.6
Using rb-inotify 0.9.5
Using rb-kqueue 0.2.3
Using pygments.rb 0.5.4
Using nokogiri 1.6.5
Using toml 0.1.2
Using activesupport 4.2.0
Using listen 1.3.1
Using html-pipeline 1.5.0
Using jekyll 1.5.1
Using jekyll-redirect-from 0.3.1
Using jekyll-sitemap 0.3.0
Using jekyll-mentions 0.0.9
Using jemoji 0.1.0
Using github-pages 20
Your bundle is updated!

However when I actually ask which version is installed, it tell sme version 31:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ github-pages -v
github-pages 31

@alfredxing
Copy link
Member

Maybe try removing Gemfile.lock, then gem uninstall github-pages jekyll, gem install github-pages, bundle install?

@jglovier
Copy link
Member Author

Ugh - looked like it worked, but does not appear to have:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ gem uninstall github-pages jekyll

Select gem to uninstall:
 1. jekyll-1.5.1
 2. jekyll-2.4.0
 3. jekyll-2.5.3
 4. All versions
> 1.

You have requested to uninstall the gem:
    jekyll-1.5.1

github-pages-20 depends on jekyll (= 1.5.1)
jekyll-mentions-0.0.9 depends on jekyll (~> 1.4)
jekyll-redirect-from-0.3.1 depends on jekyll (~> 1.4)
jekyll-sitemap-0.3.0 depends on jekyll (~> 1.4)
jemoji-0.1.0 depends on jekyll (~> 1.4)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Successfully uninstalled jekyll-1.5.1

Select gem to uninstall:
 1. github-pages-20
 2. github-pages-31
 3. All versions
> 3.
Successfully uninstalled github-pages-20
Remove executables:
    github-pages

in addition to the gem? [Yn]  Y
Removing github-pages
Successfully uninstalled github-pages-31


|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ gem uninstall jekyll

Select gem to uninstall:
 1. jekyll-2.4.0
 2. jekyll-2.5.3
 3. All versions
> 3.
Successfully uninstalled jekyll-2.4.0

You have requested to uninstall the gem:
    jekyll-2.5.3

jekyll-coffeescript-1.0.1 depends on jekyll (~> 2.0, development)
jekyll-gist-1.1.0 depends on jekyll (~> 2.0, development)
jekyll-mentions-0.2.1 depends on jekyll (~> 2.0)
jekyll-paginate-1.1.0 depends on jekyll (~> 2.0, development)
jekyll-redirect-from-0.6.2 depends on jekyll (~> 2.0)
jekyll-sass-converter-1.3.0 depends on jekyll (~> 2.0, development)
jekyll-sass-converter-1.2.0 depends on jekyll (~> 2.0, development)
jekyll-sitemap-0.7.0 depends on jekyll (~> 2.0, development)
jekyll-sitemap-0.6.3 depends on jekyll (~> 2.0, development)
jekyll-watch-1.2.0 depends on jekyll (~> 2.0, development)
jekyll_test_plugin-0.1.0 depends on jekyll (>= 0, development)
jekyll_test_plugin_malicious-0.1.0 depends on jekyll (>= 0, development)
jemoji-0.4.0 depends on jekyll (~> 2.0)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Remove executables:
    jekyll

in addition to the gem? [Yn]  Y
Removing jekyll
Successfully uninstalled jekyll-2.5.3


|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ gem install github-pages
Fetching: jekyll-2.4.0.gem (100%)
Successfully installed jekyll-2.4.0
Fetching: github-pages-31.gem (100%)
Successfully installed github-pages-31
2 gems installed


|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle install
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...........
Using i18n 0.7.0
Using json 1.8.1
Using RedCloth 4.2.9
Using minitest 5.5.0
Using thread_safe 0.3.4
Using blankslate 2.1.2.4
Using fast-stemmer 1.0.2
Using colorator 0.1
Using highline 1.6.21
Using ffi 1.9.6
Using gemoji 1.5.0
Using liquid 2.5.5
Using rb-fsevent 0.9.4
Using maruku 0.7.0
Using posix-spawn 0.3.9
Using yajl-ruby 1.1.0
Using redcarpet 2.3.0
Using safe_yaml 1.0.4
Using mini_portile 0.6.1
Using kramdown 1.3.1
Using rdiscount 2.1.7
Using bundler 1.6.9
Using parslet 1.5.0
Using tzinfo 1.2.2
Using commander 4.1.6
Using classifier 1.3.4
Using rb-inotify 0.9.5
Using rb-kqueue 0.2.3
Using pygments.rb 0.5.4
Using nokogiri 1.6.5
Using toml 0.1.2
Using activesupport 4.2.0
Using listen 1.3.1
Using html-pipeline 1.5.0
Installing jekyll 1.5.1
Using jekyll-sitemap 0.3.0
Using jekyll-mentions 0.0.9
Using jemoji 0.1.0
Using jekyll-redirect-from 0.3.1
Installing github-pages 20
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.


|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ jekyll -v
jekyll 2.4.0


|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle exec jekyll -v
jekyll 1.5.1

@jglovier
Copy link
Member Author

@alfredxing btw thank you for your help!!

@mattr-
Copy link
Member

mattr- commented Dec 25, 2014

@jglovier I've updated your Gemfile. Setting the explicit version for the github-pages gem and then running bundle update gets you where you want to go. Once the update is complete, you can remove that version specifier from your Gemfile.

I'm not sure why running bundle update doesn't take care of this for you, because this is exactly what it should do according to the docs. It would appear we've found a bug in Bundler.

@jglovier
Copy link
Member Author

Setting the explicit version for the github-pages gem and then running bundle update gets you where you want to go.

Whoa - interesting.

Once the update is complete, you can remove that version specifier from your Gemfile.

So, interestingly, once I removed the version and ran bundle update again, it actually reverted back to version 20:

|===jglovier===| ~/code/github-jglovier/jglovier.github.io $ bundle update
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...........
Using RedCloth 4.2.9
Using minitest 5.5.0
Using thread_safe 0.3.4
Using blankslate 2.1.2.4
Using fast-stemmer 1.0.2
Using colorator 0.1
Using highline 1.6.21
Using i18n 0.7.0
Using ffi 1.9.6
Using liquid 2.5.5 (was 2.6.1)
Using gemoji 1.5.0 (was 2.1.0)
Using rb-fsevent 0.9.4
Using maruku 0.7.0
Using posix-spawn 0.3.9
Using yajl-ruby 1.1.0
Using redcarpet 2.3.0 (was 3.1.2)
Using safe_yaml 1.0.4
Using json 1.8.1
Using mini_portile 0.6.1
Using kramdown 1.3.1
Using rdiscount 2.1.7
Using bundler 1.6.9
Using tzinfo 1.2.2
Using parslet 1.5.0
Using commander 4.1.6
Using classifier 1.3.4
Using rb-inotify 0.9.5
Using rb-kqueue 0.2.3
Using pygments.rb 0.5.4 (was 0.6.0)
Using nokogiri 1.6.5
Using activesupport 4.2.0
Using toml 0.1.2
Using listen 1.3.1 (was 2.8.4)
Using html-pipeline 1.5.0 (was 1.9.0)
Using jekyll 1.5.1 (was 2.4.0)
Using jekyll-mentions 0.0.9 (was 0.2.1)
Using jekyll-redirect-from 0.3.1 (was 0.6.2)
Using jekyll-sitemap 0.3.0 (was 0.6.3)
Using jemoji 0.1.0 (was 0.4.0)
Using github-pages 20 (was 31)
Your bundle is updated!

@mattr- thanks for your help here!!!

And Merry Christmas to all. 🎄 🎅

@alfredxing
Copy link
Member

I just set up the same scenario and got the same result. Interestingly though, if I removed the gem 'jekyll-redirect-from' line in the Gemfile and did bundle update, it allowed for Pages version 31 and Jekyll 2.4...

Can you try that and see if you get the same result?

@jglovier
Copy link
Member Author

Can you try that and see if you get the same result?

Yup, good catch. When I remove jekyll-redirect-from bundler updates to the latest versions! Should I open an issue on jekyll-redirect-from for that then? cc @parkr

@parkr
Copy link
Member

parkr commented Jan 2, 2015

Yup, good catch. When I remove jekyll-redirect-from bundler updates to the latest versions! Should I open an issue on jekyll-redirect-from for that then?

I don't think so – it's the way RubyGems resolves dependencies. If you specify gem 'jekyll-redirect-from' and in your Gemfile.lock it's locked to 0.3.1, then any time you run bundle install, it'll make sure all the other dependencies allow for this, by taking, for example, a version of github-pages which contained jekyll-redirect-from v0.3.1. If you delete your Gemfile.lock, or manually update your gem 'jekyll-redirect-from' to gem 'jekyll-redirect-from', '~> 0.6', and run bundle install, then you should be good to go. :)

@jglovier
Copy link
Member Author

jglovier commented Jan 6, 2015

Ahh 🆒. @parkr as always, thanks for the education!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants