AskUp is an application designed to improve learning and retention.
- App has been developed thus far using Ruby 2.1.4 and Rails 4.2.0
- You need a Ruby environment (you can use e.g. rbenv or rvm to manage different environments)
- AskUp uses bundler for dependencies, so you'll need to run
bundle installin your Ruby environment to ensure all the gems are available that the app uses.
There are two types of application configuration settings in AskUp.
Rails.configuration.askupis defined inapplication.rb, and other application-wide settings can be found inconfig/environments/.- Secrets are handled by Figaro. Copy
application.yml.exampletoapplication.ymland edit any settings you need. For deployment to Heroku or running under the production environment you will need at leastaskup_secret_key_base(used to set the Rails secret key base for the production environment); the others are needed if you plan to use/test different functions of the app, like sending mail for password resets (via Devise; see below).
Note: You only need to define these if you need to test/use the mail components, e.g. in Devise.
-
Mail server settings
askup_mail_host_username askup_mail_host_password askup_mail_host_address askup_mail_host_domain askup_mail_host_port- You could use e.g. gmail or mailgun for this. If using mailgun,
username will be the Default SMTP Login value (e.g.
postmaster@sandbox...) in your sandbox domain, and the password will come from that domain's Default Password. (More info on gmail or mailgun setup.) - (Note that in development, default settings disable mail delivery.)
- You could use e.g. gmail or mailgun for this. If using mailgun,
username will be the Default SMTP Login value (e.g.
-
App server settings
askup_url_options_host askup_url_options_protocol- When Devise sends out emails to reset password, etc, we need to be able to direct
the user to the right server. These settings default to
localhost:3000andhttpfor local development, but will need to be the publicly accessible domain andhttpsin production (e.g. the heroku app domain for staging, or askup.net for production).
- When Devise sends out emails to reset password, etc, we need to be able to direct
the user to the right server. These settings default to
bundle exec rake db:setupto set up your (development) database (this will seed it as well)
- install postgres
- run postgres (set up agent, or run manually)
bundle exec rake db:setup RAILS_ENV=productionto set up your production databasebundle exec rake assets:precompile RAILS_ENV=productionto ensure your JS and CSS files are compiled- make sure
askup_secret_key_baseis defined in yourapplication.yml
You can deploy the app to heroku as well. Below is a streamlined list of instructions, based on Heroku's getting started guide.
- local workstation setup
heroku createfigaro heroku:set -e productiongit push heroku (my git branch):masterheroku run rake db:setupheroku open