Simple question and answer platform. Project for Ruby on Rails training.
-
Ruby 2.4.1
-
Rails 5.1.2
-
Postgresql
-
Nodejs
...
Create the database:
$ rake db:create:all
Apply the database migrations:
$ rake db:migrate
Apply migrations into test database:
$ rake db:test:prepare
Open the configured database:
$ rails db
-
RSpec
-
Capybara
...
- Getting Started with Rails (http://guides.rubyonrails.org/getting_started.html)
- Ruby on Rails Guides (http://guides.rubyonrails.org)
- The API Documentation (http://api.rubyonrails.org)
- Ruby on Rails Tutorial (https://www.railstutorial.org/book)
-
Install Ruby:
-
newest version: https://www.ruby-lang.org/pt/downloads/
-
ruby version managers:
- rvm (http://rvm.io/)
- rbenv - recommended
-
using rvm:
$ rvm install 2.4.1
$ rvm use 2.4.1 --default
-
-
Install Rails:
$ gem install rails
-
Install Bundler (dependencies manager)
$ gem install bundler
-
Create the project
$ rails new ask2rails -d postgresql -T -J
where:
-d : database (mysql, postgresql, sqlite3, oracle...) -T : skip test unit -J : skip javascript files (validations, etc)
-
Configure and create database
-
Configure Rspec
$rails g rspec:install