Skip to content

Instantly share code, notes, and snippets.

@JackHowa
Created May 3, 2017 21:04
Show Gist options
  • Save JackHowa/050fafe828f0142a9c9935cf35b4016e to your computer and use it in GitHub Desktop.
Save JackHowa/050fafe828f0142a9c9935cf35b4016e to your computer and use it in GitHub Desktop.
active record here we go
# installing gems
gem install bundler
# install bundler should already be here on dbc machines
bundle install
# creating database
# makes two dbs - one for model, one test
bundle exec rake db:create
# check the db count version
bundle exec rake db:version
# run test suite
# calls all the rspec
bundle exec rake spec
# migrate
bundle exec rake db:migrate
# go to irb console
bundle exec rake console
# rollback the bass
bundle exec rake db:rollback
# drop the whole thing
# rm -rf db/#[dbs]
bundle exec rake db:drop
# make a migration file
bundle exec rake generate:migration NAME=create_rating
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment