I’m working on a Sinatra project that’s using Sprockets. When I add a new stylesheet in the assets folder, I get this error:
Error compiling CSS asset
Sprockets::NotImplementedError: Custom asset_path helper is not
implementedExtend your environment context with a custom method.
environment.context_class.class_eval do def asset_path(path, options = {}) end end
What am I doing wrong?
I followed the error message’s suggestion: I defined the
asset_pathmethod inconfig.ru:I’m still not sure why this is needed, but it made the error go away.