[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weird issue with bundler



Sorry, I should've replied to the list. My answers are below.

El 25/4/20 a las 16:16, deivid escribió:

El 25/4/20 a las 15:49, Daniel Leidert escribió:
Am Samstag, den 25.04.2020, 15:25 +0200 schrieb deivid:
I can reproduce this locally, and without having a closer look, I agree
there's room for improvement in bundler here (maybe in jekyll too), at
least in terms of better error messages. Feel free to report the issue
upstream so it doesn't get lost.
I'll do so. IMHO it should definitely not behave differently depending on the number of gems put in the block. IMHO at least this part is not a question of
improving error messages.

I believe this is not about the number of gems in the block. When you create a jekyll application, jekyll runs `bundle install` for you, so the other gem is already included in the `Gemfile.lock` file, that's why you don't get the issue "initially". But it has nothing to do with the number of gems, but with the information you have currently included in the `Gemfile.lock` file. You can reproduce the error with a single gem by removing `gdm` from the `Gemfile`, running `bundle install`, adding it back, and then running `jekyll b` again.


To workaround the issue, you can run `bundle install` before running
jekyll so that version information for the new gems you added gets added
to the lockfile. Note that even if the particular gem does not get
installed on your system, it's still used for resolution so that users
of the app on other platforms get a consistent version of those
dependencies when using the application.
The problem is I don't want to run bundle. I'm using the Debian packages. My expectation was that if I don't require the gem (because my platform is not listed in Gemfile) I shouldn't get an error message. If I run ` bundle install` and if I have all the necessary dependencies installed, bundle won't fetch gems from the internet. But if it does it creates kind of a mess on Debian systems
and that is nothing for inexperienced users (see [1] and follow-ups).

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=942596#20

What do you think?

The problem is that `jekyll` runs `bundler` for you by default. But looking at the source, there's a way out by using the `JEKYLL_NO_BUNDLER_REQUIRE` or removing the lockfile:

https://github.com/jekyll/jekyll/blob/4271495fcaad4073b2375b76089041acd16ffb49/lib/jekyll/plugin_manager.rb#L49-L61

May I ask why are you editing the `Gemfile` if you don't want to use bundler, though?



Reply to: