Skip to content

Instantly share code, notes, and snippets.

@vishwassharma
Created May 21, 2012 06:41
Show Gist options
  • Save vishwassharma/2760842 to your computer and use it in GitHub Desktop.
Save vishwassharma/2760842 to your computer and use it in GitHub Desktop.
How To : Set up Guard / Guard-livereload for Node

How to bootstrap

On Ubuntu

###1. Before that make sure that you dont have any ruby package installed on your system

    sudo apt-get purge ruby
    sudo apt-get purge ruby-gems
    sudo apt-get purge ruby1.9.3

###2. Install RVM package

Go to the this site where you will find the installation instruction for rvm installation

###3. Install Ruby1.9.3 If ruby is not installed then do this

rvm install 1.9.3

else do this

rvm use 1.9.3

if you want to make your ruby version the default version then

rvm use 1.9.3 --default

###4. Install rubygems

Go to this site and install ruby gem using manual installation instructions

###5. Install jasmine

gem install jasmine

###6. Then install guard

gem install guard

###7. Install guard-livereload First install the guard live reload plugin using this command

gem install guard-livereload  
gem install guard-coffeescript  
gem install guard-compass  

After it has been installed then get the browser plugin from here

###8. Initialize for live reload

guard init

and then edit the new Guard file with this

###9. Install node packages

Use the template package here

or use this

git clone git://gist.github.com/2760824.git gist-2760824

and then run

npm install

to initialize the packages required

###10. After doing this you can start guard

guard

Now all the changes will be monitered by the browser automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment