A
A
Askhat Bikmetov2014-12-09 13:50:31
ruby
Askhat Bikmetov, 2014-12-09 13:50:31

Why doesn't CoffeScript compile to Sintra AssetPack?

I'm using Sinatra AssetPack to manage assets in a modular Sinatra app. The gem does a great job with JS, but it doesn't compile CoffeeScript for me.
I added a line js :app, ['/js/app.coffee']to the AssetPack configuration inside app.rb , exactly as described in the AssetPack Readme on Github. Somehow the line <script src='app.coffee'></script>appears in index.slim , but the file is not accessible.
The coffee-script gem is listed in the Gemfile, Node and the coffee-script npm package are installed.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Askhat Bikmetov, 2014-12-09
@askhat

The settings line must be specified js :app, ['/js/app.js']despite the fact that the file has the .coffee extension .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question