Snap!Con runs Ruby 2.7.6 with Rails 5.2. The backend is provided by PostgreSQL. It is recommended to use RVM to manage the gems for this project. Some JavaScript dependencies are used, which need to be installed via NPM or Yarn.
The recommended setup steps are as follows:
- Run
npm install
oryarn
to install the necessary JavaScript dependencies. - Run
bundle config set without production
to ensure only developmental gems are installed. - Run
bundle config set path vendor/bundle
to install gems tovendor/bundle
. - Run
bundle install
to install the necessary gems. - Configure your environment variables.
- Run
cp dotenv.example .env
- At a bare minimum, you will likely need to provide credentials with which to access your PostgreSQL database. An example might be as follows:
OSEM_DB_USER= esobeck #this can be computer's username OSEM_DB_PASSWORD= password123 #likely not necessary if using postgress with computer's username
- Other features will require more environment variables. See Environment Variables and INSTALL.md#configuration for all the environment variables that may be set.
- Run
- Run
rake db:setup
(this command and all following commands may need to prefixed withbundle exec
) to initialize the database.
For developers using macOS, it's necessary to set an environment variable to prevent issues related to forking processes. Before starting the application, please set OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
by following these steps:
Execute the following command in your terminal:
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
This will set the environment variable for the duration of your current terminal session. You'll need to run this command each time you open a new terminal window.
To run Snap!Con, using Overmind or Foreman is recommended. Since a release command is run which automatically performs migrations, it is necessary to flag the release
command as able to be exited without closing all other processes. The Rails server may be run via the typical rails server
command, but do note that no jobs will be run.
TODO: Update this section...
When deploying to Heroku, the heroku/nodejs
buildpack must be run before the heroku/ruby
buildpack. Since Snap!Con runs on PostgreSQL, the Postgres add-on must also be added to the Heroku deployment.
Heroku Stack: heroku-22
Example data can easily be generated by running rake data:demo
. Please note that this command can fail if the database is not fresh.
In addition to the environment variables detailed under INSTALL.md#configuration, the following environment variables may be configured.
A generated API key necessary to utilize the Mailbluster integration.
If utilizing the FullCalendar display module, necessary to disable the license key warning.