brew update
brew install postgres
postgres -D /usr/local/var/postgres
createuser --interactive
And add it as superuser, just to run locally (never do that in production!)
Enter name of role to add: hotels
Shall the new role be a superuser? (y/n) Y
curl -sSL https://get.rvm.io | bash -s stable
export PATH="$PATH:$HOME/.rvm/bin"
source ~/.bashrc
type rvm | head -n 1
The terminal should show something like "rvm is a shell function".
rvm install ruby-2.2.2
bundle install
bundle exec rake db:create db:migrate db:seed
rspec
rails s -p 3000
Now you enviorement is read to use and you can find all hotels at: * http://localhost:3000/api/hotels *