A skeleton web application configured to use Sinatra and ActiveRecord
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

README: a secret key must be created early

+10 -6
+10 -6
README.md
··· 16 16 17 17 Clone `sinatree`: 18 18 19 - git clone https://github.com/jcs/sinatree.git 19 + $ git clone https://github.com/jcs/sinatree.git 20 20 21 21 Then install Bundler dependencies: 22 22 23 - bundle install --path vendor/bundle 23 + $ bundle install --path vendor/bundle 24 + 25 + Initialize a session secret key: 26 + 27 + $ ruby -e 'require "securerandom"; print SecureRandom.hex(64)' > config/session_secret 24 28 25 29 To create a database table `users` for a new `User` model: 26 30 27 - $EDITOR `bundle exec rake db:create_migration NAME=create_user_model` 31 + $ $EDITOR `bundle exec rake db:create_migration NAME=create_user_model` 28 32 29 33 class CreateUserModel < ActiveRecord::Migration[5.2] 30 34 def change ··· 38 42 39 43 Then run the database migrations: 40 44 41 - bundle exec rake db:migrate 45 + $ bundle exec rake db:migrate 42 46 43 47 The new `User` model can be created as `app/models/user.rb`: 44 48 ··· 57 61 58 62 To run a web server with your application: 59 63 60 - bin/server 64 + $ bin/server 61 65 62 66 To access an IRB console: 63 67 64 - bin/console 68 + $ bin/console 65 69 66 70 ### License 67 71