-
Notifications
You must be signed in to change notification settings - Fork 2
Development
The latest version of this app was built to be used with Ruby 3.4.x, but it should work on any Ruby >= 2.6. It also requires Postgres > 11.0, Node 20 and Yarn 4.5.
I'll not provide instructions on how to install them because this instructions could potentially be out-of-date soon.
The instructions below assumes that your computer has RVM configured.
- If you use
rbenv, please check it's documentation for steps 1 and 2 or skip to step 3, at your will. - If you do not use any ruby version manager, start from step 3.
After cloning this repository, run the following commands:
-
rvm rvmrc create ruby-2.7.0@gmmcal.com.br --ruby-versionto create a gemset for this project. -
rvm use ruby-2.7.0@gmmcal.com.brto select the current gemset. Next time you try to use this project, RMV will auto-select for you. -
bundle installto install all ruby gems. -
yarn installto install all javascript packages. -
cp env.example .envto configure foreman startup.
This application uses Postgres database. All credentials are provided in config/database.yml file. By default, it will use your current computer username to access database. You can modify it at your will, but it should not be pushed to this repository.
After database credentials are set, run the following commands to make it ready to work.
-
rake db:createto create database. -
rake db:migrateto migrate the database structure to it's latest state. -
rake db:seed:allto add some dummy data to database.
To run the application, you can run the following command.
bin/dev
This will install foreman start local server with all dependencies. By default, rails will run on port 3000. Make sure there are nothing else running on this port.
If everything is fine, go to your browser and load http://localhost:3000 to view the website.
You can also use Overmind or any other process starter that is Procfile based. If you use any of those tools, look at the documentation on how to start a specific set of processes.
Admin page is accessible via /admin path. Development credentials are provided on seed script.