A mini e-commerce application built with Rails 6.1 for purposes of teaching Rails by example.
Download or Clone the Project
git clone git@github.com:symphony/jungle-rails.git && cd jungle-rails
- Run
bundle install
to install gem dependencies - Run
npm i
to install node dependencies - Create
config/database.yml
by copyingconfig/database.example.yml
- Create
config/secrets.yml
by copyingconfig/secrets.example.yml
- Run
rails db:reset
to create, load and seed db - Create .env file based on .env.example
- Sign up for a Stripe account
- Put Stripe (test) keys into appropriate .env vars
- Run
rails s
to start the server - Visit http://localhost:3000 in your browser to view the app
If Rails is complaining about authentication to the database, uncomment the user and password fields from config/database.yml
in the development and test sections, and replace if necessary the user and password development
to an existing database user.
Admin username is Jungle
and password book
Use Credit Card # 4111 1111 1111 1111
and valid expiry date for testing success scenarios.
More information in their docs: https://stripe.com/docs/testing#cards
Unit tests can be run using bin/rspec
Cypress E2E testing requires XServer to be running on your host
Cypress tests can be run with rails cypress:open
- Rails 6.1 Rails Guide
- Bootstrap 5
- PostgreSQL 9.x
- Stripe
- Rspec
@rails/actioncable
@rails/activestorage
@rails/ujs
@rails/webpacker
turbolinks
webpack
webpack-cli
cypress
webpack-dev-server