rails/rails — Issue #4430: config.assets.precompile does not correctly process Coffeescript files
Author: andrewhao
Created: 2012-01-12 20:12:56+00:00
State: open

Running a Rails 3.1.3 app. Javascript file structure as follows:

app
assets
javascripts
application.js.coffee
foo.js.coffee
bar.js

In `production.rb`:

```ruby
# This adds all *.js and *.js.coffee files to the precompile array.
js_files = Dir.glob(File.join(Rails.root, 'app', 'assets', 'javascripts', '*.js*')).map { |n| File.basename n }
config.assets.precompile += js_files
```

Now when I run `RAILS_ENV=production bundle exec rake assets:precompile`, I see `bar.js` and `application.js`, but not `foo.js`. I expect to see `foo.js` compiled as well.