Skip to content

ryanbriones/dbc-sinatra-crud-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ryan's First Sinatra CRUD app

This is an app that will allow you to store, edit and manage contacts.

Getting Started

Clone the app

$ git clone https://github.com/ryanbriones/dbc-sinatra-crud-example.git
$ cd dbc-sinatra-crud-example

Install bundled gems

$ bundle install

Setup your database

$ bundle exec rake db:create
$ bundle exec rake db:migrate

NOTE: Because of the way the sinatra skeleton is built, you may experience an issue with rake db:create. This is because Mac OS X includes some postgresql utilities by default that don't work well with the postgresql installation you've done. If this is the case, if this is the case, you'll want to edit Rakefile line 92 which looks like

exec("createdb #{DB_NAME}")

To be something more like:

exec("/usr/local/bin/createdb #{DB_NAME}")

/usr/local/bin is where Homebrew puts things by default.

Run your application using shotgun. shotgun is installed as a result of bundle install

$ shotgun

Profit! http://localhost:9393/

Authors

For complaints... or praise...

Ryan Briones ryan@devbootcamp.com

About

An example sinatra app implementing CRUD-style

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published