File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,20 @@ module BetterErrors
22 # @private
33 module ErrorPageStyle
44 def self . compiled_css ( for_deployment = false )
5- require "sassc"
5+ begin
6+ require "sassc"
7+ rescue LoadError
8+ raise LoadError , "The `sassc` gem is required when developing the `better_errors` gem. " \
9+ "If you're using a release of `better_errors`, the compiled CSS is missing from the released gem"
10+ # If you arrived here because sassc is not in your project's Gemfile,
11+ # the issue here is that the release of the better_errors gem
12+ # is supposed to contain the compiled CSS, but that file is missing from the release.
13+ # So better_errors is trying to build the CSS on the fly, which requires the sassc gem.
14+ #
15+ # If you're developing the better_errors gem locally, and you're running a project
16+ # that does not have sassc in its bundle, run `rake style:build` in the better_errors
17+ # project to compile the CSS file.
18+ end
619
720 style_dir = File . expand_path ( "style" , File . dirname ( __FILE__ ) )
821 style_file = "#{ style_dir } /main.scss"
You can’t perform that action at this time.
0 commit comments