- Ruby version: 3.0.3
- Rails version: 6.1.7
- Stimulus JS
- Node 16.13.0
- Bootstrap 5
- PostgreSQL
- RSpec
- Clone the project.
- Create the file
config/application.ymlwith the environment variables (seeconfig/application.yml.sample). - Set the right version for Node (nvm is recommended).
- Run
bundle installto install the project gems. - Run
yarn installto install Yarn dependencies. - Create DB and run migrations with
rails db:create db:migrate:with_data. - Run
rails db:seedto populate DB with Rails seeds. - Run
rails sto run server. - This project is using Webpack so, in order to avoid restarting the server everytime you change any JavaScript content, you need to initialize a development server that will compile JavaScript for Webpack. This can be done by running the following command:
./bin/webpack-dev-server.
- Clone the project.
- Create the file
.envwith the environment variables (see.env.sample). - Run
docker-compose buildto build Docker services. - Create DB and run migrations with
docker-compose run app rails db:create db:migrate:with_data. - Run
docker-compose run app rails db:seedto populate DB with Rails seeds. - Run
docker-compose upto run server.
To install new dependencies, you need to use yarn. E.g. to install jQuery, run yarn add jquery
Since the project is using the (data_migrate) gem, all migrations and rollbacks should be run using the following commands:
rails db:migrate:with_data
rails db:rollback:with_dataThis project is using Rspec with Capybara. To run the entire suite, execute the following command:
bundle exec rspecIf you want to run only the feature tests on a live browser instead of the headless version, you just need to run this command:
CAPYBARA_DRIVER=selenium_chrome bundle exec rspec spec/featuresIf you want to skip feature tests, you can use this command:
rspec --exclude-pattern "spec/features/**/*_spec.rb"