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

Gracefully handle when assets are not configured #62

Merged
merged 2 commits into from
Jan 4, 2016
Merged

Gracefully handle when assets are not configured #62

merged 2 commits into from
Jan 4, 2016

Conversation

seckenrode
Copy link
Contributor

In sprockets-rails v3, app.assets is now only set when assets.compile is
set to true. This is currently causing an error when upgrading to Rails
4.2.5.

This change will cause CSS Splitter to only be registered when assets
themselves are configured.

Fixes #60

In sprockets-rails v3, app.assets is now only set when assets.compile is
set to true.  This is currently causing an error when upgrading to Rails
4.2.5.

This change will cause CSS Splitter to only be registered when assets
themselves are configured.

Fixes #60
@seckenrode
Copy link
Contributor Author

Before

~/development/css_splitter@seckenrode(master)
$ rake test
/Users/seckenrode/development/css_splitter/lib/css_splitter/engine.rb:6:in `block in <class:Engine>': undefined method `register_bundle_processor' for nil:NilClass (NoMethodError
)
...

After

$ rake test
Run options: --seed 2141

# Running:

DEPRECATION WARNING: You didn't set `secret_key_base`. Read the upgrade documentation to learn more about this new config option. (called from validate_secret_key_config! at /Use
rs/seckenrode/.gem/ruby/2.2.0/gems/railties-4.2.5/lib/rails/application.rb:530)
.............................

Finished in 0.635507s, 45.6328 runs/s, 59.7948 assertions/s.

29 runs, 38 assertions, 0 failures, 0 errors, 0 skips

@seckenrode
Copy link
Contributor Author

Tests are failing in Ruby 1.9.3 due to Travis' version of Bundler being outdated. We ran into this issue with one of our repositories the other day and were able to solve it by adding:

before_install:
  - gem update bundler

See rubygems/bundler#3558 for more information

I made the change to this PR to get the build to pass. Let me know if you would like me to do that separately. These two changes should unbreak master.

jhilden added a commit that referenced this pull request Jan 4, 2016
Gracefully handle when assets are not configured
@jhilden jhilden merged commit f1d62fa into zweilove:master Jan 4, 2016
@jhilden
Copy link
Contributor

jhilden commented Jan 4, 2016

thanks a lot for the fix @seckenrode

I released a new version 0.4.4

I ended up removing the updating of bundler on travis, because it seem to work without it.

@seckenrode
Copy link
Contributor Author

Thanks so much! Travis must have snuck in an update to their bundler version. :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants