Skip to content

Instantly share code, notes, and snippets.

@alanmaciel
Created October 31, 2012 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanmaciel/3989285 to your computer and use it in GitHub Desktop.
Save alanmaciel/3989285 to your computer and use it in GitHub Desktop.
App init
> rails new sample_app --skip-test-unit -d postgresql
> cd sample_app
sample_app> vim .rvmrc
paste .vimrc gist
https://gist.github.com/3989303
sample_app> vim Gemfile
paste Gemfile gist
https://gist.github.com/3989287
Install gems
sample_app> bundle install --without production
Install and configure rspec
sample_app> rails generate rspec:install
sample_app> vim .gitignore
paste .gitignore gist
https://gist.github.com/3989408
sample_app> vim config/database.yml
paste database.yml gist
https://gist.github.com/3989428
Initialize the git repo
sample_app> git init
sample_app> git add .
sample_app> git commit -m "Initial commit"
Improve the Readme file
sample_app> vim README.rdoc
paste README.md gist
https://gist.github.com/3989345
sample_app> git mv README.rdoc README.md
sample_app> commit -am "Custom README"
Create the code repository in
github (http://www.github.com/)
bitbucket (https://bitbucket.org/repo/create)
add Wiki and Issue Tracking
sample_app> git remote add origin <git@...>
sample_app> git push -u origin master
Create the project administration
assembla (https://www.assembla.com/) to add, share and update the project user stories with the team.
Create heroku deployment
sample_app> heroku create --stack cedar
sample_app> git push heroku master
Install rspec
sample_app> rails generate rspec:install
Configure Guard
https://gist.github.com/3989435
Initialize guard to work with RSpec
sample_app> guard init rspec
sample_app> vim Guardfile
paste gist
https://gist.github.com/3989960
Start Guard
sample_app> guard
if you get a Guard error complaining about the absence of a spec/routing directory, you can fix it by creating an empty one:
sample_app> mkdir spec/routing
Speed up tests with Spork, ad spork to Gemfile, install with bundle install
make the bootstrap with:
sample_app> spork --bootstrap
Add environment loading to the Spork.prefork block in spec/spec_helper.rb:
sample_app> vim spec/spec_helper.rb
paste gist:
https://gist.github.com/3990030
Install git flow
sample_app> git flow init
Create a branch to start modifications:
sample_app> git checkout -b content-pages
sample_app> rails generate controller StaticPages home help --no-test-framework
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment