简体   繁体   中英

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.

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 .

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM