Run webapp on openshift without manual intervention
It would be nice if the webapp could be run on openshift without manual intervention.
Right now, it breaks like this:
Installing valid_email 0.1.0
Your bundle is complete!
Gems in the groups development and test were not installed.
It was installed into ./bundle
Post-install message from client_side_validations-simple_form:
*** POTENTIAL BREAKING CHANGE ***
If you are upgrading from client_side_validations-simple_form <= 3.2.1,
please take a look at https://goo.gl/j70wIR
---> Cleaning up unused ruby gems ...
---> Starting asset compilation ...
rake aborted!
StandardError: No secret_key_base or secret_token defined in config/config.yml - please provide one.
/opt/app-root/src/config/initializers/secret_token.rb:9:in `<top (required)>'
/opt/app-root/src/bundle/ruby/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `load'
/opt/app-root/src/bundle/ruby/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `block in load'
/opt/app-root/src/bundle/ruby/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
/opt/app-root/src/bundle/ruby/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:268:in `load'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/engine.rb:652:in `block in load_config_initializer'
/opt/app-root/src/bundle/ruby/gems/activesupport-4.2.10/lib/active_support/notifications.rb:166:in `instrument'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/engine.rb:651:in `load_config_initializer'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/engine.rb:615:in `each'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/engine.rb:615:in `block in <class:Engine>'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `instance_exec'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/initializable.rb:30:in `run'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/initializable.rb:55:in `block in run_initializers'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/initializable.rb:44:in `each'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/initializable.rb:44:in `tsort_each_child'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/initializable.rb:54:in `run_initializers'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/application.rb:352:in `initialize!'
/opt/app-root/src/config/environment.rb:5:in `<top (required)>'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/application.rb:328:in `require'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/application.rb:328:in `require_environment!'
/opt/app-root/src/bundle/ruby/gems/railties-4.2.10/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/opt/app-root/src/bundle/ruby/gems/sprockets-rails-3.2.1/lib/sprockets/rails/task.rb:62:in `block (2 levels) in define'
/opt/app-root/src/bundle/ruby/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => environment
(See full trace by running task with --trace)
error: build error: non-zero (13) exit code from centos/ruby-22-centos7@sha256:9b8b3eae7f5346d7d6b8269424d1149fcf0f0b98f2d617a187c36c5b3b05f7ba
I understand we don't want to have ppl run the webapp without manually creating a secret_key_base
or secret_token
in production, but it would be great to have a pre-configured config file for the development rails env i.e. so it could get deployed on openshift without manual intervention if the RAILS_ENV
is set to development
.
@azul what do you think ?