Skip to content

bstrech/tourbooker

Repository files navigation

DEVELOPMENT ENVIRONMENT SETUP

  • Using SQLite for this project just because it was easy to setup

Install RVM

curl -L get.rvm.io | bash -s stable source /Users//.rvm/scripts/rvm

Install Ruby 1.9.3 on RVM


rvm install ruby-1.9.3-p362 (if this doesn’t work for you, you might try: env ARCHFLAGS=“-arch x86-64” rvm install ruby-1.9.3-p362)

Switch RVM to use this ruby


rvm ruby-1.9.3-p362

Confirm RVM Ruby Version


ruby -v

Create the RVM gemset for this project


rvm gemset create tourbooker

Use this gemset


rvm use ruby-1.9.3-p362@tourbooker

Install Bundler

gem install bundler

Install phantomjs

Normally I would install phantomjs on a project as well. Not needed for this project.

Install phantomjs in order to run tests headless on the command line. The easiest way (on a Mac) is to use homebrew - github.com/mxcl/homebrew:

brew install phantomjs

Install rails & dependencies

bundle install

Run migrations

bundle exec rake db:test:clone

Start your server

rails server

In your browser navigate to localhost:3000

Unit Tests

in console of the root. Set up your test db

  • bundle exec rake db:test:clone

Run tests

  • bundle exec rspec

Mail Setup

Default configuration is a basic SMTP. Sample configurations are in development.rb. NOTE: development environment is configured with perform_deliveries as false.

DEPLOYMENT SETUP

I have set up the app to deploy with capistrano (just what I have used in the past), but the configurations have not been set up yet.

Some things that need to happen (this is not an inclusive list or necessarily in order)

  • Add all deployment steps (i.e. run bundle install, run migrations, generate assets for pipeline, restart server)

  • Add argument to production deploy to indicate a tag/git sha to deploy (I firmly believe in tagging the repo for releases to production and knowing exactly what you are deploying)

  • Add configurations for database.yml (should be a separate copy which isn’t kept in git and only on the production servers)

  • Configure environment specific deploy files (production and staging are there by default)

About

Sample Rails App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published