This is a simple e-commerce application built with Ruby on Rails. It includes features such as product listing, user authentication, and full-text search capabilities.
This guide will walk you through setting up and running a Ruby on Rails application locally. We'll cover installation, database setup, running the server and testing.
Before getting started, ensure you have the following installed:
- Ruby
- RubyGems
- Bundler
- Rails
- Database (e.g., SQLite, PostgreSQL, MySQL)
Follow these steps to set up the application locally:
-
Git clone and navigate to the Application Directory.
-
Install Dependencies:
bundle
-
Set Up the Database:
rails db:create rails db:migrate rails db:seed
This will create the database, run migrations, and seed the database with sample data.
To start the Rails server, run:
rails server
You can then access the application in your web browser at http://localhost:3000.
To run tests, use the following command:
rails test
- Enter your credentials to log in
- You will be redirected to the Products page
- Navigate to http://localhost:3000/products
- Click on a product to view its details
- Use the search bar to search for products by name or description