I ran rake assets:precompile by mistake on development, and Rails stopped loading the assets on development. I only get application.js and ap
Incase it's helpful to anyone - I had an issue where neither application.js/.css loading in development (I could still see the manifest lines when viewing the source).
I was running an old rails 3.2.2 app for some reason I had to go in and add blank line to both the manifest files (application.js & application.css) and save them - then assets started working properly.
I removed the blank lines and it still worked so I'm assuming perhaps it just needed a newer modified date stamp on the files.
Running rake assets:precompile generates static assets under public/assets which causes Rails to serve these directly. To prevent this you can:
rake assets:cleanOpen config/application.rb and set the following:
config.assets.enabled = true
Try deleting the compiled assets from your local development environment:
rm -rf public/assets
Edit:
In addition, make sure to set config.assets.compress = false and config.assets.debug = true in your development.rb.
tl;dr
$ rake assets:clean$ rails server -e developmentctrl+shift+r on the app pageNow everything should be as it was before you ran rake assets:precompile
-- end tl;dr --
If the above doesn't work, then a detailed list of steps:
$ rake assets:clean or $ rm -rf public/assets to remove the generated assets.config.assets.enabled = true (to enable rails' asset pipleline)config.assets.compress = false (so as to not gzip the assets)config.assets.debug = true (so as to not merge all css and js files into application.[cs|js])config.assets.compile = true (or not set - to enable runtime compilation of assets)config.serve_static_assets = false (or not set)$ rails server -e developmentThis should fix it.
If cleaning your asset directory and ensuring your configuration was correct as indicated by the previous answers did not work - is there a possibility that you're using page caching?
If the page was generated with src tags pointing to your compiled files, they would need to be regenerated now.