Skip to content

Commit

Permalink
Restore gem tzinfo-data for Windows & JRuby (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Nov 20, 2020
1 parent ec69d4d commit 4208bae
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gem "jekyll", ">=3.8.6"

# Official Plugins
# plugins
group :jekyll_plugins do
gem "jekyll-paginate"
gem "jekyll-redirect-from"
Expand All @@ -13,3 +13,13 @@ end
group :test do
gem "html-proofer"
end

# Windows and JRuby 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.1", :install_if => Gem.win_platform?

5 comments on commit 4208bae

@realjcluo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I found the new change may cause bug on MacOS, following the failure on GitGub Action. Once the update been deleted, the GitHub Action went to normal.

Run bundle install --local
Could not find gem 'tzinfo (~> 1.2)' in any of the gem sources listed in your
Gemfile.
Error: Process completed with exit code 7.

@cotes2020
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS works fine with this commit, see https://github.com/cotes2020/jekyll-theme-chirpy/runs/1431406155?check_suite_focus=true

Run bundle install --local

It seems that your error is caused by the bundle cache.

@realjcluo
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Many thanks to you. I'll notice it if I change my desktop.

@mpro7
Copy link

@mpro7 mpro7 commented on 4208bae Nov 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cotes2020 I've noticed the same issue as @realjcluo, and indeed removing your changes or just condition in line 19: install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } helps.

image

@cotes2020
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mpro7,

Gemfile is OK, and the real cause is bund install --local, for details see b874af2. BTW, @realjcluo should fetch that fix, too :)

Please sign in to comment.