Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 392
chell Avatar asked Jun 22 '11 04:06

chell


2 Answers

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.

like image 162
Costa Shapiro Avatar answered Sep 22 '22 00:09

Costa Shapiro


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

like image 45
Franck Verrot Avatar answered Sep 25 '22 00:09

Franck Verrot