Hi,
I’m trying to use Rails for the first time and since 3.1 is already in
RC stage I thought I’d use it. The problem is I don’t want any of the
asset pipeline functionality. I decided to use RequireJS in my project
and I simply don’t need asset pipeline or Sprockets. I tried
commenting out config.assets.enabled = true in application.rb or
setting it to false.
I also put
require “action_controller/railtie”
require “action_mailer/railtie”
require “active_resource/railtie”
require “rails/test_unit/railtie”
instead of require ‘rails/all’
No matter what I do, when I run rails server I get the “Could not find
a JavaScript runtime” error. Is it impossible to disable the asset
pipeline or is JavaScript runtime needed for something else?
Regards,
Juliusz Gonera
In your application.rb file change config.assets.enabled to false.
Dieter L.
http://ubiety.ca
I’ll just quote myself:
“I tried commenting out config.assets.enabled = true in application.rb
or
setting it to false.”
Should have paid more attention sorry. Do you have the execjs gem
installed?
Dieter L.
http://ubiety.ca
coffee-script requires execjs to compile the javascript files. Even
with the asset pipeline disabled and coffee-script is required in your
gemfile it will require execjs along with it.
Dieter L.
http://ubiety.ca
At the moment no. I recreated the gemset and commented out those lines
in my Gemfile before running bundle install:
#gem ‘coffee-script’
#gem ‘uglifier’
#gem ‘jquery-rails’
Seems it doesn’t require a JavaScript runtime anymore.
It seems weird to me though that with config.assets.enabled = false
something still tried to use a JS engine.
Thanks, this clears it up.