minicomp / ed

A Jekyll theme for minimal editions :book:
https://minicomp.github.io/ed/
Other
246 stars 128 forks source link

Could not find gem 'bundler (~> 1.16)' #19

Closed jloan closed 4 years ago

jloan commented 4 years ago

Tried the robust install. Everything went fine until $bundle install. The error is:

Bundler could not find compatible versions for gem "bundler": In Gemfile: bundler (~> 1.16)

Current Bundler version: bundler (2.0.2) This Gemfile requires a different version of Bundler. Perhaps you need to update Bundler by running gem install bundler?

Could not find gem 'bundler (~> 1.16)' in any of the relevant sources: the local ruby installation

Admittedly, I'm a novice in all this. Have gotten a few Jekyll sites up and running, but far from expert.

Any suggestions?

sergeyklay commented 4 years ago

@jloan

To install bundler ~> 1.16 use command as follows:

gem install bundler --version '~> 1.16'

To see installed bundler version use following commands:

gem list | grep bundler
gem list bundler

To run specific bundler version you are free to use such form:

bundle _1.17.3_ install

P.S.

Btw, you can modify the ed..gemspec file:

diff --git a/ed..gemspec b/ed..gemspec
index ccf3284..9bfdc66 100644
--- a/ed..gemspec
+++ b/ed..gemspec
@@ -25,6 +25,6 @@ Gem::Specification.new do |spec|

   spec.add_runtime_dependency "jekyll", "~> 3.6"

-  spec.add_development_dependency "bundler", "~> 1.16"
-  spec.add_development_dependency "rake", "~> 10.4"
+  spec.add_development_dependency "bundler"
+  spec.add_development_dependency "rake"
 end

and use your installed bundler

jloan commented 4 years ago

Thanks! I do have two questions which I understand may be pushing your patience.

  1. since I installed (per the directions) everything into the ed folder -- will I only be overwriting the bundler install in that folder? Not system-wide? My gut tells me yes...

  2. Do I only change the bundler version in the gemspec file? Nothing else? My gut also tells me yes here, but my novice anxiety prompts me to ask.

Thanks for your help and patience @sergeyklay!

karlstolley commented 4 years ago

@jloan @sergeyklay I have a patch coming that relaxes the Bundler requirements and allows 2.x versions of Bundler. It's generally a good idea not to rework the Gemspec file yourself (and makes it harder to get updates, if you're still tracking the upstream Ed. repo).

sergeyklay commented 4 years ago

@karlstolley Could you make a pull request then? :)

sergeyklay commented 4 years ago

@jloan

  1. Yes
  2. Yes
karlstolley commented 4 years ago

@sergeyklay it's on the master branch, but it hasn't been released to the Gem yet. See 2aad9548a9ef03b88e07dbb075b3014c3da80810