Last Updated: January 06, 2019
· joshtgreenwood

How to show code changes instantly in chrome with guard-livereload gem

I got really tired of reloading chrome every time I changed a tiny piece of code so I've started using guard to push my changes to chrome instantly; no ⌘ + r needed. Here's how I set it up:

Add the LiveReload Chrome extension to your browser.

Add the guard-livereload gem to your app. I added it to my development group:


group :development do
  gem 'guard-livereload'

Now in the root of your project, run:

$ bundle exec guard init livereload
   02:45:50 - INFO - Writing new Guardfile 
   02:45:50 - INFO - livereloar added to Guardfile
$ guard
   02:49:47 - INFO - Guard uses TerminalTitle to send notifications.
   02:49:48 - INFO - LiveReload 1.6 is waiting for a browser to connect.
   02:49:48 - INFO - Guard is now watching at 'path/to/myapp'

Now press the Chrome LiveReload icon and you should get this message in your console:

guard(main)> 02:49:51 - INFO - Browser connected.

Now try making a small change to your app and watch it automagically reload in Chrome. Pretty cool, eh?

2 Responses
Add your response

thanks a lot!

over 1 year ago ·

Thank u very much..

over 1 year ago ·