Skip to content

Instantly share code, notes, and snippets.

@brianpattison
Last active March 12, 2021 00:29
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brianpattison/982969db36c4c8a8288e to your computer and use it in GitHub Desktop.
Save brianpattison/982969db36c4c8a8288e to your computer and use it in GitHub Desktop.
Rails Livereload
Booth::Application.configure do
# Add Rack::LiveReload to the bottom of the middleware stack with the default options.
config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload
end
source "https://rubygems.org"
ruby "2.2.2"
gem "rails", "4.2.0"
group :development do
gem "foreman"
gem "guard-livereload", require: false
gem "rack-livereload"
end
# More info at https://github.com/guard/guard#readme
guard :livereload do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|html|jpg|js|png|scss))).*}) {|m| "/assets/#{m[3]}" }
end
livereload: bundle exec guard start -i -g livereload
web: bundle exec rails s Puma --binding 0.0.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment