Skip to content

A barebones starter pack for sinatra. Good for static sites that you might want to make into dynamic.

License

Notifications You must be signed in to change notification settings

mbesto/sinatra-barebones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sinatra Barebones

This is a barebones implementation of Sinatra with ActiveRecord. This is a simplified way of creating a web app simply for CRUD operations and static websites that you might want to add functionality to later.

  1. bundle install to install gems
  2. edit database.yml (set to db parameters)
  3. edit models as needed
  4. run rake db:create_migration NAME=create_model (db folder gets created with migrations)
  5. run rake db:create (this might not work, might have to manually create the db using createdb in bash)
  6. run rake db:migrate
  7. create an .env file with RACK_ENV=production (or whatever environment)
  8. ruby app.rb to run the app locally

Inspired from these tutorials

For my Webfaction server, make sure the following are done when SSH'd:

  • Enter export GEM_HOME=$PWD/gems and press Enter.
  • Enter export RUBYLIB=$PWD/lib and press Enter.
  • Enter export PATH=$PWD/bin:$PATH and press Enter.

About

A barebones starter pack for sinatra. Good for static sites that you might want to make into dynamic.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages