Hey guys! How are you?
That's the first article of a series that'll teach how to create a production ready Rails application. In this article we'll install Ruby, Rails and create the application.
Installing dependencies
The first thing to do is install Ruby and Rails, to do that we'll use a tool called RVM, it's used to install and manage different versions of Ruby.
Execute the command bellow to install Ruby and Rails latest versions:
\curl -sSL https://get.rvm.io | bash -s stable --rails
You can verify if everything is ok running this two commands:
ruby --version
rails --version
The output should look like this:
Creating the project
Run the following command to create the application:
rails new rails_application --api --adapter=postgresql
Now that the application is created we need to go to its directory using this command:
cd rails_application
Testing it out
The next step is test the application, to do so you'll need to run the server using the above command:
rails s
If everything is ok you should be able to see somehting like this when you access http://localhost:3000
That's it, guys! See you soon in the next part. You can find the code here
Top comments (0)