This is the rails app that powers Brick + Beam Detroit.
You may need to be using the proper version of Ruby (currently, 2.6). We
suggest using rvm to mangage versions. To switch to the correct version using rvm, run this command: rvm use 2.6
Start the app with rails s
Watch for sass changes and recompile, and run code linters with guard
in a new tab.
The first time you run this app, you'll need to do a little bit of setup.
These instructions are optimized for Mac. All components should have cross- platform equivalents, but you'll need to find the correct install process. They expect you are running Ruby 2.2.3.
- phantomjs:
brew install phantomjs
- qt for capybara -- check out the full install instructions
- A Postgres database
- Install bundler
gem install bundler:1.16.6
- Install dependencies with
bundle install
- Run the specs with
rake
- Update the database with
rake db:migrate
if needed - Run the server with
rails s
To protect a staging server, set the environment variable IS_STAGING
to true
to require the user to be an admin to use the site.
To add model descriptions to relevant files, run the command annotate
from the
project root.
We use skylight
in production to monitor stats. You'll need to set the
SKYLIGHT_AUTHENTICATION
environment variable for this to work.
rspec
or
rspec spec/features/my_spec.rb
rake question_digest:create_and_send
rake paperclip:refresh CLASS=Event
The paperclip-optimizer
gem has been installed but not activated. It provides
additional image compresion. Enable if page weight increases significantly.
This app expects memcachier to be installed for precaching assets. To set up, run:
heroku addons:add memcachier:dev
To enable or disable this, edit this line in config/environments/production.rb
:
config.assets.cache_store = :dalli_store