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

better-errors v2.10.0 breaks development #1977

Closed
1 task done
ClasherKasten opened this issue May 4, 2023 · 1 comment · Fixed by #1979
Closed
1 task done

better-errors v2.10.0 breaks development #1977

ClasherKasten opened this issue May 4, 2023 · 1 comment · Fixed by #1979
Labels

Comments

@ClasherKasten
Copy link
Contributor

Bug report

Cloning the latest version of devdocs and trying to spin up the local development raises the following error (An image to the error is appended at the end):

<internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require': cannot load such file -- sassc (LoadError)
Did you mean?  sass
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/better_errors-2.10.0/lib/better_errors/error_page_style.rb:1:in `<top (required)>'
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/better_errors-2.10.0/lib/better_errors/error_page.rb:5:in `<top (required)>'
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/better_errors-2.10.0/lib/better_errors.rb:8:in `<top (required)>'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler/runtime.rb:60:in `require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler/runtime.rb:55:in `each'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler/runtime.rb:55:in `block in require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler/runtime.rb:44:in `each'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler/runtime.rb:44:in `require'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/bundler-2.4.6/lib/bundler.rb:195:in `require'
	from /tmp/tests/devdocs/lib/app.rb:7:in `<class:App>'
	from /tmp/tests/devdocs/lib/app.rb:6:in `<top (required)>'
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from <internal:/tmp/tests/devdocs/rbenv_broken/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
	from /tmp/tests/devdocs/config.ru:5:in `block in <main>'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `eval'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:116:in `new_from_string'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:105:in `load_file'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/builder.rb:66:in `parse_file'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:349:in `build_app_and_options_from_config'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:249:in `app'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:422:in `wrapped_app'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:312:in `block in start'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:379:in `handle_profiling'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:311:in `start'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/lib/rack/server.rb:168:in `start'
	from /tmp/tests/devdocs/rbenv_broken/lib/ruby/gems/3.2.0/gems/rack-2.2.7/bin/rackup:5:in `<top (required)>'
	from /tmp/tests/devdocs/rbenv_broken/bin/rackup:25:in `load'
	from /tmp/tests/devdocs/rbenv_broken/bin/rackup:25:in `<main>'
	from /tmp/tests/devdocs/rbenv_broken/bin/ruby_executable_hooks:22:in `eval'
	from /tmp/tests/devdocs/rbenv_broken/bin/ruby_executable_hooks:22:in `<main>'
  • Search for existing issues; it's possible someone has already encountered this bug.
    Result: Nothing found

OS information

Ubuntu 22.04

Steps to reproduce

  • Clone the repository
  • Setup and activate ruby virtual environment(s) (Personal step, should be reproducible with a system wide installation/rbenv too)
  • run bundle install
  • run bundle exec rackup

Possible fix

As can be seen from the v2.10.0 changelog better-errors uses SASS now. However they use the recommended sassc instead of the old sass this project has in its dependencies.

This seems solved by simply adding sassc to the requirements (Working again image appended):
git dif Gemfile:

diff --git a/Gemfile b/Gemfile
index f276b263..ca58f737 100644
--- a/Gemfile
+++ b/Gemfile
@@ -22,6 +22,7 @@ group :app do
   gem 'rack'
   gem 'rss'
   gem 'sass'
+  gem 'sassc'
   gem 'sinatra-contrib'
   gem 'sinatra'
   gem 'sprockets-helpers'

git diff Gemfile.lock:

diff --git a/Gemfile.lock b/Gemfile.lock
index deab4c98..c9a723a8 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -92,6 +92,8 @@ GEM
     sass-listen (4.0.0)
       rb-fsevent (~> 0.9, >= 0.9.4)
       rb-inotify (~> 0.9, >= 0.9.7)
+    sassc (2.4.0)
+      ffi (~> 1.9)
     sinatra (3.0.6)
       mustermann (~> 3.0)
       rack (~> 2.2, >= 2.2.4)
@@ -165,6 +167,7 @@ DEPENDENCIES
   rr
   rss
   sass
+  sassc
   sinatra
   sinatra-contrib
   sprockets

In this diff I put sassc in the :app section, but it should work just fine when putting it in the :development section I guess.

More resources

Screenshot broken:
Screenshot from 2023-05-04 16-31-47

Screenshot working:
Screenshot from 2023-05-04 16-41-21

Notes

  • Is it worth a thought moving away from sass fully using sassc as the official replacement so devdocs does not have to include both of them as dependencies?
@RossBarnie
Copy link

RossBarnie commented May 11, 2023

Given this is a bug in BetterErrors I think we take the approach of some other projects and lock the version of BetterErrors to 2.9 rather than introducing a direct dependency in devdocs.

On your note about moving to sassc it looks like sassc isn't exactly maintained either since libsass is no longer maintained and projects are being encouraged to move to Dart Sass, so the way forward for us is likely sass-embedded.

EDIT: typo

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

Successfully merging a pull request may close this issue.

2 participants