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

Add more constraints to the gemfile #386

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

aaruni96
Copy link
Member

@aaruni96 aaruni96 commented Nov 6, 2024

This maintains compatibility with Ruby 3.3.5

This maintains compatibility with Ruby 3.3.5
@aaruni96
Copy link
Member Author

aaruni96 commented Nov 6, 2024

@HereAround can you check if this works on your machine, i.e., that it does not break compatibility with an older version of ruby ? (I assume if you don't need these changes to run jekyll serve, you are on Ruby 3.2 ?)

@HereAround
Copy link
Member

HereAround commented Nov 6, 2024

When I executed bundle exec jekyll serve, it lead to the following error:

Could not find gem 'sassc (= 2.1.0)' in locally installed gems.

The source contains the following gems matching 'sassc':
  * sassc-2.4.0
Run `bundle install` to install missing gems.

So I executed bundle install:

Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Fetching logger 1.4.2
Fetching sassc 2.1.0 (x86_64-linux) (was 2.4.0)
Installing logger 1.4.2
Installing sassc 2.1.0 (x86_64-linux) (was 2.4.0)
Bundle complete! 8 Gemfile dependencies, 34 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.

After this, bundle exec jekyll serve completes successfully and builds the website for me. Sadly though, jekyll serve - which I found very convenient - does not function any more after this change. (But this might not be the most important thing in the world.)

/home/i/gems/gems/bundler-2.5.4/lib/bundler/runtime.rb:304:in `check_for_activated_spec!': You have already activated sassc 2.4.0, but your Gemfile requires sassc 2.1.0. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
        from /home/i/gems/gems/bundler-2.5.4/lib/bundler/runtime.rb:25:in `block in setup'
        from /home/i/gems/gems/bundler-2.5.4/lib/bundler/spec_set.rb:191:in `each'
        from /home/i/gems/gems/bundler-2.5.4/lib/bundler/spec_set.rb:191:in `each'
        from /home/i/gems/gems/bundler-2.5.4/lib/bundler/runtime.rb:24:in `map'
        from /home/i/gems/gems/bundler-2.5.4/lib/bundler/runtime.rb:24:in `setup'
        from /home/i/gems/gems/bundler-2.5.4/lib/bundler.rb:162:in `setup'
        from /home/i/gems/gems/jekyll-4.2.2/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
        from /home/i/gems/gems/jekyll-4.2.2/exe/jekyll:11:in `<top (required)>'
        from /home/i/gems/bin/jekyll:25:in `load'
        from /home/i/gems/bin/jekyll:25:in `<main>'

Long story short: I first had to install/update some packages on my machine. Only after that, jekyll could build the website on my system/machine.

@HereAround
Copy link
Member

My ruby version:

ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-linux-gnu]

@aaruni96
Copy link
Member Author

aaruni96 commented Nov 6, 2024

This is interesting: sassc 2.4 causes it to not build on my environment, but downgrading it to 2.1 (which makes it possible to build on my machine) requires you to do a bundle exec...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants