Closed adarsh closed 8 years ago
bundle exec middleman server
?
Hi, I get the same.
It looks like bundler is installing v0.1.5 of the gem!
My Gemfile.lock says:
middleman-blog (0.1.5)
note sure how to override this though.
sounds like a ruby gems bug. You can force it in your Gemfile
:
gem 'middleman-blog', '>= 4.0.0'
Reported to Bundler here: https://github.com/bundler/bundler/issues/4406
It looks like it is selecting fastimage-1.9.0 and then finding middleman-blog-0.1.5 (ancient) which allows installing that version of fastimage. Pinning both of them via:
gem "fastimage", "1.9.0"
gem "middleman-blog", ">= 4.0.0"
results in a dep conflict:
Bundler could not find compatible versions for gem "addressable":
In Gemfile:
fastimage (= 1.9.0) was resolved to 1.9.0, which depends on
addressable (~> 2.3.5)
middleman-blog (>= 4.0.0) was resolved to 4.0.0, which depends on
addressable (~> 2.4.0)
middleman-blog (>= 4.0.0) was resolved to 4.0.0, which depends on
middleman-core (>= 4.0.0) was resolved to 4.1.6, which depends on
addressable (~> 2.3)
fastimage and middleman-blog both should probably both be using semver pins like ~> 2.3
and ~> 2.4
if they can. if they can't, then they should try to agree on a minor version of addressable to use.
there most likely isn't a bug in bundler here since the Gemfile left bundler's depsolver free to downgrade middleman-blog as much as it liked, and it had to pick downgrading fastimage or middleman-blog -- in the absence of any human input it has to guess about which gem to downgrade and it simply guesses wrong, so you have to tell it what you really mean...
Can you try this now:
gem "middleman-blog", github: "middleman/middleman-blog"
FYI, I've just been getting started using middleman-blog
and ran into this issue. I can confirm that once I locked addressable
to 2.4.0
and pulled middleman-blog
from Github, it worked fine.
@tdreyno that'll always work since you'll pull from GH and effectively pin the middleman-blog version...
@tdreyno i installed from git to my local gems and i get fastimage 1.9.0 and middleman-blog 4.0.0 now, so this looks fixed in master by your change. 👍
Should be resolved with blog v4.0.1
@tdreyno This looks good. However, when I initialize a new blog with Middleman (middleman init MY_BLOG_PROJECT --template=blog
) it seems middleman-blog is requiring middleman 4.0.0 instead of the more current 4.1.x. Is there a reason for this?
No reason other than oversight :(
Fixed here: https://github.com/middleman/middleman-templates-blog/commit/e3128bcced09258badd1548eba19331f37faf364
Try now
@tdreyno Yep, works like a charm!
I'm getting the following error after
Then I add
middleman-blog
:And get this error:
This is under Ruby 2.3.0 using rbenv although I've tried other versions and system ruby (no rbenv) and got the same error.