rnaud
rnaud

Reputation: 2622

Why do I need a javascript compiler if I always precompile my assets?

I am runnning rails 3.1 on my heroku server (but with the bamboo stack). Since 3.1, I had to add a javascript compiler for uglifier. So I'm using therubyracer-heroku for now.

The reason I'm wondering is that I'm always precompiling my assets, and even pushing them to Amazon S3. So why should I still need a compiler on the host ?

I'm asking because therubyracer is a heavy gem, and so a lot of requests are failing because of memory issues.

Upvotes: 1

Views: 164

Answers (1)

rnaud
rnaud

Reputation: 2622

A bit late on the answer, but you actually do not need a javascript runtime on the production server, and you should not.

You should turn of compiling on the server with : config.assets.compile = false And precompile all the assets before deploying.

Upvotes: 1

Related Questions