Last Updated: February 25, 2016
· bryanmikaelian

Improved Sinatra Bootstrap

Adam Stacoviak has created a great way to bootstrap a Sinatra project. However, after you clone your fork locally, I noticed the new project's remote repo is tied to your fork of Adam's repo and a straight clone, into your new project's directory, will put the files in the wrong spot.

Here is a quick fix with the power of aliases to clean some things up once you bootstrap:

alias sinatra-strap='git clone .; git remote rm origin; bundle install

This bootstraps a Sinatra project using your fork of Adam's repo in the current directory, removes the origin and (for convenience) performs a bundle install. Now you are good to go and the project can have its own remote repo. My workflow is now as follows:

$ mkdir the_next_twitter_killer
$ cd the_next_twitter_killer
$ sinatra-strap