.env needs a `DEVELOPMENT_FILE_LOCATION` and a `DEVELOPMENT_SECRET_KEY_BASE`
The example .env
file included in the setup instructions should have this line added to it:
DEVELOPMENT_FILE_LOCATION=/ink-api/ink_api_files/
It also needs a DEVELOPMENT_SECRET_KEY_BASE=
, with a key generated using openssl rand -hex 64
Without the dev file location, running rake db:schema:load
throws the following error:
Alexs-MacBook-Pro-2:ink-api atheg$ rake db:schema:load
Folding contents of StepGemfile into Gemfile
"Loading file location from ENV[DEVELOPMENT_FILE_LOCATION]"
"File location set to "
rake aborted!
Please ensure file storage directory is specified in .env (Check env.sample if this file is missing)
/Users/atheg/Desktop/rik's_ink/ink-api/config/initializers/ink_api.rb:5:in `<top (required)>'
/Users/atheg/Desktop/rik's_ink/ink-api/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:schema:load => environment
(See full trace by running task with --trace)
And without the dev secret key base, INK will start up but the server will show this in the browser:
Puma caught this error: Missing `secret_key_base` for 'development' environment, set this value in `config/secrets.yml` (RuntimeError)
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:513:in `validate_secret_key_config!'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:246:in `env_config'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:693:in `build_request'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/application.rb:521:in `build_request'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/railties-5.0.0.1/lib/rails/engine.rb:521:in `call'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-3.10.0/lib/puma/configuration.rb:225:in `call'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-3.10.0/lib/puma/server.rb:605:in `handle_request'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-3.10.0/lib/puma/server.rb:437:in `process_client'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-3.10.0/lib/puma/server.rb:301:in `block in run'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `call'
/Users/atheg/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/puma-3.10.0/lib/puma/thread_pool.rb:120:in `block in spawn_thread'