Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Managing processes using Foreman gem

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 63
    Comment on it

    Foreman is a gem (aka manager) for managing multiple processes that your rails application is depending upon when running in development environment and also has a option to move it into production environment as well. It is based on a Procfile that we have to create in our rails root and in that file we have to mention the process to be start by just one command i.e. foreman start

    foreman start is the command to start the process those are mentioned in the Procfile. It can be rails server, background jobs worker like delayed jobs, redis server etc

    Example:

    web: bundle exec rails server -p 3001 -e development

    dj: RAILS_ENV=development bundle exec rake jobs:work

    the first line is to run a rails server in 3001 port in development environment. The second is to run the workers.

    Note: Never include foreman gem in your rails gem file.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: