chell
chell

Reputation: 7866

ActionController::RoutingError (No route matches "/javascripts/rails.js")

I am using the jquery gem and have installed everything which removes proton.

I am getting this error and I don't understand why?

ActionController::RoutingError (No route matches "/javascripts/rails.js")

I see it in the log.

Any ideas.

Thanks.

Upvotes: 7

Views: 6198

Answers (2)

Costa Shapiro
Costa Shapiro

Reputation: 544

I've just fixed a similar problem -- after updating my bundle (including jquery-rails) and running rails generate jquery:install (updating jquery itself). As far as I understand, rails.js is now replaced by jquery_ujs.js (I'm not sure it is a smart move though).

You should go on and eliminate any references to rails.js in your app, two possible places to look in are:

config/application.rb — you can probably remove the config.action_view.javascript_expansions[:defaults] = %w(jquery rails) line completely

and

app/views/layouts/application.* — you should have a != javascript_include_tag :defaults line there and not references to jquery or rails.

Upvotes: 8

Franck Verrot
Franck Verrot

Reputation: 1041

What environment are you running (dev/test/prod) ? If it's prod, is your Rails app configured to serve the static assets?

Upvotes: 2

Related Questions