PerfectPals is a roommate-finding app designed to help users connect with reliable and trustworthy roommates. By calculating a trust score, it makes shared living safer and more predictable for individuals in need of affordable housing.
- Getting Started
- Configuration
- Contributing
- API Documentation
- Troubleshooting
- Visual Aids
- Contact
- License
- Ensure you have Rails 7.0.8 installed.
- Ensure you have Ruby 3.2.1 installed.
- Ensure you have PostgreSQL 14.9 installed.
- Ensure you have Bundler 2.4.6 installed.
To get PerfectPals up and running on your local machine, follow these steps:
- Clone the repository to your local machine:
git clone https://github.com/Ritumka/perfect-pals
- Navigate to the application directory:
cd perfect-pals
- Install the required Ruby gems by running Bundler (make sure you have Bundler installed):
bundle install
-
Configure ENV. See details in Configuration.
-
Since this application uses PostgreSQL, ensure you have PostgreSQL installed and running on your machine. Then create and migrate the database:
rails db:create db:migrate
- To populate the database with initial data, run the sample data task (Weight Class 155 has the most users. Use this to test any features):
rake sample_data
- Start the Rails server:
rails server
- Visit http://localhost:3000 in your web browser to view the application. Follow the on-screen instructions to use the application.
Email Margarita Potylitsyna to get the MY_GITHUB_ID and MY_GITHUB_SECRET. Store them in a .env
file in the root directory of the application.
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a new branch
git checkout -b feature-branch
- Commit your changes
git commit -m 'Add some feature'
- Push to the branch
git push origin feature-branch
- Open a pull request
Before contributing, please read through the existing issues and pull requests to ensure that someone else isn't already working on similar changes.
No API endpoints provided.
If you encounter any issues, please review the following common problems and solutions. If your issue isn't listed here, feel free to open an issue in the repository.
-
Problem:
bundle install
fails Solution:- Ensure that you have Ruby and Bundler installed.
- Check your Ruby version by running
ruby -v
. If you need to install a specific Ruby version, userbenv
orrvm
. - Run
gem install bundler
to install or update Bundler. - If the error mentions missing gems, try running
bundle update
to resolve conflicts.
-
Problem: Database Setup Issues Solution:
- Make sure your database server (e.g., PostgreSQL, MySQL) is running.
- Ensure that your
config/database.yml
is configured correctly for your environment. - If you encounter errors during
rails db:create
orrails db:migrate
, try runningrails db:reset
to recreate the database from scratch.
-
Problem: Assets Not Loading (CSS, JS, Images) Solution:
- Run
rails assets:precompile
to compile assets if you're in production. - Ensure the correct asset pipeline is configured, especially for production in
config/environments/production.rb
. - If you're using Webpacker, make sure your JavaScript and CSS packs are compiled.
- Run
-
Problem: Errors During
rails server
Startup Solution:- Check the full error message to identify the issue. Common problems include missing gems, incorrect Ruby versions, or database issues.
- Ensure that all required gems are installed by running
bundle install
. - If the error mentions a missing file or folder, try running
rails generate
to create the necessary files.
-
Problem: Page Not Found (404 Error) Solution:
- Check the routing for the page you're trying to access. Ensure that the route is defined in
config/routes.rb
. - If you added a new controller or route recently, run
rails routes
to verify that it’s properly registered.
- Check the routing for the page you're trying to access. Ensure that the route is defined in
-
Problem: Unable to Push to GitHub (Git Issues) Solution:
- Ensure you have the correct Git remote URL by running
git remote -v
. - If you’re encountering authentication issues, make sure your SSH keys are configured correctly, or use HTTPS with your GitHub credentials.
- Run
git status
to check for uncommitted changes, and commit your changes before pushing.
- Ensure you have the correct Git remote URL by running
If you’re still having trouble, feel free to check the official Rails documentation or open an issue in the repository. We're happy to help!
Here are some visual aids to help you quickly understand the structure and flow of the app:
These visuals should help you get started with the project and understand how everything fits together.
Margarita Potylitsyna - [email protected]
Project Link: https://github.com/Ritumka/perfect-pals
Copyright (c) 2024 Margarita Potylitsyna
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.