jfirebaugh / konacha

Test your Rails application's JavaScript with the mocha test framework and chai assertion library
Other
1.05k stars 117 forks source link

Asset filtered out and will not be served #194

Closed paneq closed 9 years ago

paneq commented 9 years ago

Following the instructions in README for bundle exec rake konacha:serve Rails 4.2 leads an error upon visiting the page in browser:

ActionView::Template::Error at /
Asset filtered out and will not be served: add `Rails.application.config.assets.precompile += %w( konacha.css )` to `config/initializers/assets.rb` and restart your server

I had to add config.assets.precompile += %w( konacha.css mocha.js konacha/parent.js chai.js konacha/iframe.js array_sum_spec.js) in development.rb to make it work or

config.assets.precompile += %w( konacha.css mocha.js konacha/parent.js chai.js konacha/iframe.js)
config.assets.precompile += [/.*_spec\.js/]

Related:

paneq commented 9 years ago

For rake konacha:run to work I had to add konacha/runner.js to the list as well

jfirebaugh commented 9 years ago

Konacha's default setting of app.config.assets.raise_runtime_errors = false disables this error. Have you overridden the default?