Skip to content

Conversation

@valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented Nov 18, 2025

rb-nokogiri from conda forge is ancient (last uploaded more than 4 years ago) and it's holding up ruby to a very old version; removing it here, and pinning ruby >3 that'll pick up a modern version. If Nokogiri really needs installation (I don't know where it's used), a gem install nokogiri will most probably do the trick.

Nokogiri as a gem looks well maintained and released https://rubygems.org/gems/nokogiri/versions/1.18.10?locale=en

The issue manifests itself in a (rather poorly error coded) message seen by @rswamina in #359

Closes #359

Pull Request checklist

We appreciate your time and effort to improve the tutorial. Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution.


Before you start

  • Read CONTRIBUTING.md.
  • Create an issue to discuss your idea. This allows your contributions to be incorporated into the tutorial.

Tasks

  • Give this pull request a descriptive title.
  • If you are contributing to existing lesson materials, please make sure the content conforms to the Lesson development section in CONTRIBUTING.md and does not contain any spelling or grammatical errors.
  • If you are making a new episode, please make sure the content conforms to the Lesson organization and Lesson formatting sections in CONTRIBUTING.md and does not contain any spelling or grammatical errors.
  • Preferably Codacy checks pass. Status can be seen below your pull request. If there is an error, click the link to find out why.
  • Preview changes on your machine before pushing them to GitHub by running make serve, alternatively make docker-serve. Please see the Previewing your changes locally section in CONTRIBUTING.md for installation instructions.
  • All code instructions have been tested.

If you need help with any of the tasks above, please do not hesitate to ask by commenting in the issue or pull request.


Closes {Link to the corresponding issue}

@valeriupredoi valeriupredoi added the bug Something isn't working label Nov 18, 2025
@valeriupredoi
Copy link
Contributor Author

thanks @rswamina 🍺

@rswamina
Copy link
Contributor

@valeriupredoi - Only one reviewer approval is required. If you are happy, I will merge.

@valeriupredoi valeriupredoi merged commit 230ea36 into main Nov 18, 2025
1 check passed
@valeriupredoi valeriupredoi deleted the remove_nokogiri branch November 18, 2025 15:11
@valeriupredoi
Copy link
Contributor Author

ah sorry, old habit with @bouweandela in Core - I merged already 😁

@LisaBock
Copy link
Member

Unfortunately, the new environment is not working for me. But the old one did. @valeriupredoi Do you know what the problem might be?

Output after make serve:

bundle install --path .vendor/bundle && bundle update && bundle exec jekyll serve
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '.vendor/bundle'`, and stop using this flag
Bundler 2.6.9 is running, but your lockfile was generated with 1.17.2. Installing Bundler 1.17.2 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 1.17.2
Installing bundler 1.17.2
/athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/shared_helpers.rb:272:in 'Bundler::SharedHelpers#search_up': undefined method 'untaint' for an instance of String (NoMethodError)

      current  = File.expand_path(SharedHelpers.pwd).untaint
                                                    ^^^^^^^^
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/shared_helpers.rb:259:in 'Bundler::SharedHelpers#find_file'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/shared_helpers.rb:251:in 'Bundler::SharedHelpers#find_gemfile'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/shared_helpers.rb:27:in 'Bundler::SharedHelpers#root'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler.rb:234:in 'Bundler.root'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler.rb:246:in 'Bundler.app_config_path'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler.rb:273:in 'Bundler.settings'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/feature_flag.rb:21:in 'block in Bundler::FeatureFlag#settings_method'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/cli.rb:97:in '<class:CLI>'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/cli.rb:7:in '<module:Bundler>'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/cli.rb:6:in '<top (required)>'
        from <internal:/athome/bock_ls/mambaforge/envs/tutorial_test/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
        from <internal:/athome/bock_ls/mambaforge/envs/tutorial_test/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/exe/bundle:23:in 'block in <top (required)>'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/lib/bundler/friendly_errors.rb:124:in 'Bundler.with_friendly_errors'
        from /athome/bock_ls/ESMVal/ESMValTool/ESMValTool_Tutorial_v2/.vendor/bundle/ruby/3.4.0/gems/bundler-1.17.2/exe/bundle:22:in '<top (required)>'
        from /athome/bock_ls/mambaforge/envs/tutorial_test/bin/bundle:31:in 'Kernel#load'
        from /athome/bock_ls/mambaforge/envs/tutorial_test/bin/bundle:31:in '<main>'
make: *** [Makefile:49: serve] Error 1

@valeriupredoi
Copy link
Contributor Author

@LisaBock can you try with ruby==3.4.7 - that's the one it worked for me and Ranjini, if it does work, then I'll pin it in a PR - your conda/mamba may be a bit too old so it picked up 3.4.0

@LisaBock
Copy link
Member

@valeriupredoi Sorry, this changed nothing... Same error.

@valeriupredoi
Copy link
Contributor Author

valeriupredoi commented Nov 18, 2025

your bundler is ancient, currently at 2.7.2 https://rubygems.org/gems/bundler/versions/2.7.2?locale=en - try updating that one as well - I am on 2.6.9 in the test I ran and found nokogiri being ancient

(esmvaltool_tutorial) [valeriu@sci-vm-01 esmvaltool]$ bundler --version
Bundler version 2.6.9

@valeriupredoi
Copy link
Contributor Author

@LisaBock you really need to update your conda mamba base - your picking up some really ancient package versions, I just created the env on my local machine with:

(esmvaltool_tutorial) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool_Tutorial$ conda -V                                                                      
conda 25.7.0                                                                                                                                             
(esmvaltool_tutorial) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool_Tutorial$ mamba --version                                                               
2.3.2 

and my bundler is 2.6.9, with ruby

(esmvaltool_tutorial) valeriu@valeriu-PORTEGE-Z30-C:~/ESMValTool_Tutorial$ conda list ruby                                                               
# packages in environment at /home/valeriu/miniconda3/envs/esmvaltool_tutorial:                                                                          
#                                                                                                                                                        
# Name                     Version          Build            Channel                                                                                     
ruby                       3.4.7            h498564d_1       conda-forge

🍻

@LisaBock
Copy link
Member

My versions are not old:

(base) bock_ls@lx001:~/ESMVal/ESMValTool/ESMValTool_Tutorial_v2> mamba --version
2.3.1
(base) bock_ls@lx001:~/ESMVal/ESMValTool/ESMValTool_Tutorial_v2> conda -V
conda 25.7.0

When typing mamba update --name base mamba conda, it's doing nothing:

(tutorial_test_4) bock_ls@lx001:~/ESMVal/ESMValTool/ESMValTool_Tutorial_v2> mamba update --name base mamba conda
conda-forge/linux-64                                        Using cache
conda-forge/noarch                                          Using cache
ERROR: unknown command "inspect"

Pinned packages:
  - python=3.9

Transaction
  Prefix: /athome/bock_ls/mambaforge
  All requested packages already installed

Transaction starting
Transaction finished

@valeriupredoi
Copy link
Contributor Author

ah they are not old at all! How are you creating the environment then?

@valeriupredoi
Copy link
Contributor Author

it'd be good if you moved to eg Python 3.13 though, 3.9 is not supported anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

issue with Ruby gems: rb-nokogiri from conda-forge is too old and conflicts with modern ruby>3

4 participants