Git Repository with project form lectures is at: https://github.com/Inza/ror-plantation-v2
- Ruby on Rails
- Homepage: http://rubyonrails.org/
- Guides: http://guides.rubyonrails.org/
- Bundler
- Git
- RSpec
You can generate the UML diagram at: https://www.planttext.com/
@startuml
enum Difficulty {
NORMAL
NIGHTMARE
HELL
}
Subject "1" <-- "n" Topic
Subject "1" <-- "n" Test
Topic "1" <-- "0..n" TopicAssignment
Test "1" <-- "0..n" TopicAssignment
Question "1" <-- "0..n" QuestionAssignment
Test "1" <-- "0..n" QuestionAssignment
Topic "1" <-- "n" Question
Question "1" <-- "0..n" Answer
Question "1" <-- "0..n" Difficulty
StudyProgram "1" <-- "0..n" SubjectAssignment
Subject "1" <-- "0..n" SubjectAssignment
@enduml
- [MAC ONLY] Install Xcode from Mac App Store (you need build tools from it)
- [MAC ONLY] Install Homebrew
https://brew.sh/
- [MAC ONLY] Install gpg
brew install gpg
- [WINDOWS ONLY] Install Ruby and Rails from Rails Installer
http://railsinstaller.org/
- [WINDOWS ONLY] Install Git for Windows
https://git-for-windows.github.io/
- [MAC ONLY] Update Git for Mac
brew install git
- [MAC & Linux ONLY] Install RVM
https://rvm.io
- [MAC ONLY] Install Xcode Command Line Tools
xcode-select --install
- [MAC & Linux ONLY] Install Ruby
2.4.2
byrvm install 2.4.2
- [MAC & Linux ONLY] Select the installed Ruby
2.4.2
in RVM and use it by defaultrvm use 2.4.2 --default
- [MAC & Linux ONLY] Install Bundler by
gem install bundler
- [MAC & Linux ONLY] Install Rails by
gem install rails
- We will be using Ruby
2.4.2
and Rails5.1.4
(on Windows Ruby2.3.3
and Rails5.1
) - Go to folder where you would like to have the new app
- Create new Rails app by
rails new my-app
- Go to the generate folder by
cd my-app
- Type
2.4.2
into.ruby-version
(create file called.ruby-version
and type2.4.2
into it - or2.3.3
on Windows) - Adjust
Gemfile
- Install all new gems (ruby dependencies) by
bundle install
- Run you app by
rails server
orrails s
- Open
0.0.0.0:3000
(on Mac/Linux) orlocalhost:3000
(on Windows) in your browser to see Rails homepage - [If you cloned this git repository] Open
0.0.0.0:3000/tests
or127.0.0.1:3000/tests
orlocalhost:3000/tests
in your browser to see the generated tests administration