Skip to content

Instantly share code, notes, and snippets.

@bitfidget
Last active August 29, 2015 13:57
Show Gist options
  • Save bitfidget/9592267 to your computer and use it in GitHub Desktop.
Save bitfidget/9592267 to your computer and use it in GitHub Desktop.
RAILS begins today...

all goodness starts with a simple line: rails new first_app -d postgresql (where 'first_app' is the folder name of the new app)

then go into the folder and add the basics: rails generate scaffold movie title:string in_theatres:boolean released:date rating:string description:text

go into config/database and chnage the username to match usenrame

back in terminal: rake db:create

then: rake db:migrate

then fire up your server: rails server

open your browser, go to localhost:300 and watch the amazingness.

PRY no longer applies :( but instead you can go to your console and add: rails console

In the cosole open up 4 tabs one with the console of your current folder one with the server (rails server) one with the (rails console) one with psql

tadah! you have pry that can access EVERYTHING in your rails app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment