Closed jsmestad closed 6 years ago
For folks who want to build the minimum assets with compilation off, add the following to their parent app:
# config/initializers/assets.rb
# ...
Rails.application.config.assets.precompile += %w( apitome/application.css apitome/application.js apitome/highlight_themes/default.css )
Did this change disable the precompile_assets
flag?
I have an application which does not use assets. After updating apitome from 0.1.0 to 0.3.0, I'm unable to start our app.
$ bin/rails s
... stack trace ...
1: from /Users/alex/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/apitome-0.3.0/lib/apitome/engine.rb:15:in `block in <class:Engine>'
/Users/alex/.rvm/rubies/ruby-2.5.5/lib/ruby/gems/2.5.0/gems/railties-5.2.4.2/lib/rails/railtie/configuration.rb:97:in `method_missing': undefined method `assets' for #<Rails::Engine::Configuration:0x00007fc790aa1e78> (NoMethodError)
Background
On projects where CSS and JS is off-loaded to a CDN or S3 bucket, we were generating a bunch of extra highlight.js styles we were never using. We wanted a way to disable that and control what is compiled inside the parent application.
Changes
precompile_assets
flag, still defaulting totrue
#respond_to? (:assets)
having a space, Ruby 2.5 won't allow that.Minor other changes
.gemspec
so it can run with newer Ruby versions..travis.yml
to have a run matrix against all current Ruby versions