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

Re: Weird issue with bundler



Am Samstag, den 25.04.2020, 16:20 +0200 schrieb deivid:

[..]
> > 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.

Confirmed. You are right here.

[..]
> > > 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?

The issue arises when I run

jekyll new foo --skip-bundle

The created Gemfile contains this:

> # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
> # and associated library.
> install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do
>   gem "tzinfo", "~> 1.2"
>   gem "tzinfo-data"
> end
> 
> # Performance-booster for watching directories on Windows
> gem "wdm", "~> 0.1.0", :install_if => Gem.win_platform?

Now it really is important that bundler doesn't fetch or install anything from
the web here. I'm just having a private support session with this user Yann to
fix his system and I was wondering how to fix the situation for all Debian
users. Jekyll should work out of the box on Debian systems for our users. It
shouldn't require users to deal with bundler at all. One way would be to patch
jekyll to not add this part to Gemfile by default, or make jekyll depend on the
Debian packages containing the gems, even if they are not required.

Or maybe we should set JEKYLL_NO_BUNDLER_REQUIRE in /usr/bin/jekyll by default?
But does this work with so called unblessed plugins like jekyll-compose? 

-- 
Regards,
Daniel Leidert <dleidert@debian.org> | https://www.wgdd.de/
GPG-Key RSA4096 / BEED4DED5544A4C03E283DC74BCD0567C296D05D
GPG-Key ED25519 / BD3C132D8B3805D1808123AB7ACE00941E338C78

If you like my work consider sponsoring me via
https://www.patreon.com/join/dleidert

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: