Skip to content

Instantly share code, notes, and snippets.

@Ross-Hunter
Created January 6, 2015 13:53
Show Gist options
  • Save Ross-Hunter/6441dfe6576792914207 to your computer and use it in GitHub Desktop.
Save Ross-Hunter/6441dfe6576792914207 to your computer and use it in GitHub Desktop.

#Automate your life!

##Foreman is a thing for running multiple processes https://github.com/ddollar/foreman

You define your processes using a Procfile

something like...

web: bundle exec rails s
worker:  bundle exec rake jobs:work
guard: bundle exec guard start -i

(you may recognize this from Heroku)

You can run Foreman specifying a Procfile

be foreman start -f Procfile.dev

I do this to run unicorn on the server and thin locally. I want single thread for my dev environment so I can more easily use Pry. Maybe this is bad practice ¯\_(ツ)_/¯

##Web runs your web thing

##Worker runs backgroud processes

#Guard watches for file changes and runs tasks https://github.com/guard/guard

Here are some good plugins

Rspec - run tests automatically when a file changes
Livereload - insert assets into the browser without refresh
Bundler - automatically bundle when Gemfile changes
Rubocop - runs code quality tool on changed files

https://github.com/guard/guard/wiki/List-of-available-Guards

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