In my previous entry I already explained how to have Ruby and Ruby on Rails alive & kicking in your Windows machine on a Linux subsystem.
Now, let’s create the first steps that one has to give to have a project started properly, just a few steps, later is a question of adding more functionality, your own views and styles, but at least to have installed and working everything that you can need for a new project with Ruby on Rails 6.
We open a new bash, check that you have Rails installed typing:
In your terminal go to the directory where you want to create your project and type:
Ruby on Rails # Creating new app rails new <<name_of_your_app>> --database=postgresql --skip-test --skip-action-cable --skip-turbolinks
Now after all the folders and structure has been created, edit your file config/database.yml and change username and passwords for your databases. After that type in your terminal:
cd <<project-name>> rails db:migrate # to create the schema rails db:setup rake db:migrate # Let's started rails s
With these few steps you should be able to go to http://localhost:3000 and see your new Rails app running on your browser.
Yay! You’re on Rails!