Live Reloading in Rails
Introduction
When developing the frontend of any application, the most tedious thing is refreshing the client/server. Luckily, when it came to HTML, I had live server; and when it came to Node, I had Nodemon. When it came to ruby, the server refreshed but not the client.
Rails Live Reload
Is a Rails live reloader for views, partials, css, and js. This means that every single time you save a .erb, .css or .js file, the page will reload to show the changes.
Configuration
- In Gemfile add:
In order to only download this gem in development. Then run bundle.
- Create Initializer
- Enjoy! With just two steps you saved yourself hours of refreshing the client in Rails!