Table of Contents
This is a template for creating Ruby on Rails applications with PostgreSQL as the chosen database. It provides a starting point for building robust web applications using the Rails framework and leveraging the power and reliability of PostgreSQL for data storage.
- Ruby on Rails
- PostgreSQL
-
Ruby on Rails: The template is preconfigured with Ruby on Rails, a popular web application framework that follows the MVC (Model-View-Controller) architecture. Rails provides a rich set of features and conventions to streamline development and increase productivity.
-
PostgreSQL Database: PostgreSQL is a robust, open-source relational database management system known for its performance, scalability, and support for advanced SQL features. The template is set up to utilize PostgreSQL as the default database, allowing you to take advantage of its powerful capabilities.
-
Easy Setup: The template comes with a ready-to-use Rails application structure and the necessary configuration for PostgreSQL. You can quickly get started by cloning this repository and customizing it to suit your specific project requirements.
To run this project locally, you'll need to follow these steps.
Make sure you have the following installed on your machine:
Clone this repository to your desired folder.
cd my-project
git clone git@github.com:tobuya/rails-template.git
Install the required gems with:
bundle install
Configure the database connection
- Open
config/database.yml
file and ensure that the database configuration matches your PostgreSQL setup by updating theusername
,password
, and other relevant settings in thedefault
section to match your PostgreSQL configuration. - Also, update the
development
,test
, andproduction
sections to match your project configuration.
Create the database by running the following command:
rails db:create
At this point, Ruby on Rails application with a PostgreSQL database is customized and can be modified to one's liking by adding models, controllers and other components to build their desired system
To run the migrations:
rails db:migrate
To load the sample data, run:
rails db:seed
To run the development server, execute the following command:
rails server
To run tests, run the following command:
rspec spec --format doc
rubocop -A
๐ค Thomas Obuya
- Features suggested from the Pull Request
Contributions, issues, and feature requests are welcome! If you have any improvements, bug fixes, or additional features that you'd like to contribute, feel free to submit a pull request. Together, we can enhance this template and make it even more valuable for Rails and PostgreSQL developers.
Feel free to check the issues page.
If you like this project, please consider giving it a โญ.
I would like to acknowledge anyone who would like to contribute to this project. Feel free to customize the template further, adding your own models, controllers, and other components to build your desired application
This project is MIT licensed.