This guide shows the way I did to make a simple login app using Ruby on Rails with PosgreSQL and Devise. Some commands show in here may differ depending on your operation system. This guide was made using Ubuntu 18.04, Ruby 2.5.1, Rails 5.2.1, PostgreSQL 10.5, and Devise 4.5
If you don't have already installed there are several ways to do so, just go to the ruby install page.
For Debian/Ubuntu run sudo apt-get install ruby
Once you have install Ruby on your computer the next step is to install the rails gem install rails