Skip to content

Latest commit

 

History

History
153 lines (115 loc) · 2.56 KB

File metadata and controls

153 lines (115 loc) · 2.56 KB

Local Setup Guide

Quick guide to set up and run the Collaborado Rails application locally.


Prerequisites

Ruby 3.4.5+

Using rbenv (Recommended):

# Install rbenv
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash

# Add to shell profile (~/.bashrc, ~/.zshrc, etc.)
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc

# Install Ruby 3.4.5
rbenv install 3.4.5
rbenv global 3.4.5

Using RVM:

# Install RVM
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

# Install Ruby 3.4.5
rvm install 3.4.5
rvm use 3.4.5 --default

Bundler

gem install bundler

Setup Steps

1. Clone Repository

git clone https://github.com/tamu-edu-students/606-project3-group5.git
cd 606-project3-group5

2. Install Dependencies

bundle install

3. Database Setup

# Create and migrate database
bundle exec rails db:create
bundle exec rails db:migrate

# (Optional) Load sample data
bundle exec rails db:seed

4. Compile Assets

# Compile SCSS stylesheets
bundle exec rails dartsass:build

5. Start Application

# Start Rails server
bundle exec rails server

# Or use development script (auto-compiles assets)
./bin/dev

Visit http://localhost:3000


Testing

# Run RSpec tests
bundle exec rspec

# Run Cucumber features
bundle exec cucumber

Common Issues

Ruby Version Errors

rbenv install 3.4.5
rbenv local 3.4.5
bundle install

SQLite Issues (Ubuntu/Debian)

sudo apt-get update
sudo apt-get install sqlite3 libsqlite3-dev
bundle install

SQLite Issues (macOS)

brew install sqlite3
bundle install

Bundle Install Errors

bundle clean --force
rm -rf .bundle
bundle install

Database Issues

bundle exec rails db:drop db:create db:migrate

Google OAuth Setup (Optional)

The repository includes test OAuth credentials for development.

To use your own credentials:

  1. Create project at Google Cloud Console
  2. Enable Google+ API
  3. Create OAuth 2.0 Client ID (Web application)
  4. Add redirect URI: http://localhost:3000/auth/google_oauth2/callback
  5. Create .env file:
GOOGLE_CLIENT_ID=your_client_id
GOOGLE_CLIENT_SECRET=your_client_secret
ALLOWED_EMAIL_DOMAINS=tamu.edu

For complete technical documentation, see TECHNICAL_DOCUMENTATION.md.