Rails 4 assets.precompile

asset-pipeline, ruby-on-rails

Solution

It is solved by adding :

config.assets.precompile += %w( index.js )

to `config/application.rb`. (not `config/environments/production.rb`)

Tested in Rails 4.0 beta1.

Problem

This is a common question in here, but none of the solutions fixed my problem, so here it goes: I am adding ace.js to my rails4 app, So what I did was ``` - Added vendor/assets/ace/ace.js - Created vendor/assets/ace/index.js , with content //= require ace - Added the following to my production.rb config.assets.precompile += %w( index.js ) config.assets.paths << Rails.root.join("vendor", "assets", "ace") ``` So in my layout file I have: ``` <%= javascript_include_tag "ace" %> ``` and it works just fine on dev, but when I run: ``` RAILS_ENV=production bundle exec rake assets:precompile ``` It doest not create the digest version of the ace file. Am I missing something?

Original source