Problematic local initial setup of the GTK homepage

,

I would like to run the gtk.org site locally,
but I’ve encountered couple issues during initial configuration which I thing should be mentioned.

My setup:
MacOS Sonoma 14.5, Apple M3

As I’m not using Python, my list of pip packages is small.

pip      24.0
wheel    0.43.0

Because of this, the npm i command failed with error ModuleNotFoundError: No module named 'distutils'.

The best approach is to manage it by the python environment, so I installed miniconda and installation passed with base environment just fine.

The setup.sh can run ok now. We don’t need to add +x permissions to run it as bash setup.sh or sh setup.sh. So I wouldn’t do that.

I’m also not a Ruby developer, so the version I have in my system is 2.6.10 and also I can’t upgrade it up as I’m not an admin of this machine.
That was because of an error saying that my bundler is older than required.
So the working way out for me was to install Ruby environment manager rbenv and since then I’m able to switch between Ruby versions and manage packages for the gtk site.

But still, I’m not able to serve the site.

Because the bundler higher than 2.0.2 is required and it requires Ruby >= 2.3.0, I’m on 3.3.4.

Ruby 2.5.0 is mentioned in the Readme file, but it doesn’t work on my machine.
BUILD FAILED (macOS 14.5 on arm64 using ruby-build 20240709.1)

The bundle exec jekyll serve with Ruby 3.3.4 produce an error I can’t get rid off:

Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
/Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/shared_helpers.rb:274:in `search_up': undefined method `untaint' for an instance of String (NoMethodError)

      current  = File.expand_path(SharedHelpers.pwd).untaint
                                                    ^^^^^^^^
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/shared_helpers.rb:261:in `find_file'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/shared_helpers.rb:253:in `find_gemfile'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/shared_helpers.rb:28:in `root'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler.rb:234:in `root'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler.rb:246:in `app_config_path'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler.rb:273:in `settings'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/feature_flag.rb:21:in `block in settings_method'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/cli.rb:97:in `<class:CLI>'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/cli.rb:7:in `<module:Bundler>'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/cli.rb:6:in `<top (required)>'
        from <internal:/Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
        from <internal:/Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/3.3.0/rubygems/core_ext/kernel_require.rb>:136:in `require'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/exe/bundle:23:in `block in <top (required)>'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/bin/bundle:25:in `load'
        from /Users/dominikjelinek/.rbenv/versions/3.3.4/bin/bundle:25:in `<main>'

Thank you.

I have been able to solve it by adding webrick into the Gemfile and run bundle update and run the setup.sh again. Maybe worth to update dependencies.

Ruby 3.1.2
Python 3.11.2
Node.js v18.19.0

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.