title: rails docker app bundle rake aborted
body: <p>I'm trying to create a Rails app using docker and am getting an error during my initial <code>docker build</code>.  I've been following various tutorials to try to get this to work, but am not having any luck.  </p>
  
  <p><strong>My error:</strong></p>
  
  <pre><code>Step 10/12 : RUN bundle exec rake RAILS_ENV=production DATABASE_URL=postgresql://user:pass@127.0.0.1/neo SECRET_TOKEN=foobar assets:precompile
   ---&gt; Running in d3d282e3eb8b
  /usr/local/bundle/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:51: warning: constant ::Fixnum is deprecated
  /usr/local/bundle/gems/activesupport-5.0.1/lib/active_support/xml_mini.rb:52: warning: constant ::Bignum is deprecated
  rake aborted!
  NoMethodError: undefined method `split' for nil:NilClass
  /app/config/application.rb:57:in `&lt;class:Application&gt;'
  /app/config/application.rb:10:in `&lt;module:NeoDocker&gt;'
  /app/config/application.rb:9:in `&lt;top (required)&gt;'
  /app/Rakefile:5:in `require_relative'
  /app/Rakefile:5:in `&lt;top (required)&gt;'
  /usr/local/bundle/gems/rake-12.0.0/exe/rake:27:in `&lt;top (required)&gt;'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `&lt;main&gt;'
  (See full trace by running task with --trace)
  The command '/bin/sh -c bundle exec rake RAILS_ENV=production DATABASE_URL=postgresql://user:pass@127.0.0.1/neo SECRET_TOKEN=foobar assets:precompile' returned a non-zero code: 1
  </code></pre>
  
  <p><strong>Dockerfile:</strong></p>
  
  <pre><code>FROM ruby:2.4.1
  RUN apt-get update &amp;&amp; apt-get install -qq -y --no-install-recommends \
        build-essential nodejs libpq-dev
  ENV INSTALL_PATH /app
  RUN mkdir -p $INSTALL_PATH
  WORKDIR $INSTALL_PATH
  COPY Gemfile Gemfile.lock ./
  RUN bundle install --binstubs
  COPY . .
  RUN bundle exec rake RAILS_ENV=production DATABASE_URL=postgresql://user:pass@127.0.0.1/neo SECRET_TOKEN=foobar assets:precompile
  VOLUME ["$INSTALL_PATH/public"]
  CMD puma -C config/puma.rb
  </code></pre>
  
  <p>My Gemfile is pretty much the default for Rails 5 now:</p>
  
  <pre><code>source 'https://rubygems.org'
  gem 'rails', '~&gt; 5.0.1'
  gem 'puma', '~&gt; 3.0'
  gem 'rack-timeout', '~&gt; 0.4'
  gem 'jbuilder', '~&gt; 2.5'
  gem 'pg', '~&gt; 0.18'
  gem 'redis-rails', '~&gt; 5.0.0.pre'
  gem 'sidekiq', '~&gt; 4.2'
  gem 'sass-rails', '~&gt; 5.0'
  gem 'uglifier', '&gt;= 1.3.0'
  gem 'jquery-rails'
  gem 'turbolinks', '~&gt; 5'
  gem 'bootstrap-sass', '~&gt; 3.3'
  gem 'font-awesome-rails', '~&gt; 4.7'
  group :development, :test do
    gem 'byebug', platform: :mri
  end
  
  group :development do
    gem 'rack-mini-profiler', '~&gt; 0.10'
    gem 'web-console', '~&gt; 3.3.0'
    gem 'listen', '~&gt; 3.0.5'
    gem 'spring'
    gem 'spring-watcher-listen', '~&gt; 2.0.0'
  end
  
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
  </code></pre>
  
  <p>What's wrong here?</p>