adambard / learnxinyminutes-site

44 stars 61 forks source link

Fails to build with Ruby3.0. | Lock to Ruby2.7 #106

Closed hinell closed 7 months ago

hinell commented 1 year ago
# Gemfile
ruby "~>2.7"
...
gem 'nokogiri', '~> 1.11.2'
...

Why not to use Jekyll? I'm trying to build the learnxinyminutes-site by using Ruby3.0 and it fails due to differences in standard lib that is used by middleman deps.

Expected

Actual behavior

Steps to reproduce

  1. Run Debian/[K]Ubuntu 22.04.2
  2. Install Ruby3.0
  3. Follow instructions at learnxinyminutes/CONTRIBUTING.markdown
  4. Fails to build website

Additional information

Workaround

On Linux/Ubuntu systems with fresh updates you have to install `ruby2.7` anyway: ```bash sudo apt install ruby2.7 ruby2.7-dev ``` Update your Gemfile. Update `nokogiri`. See related PR [nokogiri#2106](https://github.com/sparklemotion/nokogiri/pull/2106) ```ruby # Gemfile source 'http://rubygems.org' ruby "~>2.7" gem "rouge" gem "pygments.rb" gem "middleman", "~>3.4.0" gem "middleman-syntax", "~>3.3.0" gem "redcarpet", "2.3.0" gem "haml", "~>4.0.5" # For feed.xml.builder gem "builder", "~> 3.0.0" # Github security recommendations gem 'yajl-ruby', '~> 1.3.1' gem 'nokogiri', '~> 1.11.2' ``` In your shell, run: ```bash sudo gem2.7 install bundler -v '1.17.3' sudo bundle2.7 install bundle2.7 exec middleman ``` > **Note**: The last command may leak memory somehow.
nopeless commented 1 year ago

Same