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

Release 2.10.0 requires sassc as dependency #516

Closed
bb opened this issue Apr 28, 2023 · 7 comments · Fixed by mihkelal/todonaut#86
Closed

Release 2.10.0 requires sassc as dependency #516

bb opened this issue Apr 28, 2023 · 7 comments · Fixed by mihkelal/todonaut#86

Comments

@bb
Copy link

bb commented Apr 28, 2023

I just tried to upgrade from 2.9.1 to 2.10.0 in a Rails project which is not using sassc itself.

The new version depends on sassc and is using it in better_errors-2.10.0/lib/better_errors/error_page_style.rb:1 without actually depending on it in the Gemfile.

This results in an Error when trying to run console or server:

<internal:/Users/bb/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- sassc (LoadError)
	from <internal:/Users/bb/.rvm/rubies/ruby-3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /Users/bb/.rvm/gems/ruby-3.2.2/gems/bootsnap-1.16.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
	from /Users/bb/.rvm/gems/ruby-3.2.2/gems/better_errors-2.10.0/lib/better_errors/error_page_style.rb:1:in `<main>'
...

Alternatively (and for me preferably), maybe the sass files could be compiled into the published Gem?

@clairity
Copy link

i just ran into this same error, on ruby 3.2.2 / rails 7.1.0.alpha with sprockets but no pre-processing of css/js assets (so no sass).

@andyjeffries
Copy link

Bit me too. Using Rails 7 with esbuild/tailwindcss (so no need for SASS in this project at all)

@rnestler
Copy link

rnestler commented May 3, 2023

Looking at https://github.com/BetterErrors/better_errors/pull/498/files it looks like the original plan was indeed to bundle the compiled css:

When the gem is built (in CI), main.css is built with the compressed CSS and included in the gem. The scss files are not included in the gem.

So the ErrorPageStyle module should probably just be split into the runtime part (which doesn't depend on scss) and the development part which does.

monfresh pushed a commit to smcgov/SMC-Connect that referenced this issue May 5, 2023
There's a bug in 2.10 that requires `sassc`: BetterErrors/better_errors#516
RossBarnie pushed a commit to RossBarnie/devdocs that referenced this issue May 11, 2023
better_errors version 2.10.0 has a known bug
BetterErrors/better_errors#516 whereby there
is a call to `require 'sassc'` without the gem specifiying `sassc` as a
dependency, so is not installed by dependent projects. The impact on
devdocs is that the application cannot start in development environment
without adding `sassc` as a dependency.
RossBarnie pushed a commit to RossBarnie/devdocs that referenced this issue May 13, 2023
better_errors version 2.10.0 has a known bug
BetterErrors/better_errors#516 whereby there
is a call to `require 'sassc'` without the gem specifiying `sassc` as a
dependency, so is not installed by dependent projects. The impact on
devdocs is that the application cannot start in development environment
without adding `sassc` as a dependency.
@jrmhaig
Copy link

jrmhaig commented May 18, 2023

Can you please clarify whether it is necessary for projects using better_errors to also include sassc as a development dependency explicitly or will there be a new version that resolves this?

@thomasdarde
Copy link

Hi , any update on this ?

@mattbrictson
Copy link

Looks like this issue can be closed. It has been fixed by #520 in better_errors 2.10.1.

@bb
Copy link
Author

bb commented Jun 14, 2023

Thank you @RobinDaugherty and @jackjennings!

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