title: rake assets:precompile with NoMethodError: undefined method `tr' for nil:NilClass
body: <p>I have a simple rails app that I am trying to reply via Capistrano.  The app works fine in development but fails on deploy.  I traced it back to the assets:precompile step which also fails on my local machine.  I have seen some other posts on sort of the same issues but nothing that really points me in the right direction.</p>
  
  <p>I am not strong enough to figure out where to look next so any pointers would be appreciated.</p>
  
  <pre><code>Solara:myapp dan$ rake assets:precompile --trace
  ** Invoke assets:precompile (first_time)
  ** Invoke assets:environment (first_time)
  ** Execute assets:environment
  ** Invoke environment (first_time)
  ** Execute environment
  rake aborted!
  NoMethodError: undefined method `tr' for nil:NilClass
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:37:in `initialize'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:270:in `new'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:270:in `resolve_url_connection'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:258:in `resolve_hash_connection'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:215:in `resolve_connection'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:139:in `resolve'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:151:in `block in resolve_all'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:150:in `each'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_adapters/connection_specification.rb:150:in `resolve_all'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/connection_handling.rb:69:in `resolve'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/core.rb:46:in `configurations='
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/railtie.rb:117:in `block (2 levels) in &lt;class:Railtie&gt;'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:27:in `each'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-4.2.4/lib/active_record/railtie.rb:116:in `block in &lt;class:Railtie&gt;'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:226:in `block in tsort_each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:429:in `each_strongly_connected_component_from'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:347:in `block in each_strongly_connected_component'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `call'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:345:in `each_strongly_connected_component'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:224:in `tsort_each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:203:in `tsort_each'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
  /Users/dan/Rails/myapp/config/environment.rb:5:in `&lt;top (required)&gt;'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.2.4/lib/rails/application.rb:457:in `block in run_tasks_blocks'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `call'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
  /Users/dan/.rvm/gems/ruby-2.0.0-p247/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `call'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:240:in `block in execute'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:235:in `execute'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:179:in `block in invoke_with_call_chain'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:201:in `block in invoke_prerequisites'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:199:in `each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:199:in `invoke_prerequisites'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:178:in `block in invoke_with_call_chain'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:172:in `invoke_with_call_chain'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/task.rb:165:in `invoke'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:150:in `invoke_task'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `block (2 levels) in top_level'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `each'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:106:in `block in top_level'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:115:in `run_with_threads'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:100:in `top_level'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:78:in `block in run'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:176:in `standard_exception_handling'
  /Users/dan/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rake/application.rb:75:in `run'
  /Users/dan/.rbenv/versions/2.2.0/bin/rake:33:in `&lt;main&gt;'
  Tasks: TOP =&gt; environment
  Solara:wingnut dan$ 
  </code></pre>