Based on http://ruby.railstutorial.org/chapters/a-demo-app
gem install rails
sudo apt-get install nodejs`
Ruby requires a javascript runtime. This is provided by nodejs.
`
Create a template project called quizzly:
rails new quizzly
This creates a rails template project under the quizzly folder. cd quizzly
. From this point onwards, I'm assuming we're in the quizzly folder.
To veiew all available rake operations: rake -T
You can look at the created database with rails db:console
or sqlite3 db/development.sqlite3
Use scaffold to create data structures
rails generate scaffold User name:string email:string
This creates a timestamped file called db/migrate/_create_users.rb . To apply this run:
rake db:migrate
or to roll back rake db:rollback
`
Start the server withrails server
. You can connect to it using http://myip:3000