Ruby on Rails - creating a rails 5 api in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
creating a ruby on rails 5 api
To create a new Rails 5 API, open a terminal and run the following command:
The following file structure will be created:
This file structure will be created inside a new folder called app_name. It contains all the assets and code needed to start your project. Enter the folder and install the dependencies:
You should also start your database. Rails uses SQLite as a default database. To create it, run:
And now run your appplication:
When we open our browser at http://localhost:3000, ourr shiny new (empty) API should be running!