Probably every developer meets the situation when he starts new Ruby on Rails project and there is need to configure quite large amount of stuff.

Something like this except everything is needed:

Multi tool


What we normally do at the beginning:

  • – create blank RoR application
  • – configure DB connection
  • – configure test infrastructure
  • – configure smtp for e-mailing
  • – attach twitter bootstrap
  • – create admin namespace and role
  • – implement core user management
  • – configure demo application(capistrano, basic stuff to configure new VPS server, DB, monitoring)

and  more…

Quite boring right? And consumes substantial time. At the same time we all want to start creating new unique things for the project ASAP.

So we’ve decided to automate it.

Meet RPSK  – Rails project starter kit!

How to use?

Rails generator can be found under our Github account:

It is equipped with simple instructions about usage.

To run the tool you need:

  1. 1. Clone the repo
  2. 2. Call the script

How does it work?

We’ve chosen proven tools like rails_apps_composer and ansible to create this new instrument to make all the things mentioned above painless and fast.

Basically, this is a script that does several things:

  1. – asks you for details about your project(name, repo address, staging server url, etc)
  2. – creates a directory structure for parts of application(app itself, capistrano deployment, Ansible server provisiong)
  3. – creates all the files and content for you

What do you get as a result?

  1. – Configured rails app
  2. – Ability to provision your staging server(including monitoring with monit)
  3. – Ability to deploy the app using normal capistrano calls

Simple and fast!

Feel free to try the idea and provide feedback in the repo.

What you can check yourself:

  1. – Defaults for Ansible and composer: link
  2. – Configuration of rubocop that we use
  3. – Staging configuration(ansible variables): link

Whats next?

This project is in pretty early state so may contain bugs. Anyway it is already helpful for us so we’ve decided to share it.

There are many things ToDo:

  1. – clean up the code
  2. – improve dialog, notifications and options
  3. – add ability to enter email gateway during process
  4. – add ability to configure Airbrake or Erribit
  5. – Convert it to gem

and may be more.

We are going to improve this tool from time to time. And your ideas and pull requests are also welcome!