Rails API From Scratch

Tanuka Das
2 min readDec 5, 2019

--

Step by step process of creating rails API:

Step 1: Update rails to the latest version:

If you don’t already have the latest version of rails API, upgrade it.

Step 2: Create a folder

Step 3: Create rails API

Although you can use other databases such as sqlite3, I will be using PostgreSQL.

The — api makes the data configure serve as json instead of HTML, it sets all the controller appropriately, etc. The — database=postgresSQL is for deployment.

Step 4: cd into the rails api_app

Once you one the app, you can view folders like controllers, models, views, database, etc.

Congratulations, you just completed your initial battle!!!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Tanuka Das
Tanuka Das

Written by Tanuka Das

Software Developer, technical writer, bookworm, constant learner.

No responses yet

Write a response