Skip to content

Rails 4.1. See https://github.com/rails/sprockets-rails/pull/84#178

Merged
jfirebaugh merged 3 commits intojfirebaugh:masterfrom
pablobm:rails-4.1
May 24, 2014
Merged

Rails 4.1. See https://github.com/rails/sprockets-rails/pull/84#178
jfirebaugh merged 3 commits intojfirebaugh:masterfrom
pablobm:rails-4.1

Conversation

@pablobm
Copy link
Copy Markdown
Contributor

@pablobm pablobm commented May 23, 2014

Fixes issue #176, caused by a change on Rails 4.1.

Rails 4.1 actively verifies that any assets served on development can actually be served on production. This behaviour is controlled by the config setting app.config.assets.raise_runtime_errors, which by default is false on test and true on other environments. See rails/sprockets-rails#84 for discussion.

JS tests don't fulfil this requirement because they are not listed for precompilation. Simply setting raise_runtime_errors to false would not be a good solution, as users would be back to not noticing when their assets won't work on production.

Instead, this commit solves the problem by adding the test files to the precompilation list.

@jnbt
Copy link
Copy Markdown
Collaborator

jnbt commented May 23, 2014

One only has to keep in mind that konacha must be required in development and testing environment only. Otherwise this would lead to a lot of precompilations. Perhaps there should be a warning in the case of the production environment.

@pablobm
Copy link
Copy Markdown
Contributor Author

pablobm commented May 23, 2014

Figured out how to test this. Added appropriate commits.

@pablobm
Copy link
Copy Markdown
Contributor Author

pablobm commented May 23, 2014

@jnbt indeed, although I think that's a separate problem.

Konacha's documentation already mentions adding the gem to the :test, :development groups on your Gemfile. That should be enough, although I agree that having Konacha show a warning on production mode could be a good idea.

@pablobm
Copy link
Copy Markdown
Contributor Author

pablobm commented May 23, 2014

Hmm...? The build passed, but it appears as non-passing here. Someone care to replay it?

jfirebaugh added a commit that referenced this pull request May 24, 2014
@jfirebaugh jfirebaugh merged commit 5e80044 into jfirebaugh:master May 24, 2014
@jfirebaugh
Copy link
Copy Markdown
Owner

Thanks, released in 3.2.3.

@pablobm pablobm deleted the rails-4.1 branch May 24, 2014 23:13
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.

3 participants