`Sprockets::Context` takes a `Pathname` for its third argument
As far as I can tell, sprockets has always expected the third argument to be a `Pathname` object. Not sure what actually changed and why it was working before, but it now throws a `NoMethodError` for `dirname` on `String` in `Context#resolve` # , not sure why this was working before
This commit is contained in:
parent
568ed3beaa
commit
f749961d97
|
@ -1,4 +1,5 @@
|
|||
require_dependency 'sass/discourse_sass_importer'
|
||||
require 'pathname'
|
||||
|
||||
class DiscourseSassCompiler
|
||||
|
||||
|
@ -41,7 +42,8 @@ class DiscourseSassCompiler
|
|||
env = env.instance_variable_get('@environment')
|
||||
end
|
||||
|
||||
context = env.context_class.new(env, "#{@target}.scss", "app/assets/stylesheets/#{@target}.scss")
|
||||
pathname = Pathname.new("app/assets/stylesheets/#{@target}.scss")
|
||||
context = env.context_class.new(env, "#{@target}.scss", pathname)
|
||||
|
||||
debug_opts = Rails.env.production? ? {} : {
|
||||
line_numbers: true,
|
||||
|
|
Loading…
Reference in New Issue