- Git: Download and install Git.
- Clone the repository:
- Using SSH:
git clone [email protected]:tamu-edu-students/csce600-arcade.git
- Using HTTPS:
git clone https://github.com/tamu-edu-students/csce600-arcade.git
- Using SSH:
- For Windows Users: Install WSL
- For Mac Users: Use Terminal directly.
Warning
Activate WSL:wsl
- Install
rbenv
:sudo apt install rbenv
- Install Ruby:
rbenv install 3.3.5
Warning
If Ruby installation fails:
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
For Mac users, do not delete the preinstalled System Ruby version. Ensure your PATH contains the
rbenv
Ruby version before the system version in your bash file.
Help managing Ruby version on Mac.
- Install Bundler:
gem install bundler
- Install Gems:
bundle install
Warning
If step 2 fails:bundle config set --local without 'production'
- Install additional packages:
apt install libffi-dev libyaml-dev ruby-railties
- If Bundler uses the wrong Ruby version:
export PATH="$HOME/.rbenv/bin:$PATH" && eval "$(rbenv init -)"
-
Create a
.env
file in the project root:touch .env
-
GitHub OAuth:
- Go to GitHub Developer Settings.
- Create new OAuth application.
- Include both the Heroku deployment URI and localhost URI in the Redirect URI section.
- Add the following environment variables:
GITHUB_CLIENT_ID
GITHUB_CLIENT_SECRET
- Help creating OAuth apps
-
Spotify OAuth:
- Go to Spotify Developer Page.
- Set up the application and add both Heroku and localhost URIs.
- Add the following environment variables:
SPOTIFY_CLIENT_ID
SPOTIFY_CLIENT_SECRET
-
Google OAuth:
- Go to Google Cloud Console.
- Set up the application and add both Heroku and localhost URIs.
- Add the following environment variables:
GOOGLE_CLIENT_ID
GOOGLE_PROJECT_ID
GOOGLE_CLIENT_SECRET
GOOGLE_AUTH_URI
GOOGLE_TOKEN_URI
GOOGLE_AUTH_PROVIDER
GOOGLE_REDIRECT_URIS
- Migrate:
rails db:migrate
- Seed:
rails db:seed
Info
The initial seed process may take up to 2 minutes.
- Run the app:
rails server
- Access the app at:
- Quit the app: Press
CTRL+C
in the terminal.
- Unit and Functional Tests:
bundle exec rspec
- Integration Tests:
bundle exec cucumber
- View Coverage Report:
open coverage/index.html
Warning
If RSpec fails due to migrations:RAILS_ENV=test rails db:migrate
- Run the "Tests and Coverage" workflow in the left navigation bar.
- Locally:
- Generate:
yard doc
- View:
open doc/index.html
- Generate:
- On GitHub:
- Run the "Deploy Developer Docs" workflow.
- View documentation here.
- Create a Heroku account.
- Install Heroku CLI.
- Login:
heroku login
- Create a
Procfile
in the project root:web: bundle exec rails server -p $PORT
- Create Heroku app:
heroku create app-name
- Push your app:
git push heroku prod
- Database setup:
heroku run rails db:migrate && rails db:seed
- Set environment variables:
- CLI Command:
heroku config:set VAR_NAME=value
- Help setting config vars
- Add
TZ=America/Chicago
for time zone configuration.
Warning
Add Heroku Postgres add-on before running database setup commands.