My Dockerized Rails 5 app build failed with the following error:
rake aborted!
NoMethodError: undefined method `split' for nil:NilClass
/home/ubuntu/my-app-name/config/application.rb:57:in `<class:Application>'
It failed because the environment variable ACTION_CABLE_ALLOWED_REQUEST_ORIGINS
was apparently nil
, even though I specified it in my Dockerfile, as follows:
RUN bundle exec rake RAILS_ENV=production DATABASE_URL=postgresql://user:pass@127.0.0.1/dbname ACTION_CABLE_ALLOWED_REQUEST_ORIGINS=foo,bar SECRET_TOKEN=dummytoken assets:precompile
# Provide a dummy DATABASE_URL and more to Rails so it can pre-compile
# assets. The values do not need to be real, just valid syntax.
So um, yeah… dead in the water. Please advise.