Rails 3.1rc4 defaults.js not found
I have a brand ne开发者_高级运维w Rails 3.1rc4 project. After generating a scaffold, migrating and creating a new entry I noticed that I could not destroy the entry I had just created.
It turns out that "/assets/defaults.js" can't be found so the destroy confirmation dialog isn't popped up.
I figure this might have something to do with the new asset pipeline, but searching for solutions has not helped me out much.
Any idea why defaults.js can't be found?
Thanks for any help.
It's most likely because the reference to
javascript_include_tag :defaults
is still in the application layout. That reference should be changed to
javascript_include_tag "application"
I found the issue - somehow (through a gem, probably) my app/views/layouts/application.html.erb file was changed from
<%= javascript_include_tag "application" %>
to
<%= javascript_include_tag :defaults %>
Changing it back to the original fixed my issue.
精彩评论