Rails application:: Assets not precompiling

In rails, you may some time have problem of  JS or CSS not being up-to-date. This problem may occur due various reasons:

  • It may occur due to caching by browser: To solve this press CTRL + SHIFT + R button in browser
  • It may occur due to assets caching by Rails server: To solve this type following command in terminal.      [You must be inside the rails app directory in terminal]
rake tmp:cache:clear
rake assets:precompile

# To ensure it works properly, please restart the server once