sudo apt-get install ruby1.9.1 ruby1.9.1-dev
Now install these RubyGems,
sudo gem install bundle sudo gem install guard sudo gem install guard-livereload
Inside your project folder, execute:
If you get an error saying ‘bundle: command not found’, then you need to add the ruby gem executable directory to your path.
The path mentioned in the above command might be different in your case – based on your Linux distribution and version. In my case, I am using Ubuntu 11.04.
Once bundle init runs successfully, a Gemfile will be created in your project folder. Open this file and add these lines,
gem 'guard' gem 'guard-livereload'
bundle exec guard init livereload
Now a Guardfile will be created in your project folder. This Guardfile contains some predefined monitoring directories which you might have to modify based on your project.
At this point, you can start the Guard server by executing,
bundle exec guard
Install the LiveReload browser extension