Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install of Jekyll 3.4.1 gem does not install tzinfo #5935

Closed
5 tasks done
theunrepentantgeek opened this issue Mar 4, 2017 · 10 comments
Closed
5 tasks done

Install of Jekyll 3.4.1 gem does not install tzinfo #5935

theunrepentantgeek opened this issue Mar 4, 2017 · 10 comments
Labels
frozen-due-to-age windows Related to the Windows platform

Comments

@theunrepentantgeek
Copy link

  • I believe this to be a bug, not a question about using Jekyll.
  • I updated to the latest Jekyll (or) if on GitHub Pages to the latest github-pages
  • I read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/

  • I am on (or have tested on) Windows 10+

  • It was another bug.

My Reproduction Steps

Install Jekyll 3.4.1

gem install Jekyll

Installation worked.

Attempting to build my site (via a PowerShell script) gave this error

Configuration file: C:\dev\www.nichesoftware.co.nz\src/_config.yml
  Dependency Error: Yikes! It looks like you don't have tzinfo or one of its dependencies installed. In order
  to use Jekyll as currently configured, you'll need to install this gem. The full error message from Ruby is:
  'cannot load such file -- tzinfo' If you run into trouble, you can find helpful resources at
  https://jekyllrb.com/help/!

Manual Fix

To work around the issue, I installed tzinfo manually

gem install tzinfo

I then got a different error:

Configuration file: C:\dev\www.nichesoftware.co.nz\src/_config.yml
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/tzinfo-1.2.2/lib/tzinfo/data_source.rb:182:in `rescue in create_default_data_source': No source of timezone data could be found. (TZInfo::DataSourceNotFound)
Please refer to http://tzinfo.github.io/datasourcenotfound for help resolving this error.

Fixing this required manual installation of tzinfo-data

gem install tzinfo-data

From what I found online, I only needed this last step because I'm running 64 bit Ruby on Windows

Expectation

The Jekyll gem should reference tzinfo as a dependency, and possibly tzinfo-data as well.

As much as anything else, I'm logging this issue so that someone searching this repo for tzinfo can find a workaround for the issue.

/cc @jekyll/build @jekyll/windows

@DirtyF DirtyF added the windows Related to the Windows platform label Mar 4, 2017
@ashmaroli
Copy link
Member

tzinfo-data is only required for Windows, but is automatically included in the Gemfile when you create a new site with jekyll new using v3.4.x and will be installed by bundler as part of jekyll new.
Our documentation had also been updated to inform users about this change.

@pathawks
Copy link
Member

pathawks commented Mar 5, 2017

@jekyll/windows

@ashmaroli
Copy link
Member

@pathawks
Copy link
Member

pathawks commented Mar 5, 2017

Is there a reason for this not to be in our gemspec?

@ashmaroli
Copy link
Member

ashmaroli commented Mar 5, 2017

tzinfo and tzinfo-data are required only by Windows users. So it didn't make sense to me to have that added to the .gemspec and have everyone install a gemset they may not require.

Since rubygems are built based on the packaging environment, adding a Platform-check in the gemspec is also futile, as it will be ignored when Parker et al builds a jekyll gem for release on their non-Windows machine.

The best solutions are:

  • releasing a platform-specific version like nokogiri
  • document the special requirement (for older users n new), and partially absorb the overhead by having newly generated Gemfiles include the gems out-of-the-box. (Current approach)

@pathawks
Copy link
Member

pathawks commented Mar 5, 2017

Since rubygems are built based on the packaging environment, adding a Platform-check in the gemspec is also futile, as it will be ignored when Parker et al builds a jekyll gem for release on their non-Windows machine.

That's right. I remember now 🤷‍♂️

@theunrepentantgeek
Copy link
Author

theunrepentantgeek commented Mar 5, 2017

Versioning of gems is more complicated than I thought. 😮 It's also clear that you all have thought this through in considerable detail long ago.

If there's no good current solution, I'm happy for this issue to be closed.

@DirtyF DirtyF closed this as completed Mar 5, 2017
@erikyuzwa
Copy link

erikyuzwa commented Aug 18, 2017

removing my comment. I got it working on the latest Jekyll v.3.5.2 - ummm user error?

@ashmaroli
Copy link
Member

@erikyuzwa It should be working on previous releases as well.. Can you please report back after checking again with v3.5.1 and if possible with v3.4.x too? Thanks

@erikyuzwa
Copy link

the REAL issue is my ruby-n00bness @ashmaroli. I was just doing gem install tzinfo, but it was only installing the gem on my system ("globally"?) which Jekyll just couldn't find.
I needed to add gem 'tzinfo', '1.2.3' and gem 'tzinfo-data', '1.2017.2' to the Gemfile in order for everything to work. As I said -- my ruby n00bness. 🍼

dentarg referenced this issue in klubbdinmamma/klubbdinmamma.github.io Aug 29, 2018
PeterJCLaw added a commit to PeterJCLaw/srobo-website that referenced this issue Sep 29, 2018
This turns out to be a dependency of Jekyll which isn't specified
on their part. This seems to be a known issue, so you'd hope they'd
fix it, but that's apparently too complicated.

See jekyll/jekyll#5935 for details.
@jekyll jekyll locked and limited conversation to collaborators Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age windows Related to the Windows platform
Projects
None yet
Development

No branches or pull requests

7 participants