Heroku Error: ArgumentError: invalid uri scheme ''
<p>I'm trying to get my  Rails app to process background jobs with Sidekiq and to connect Sidekiq with redis-to-go on Heroku. Here's my <code>Procfile</code>: </p>

<pre><code>web: bundle exec puma -C config/puma.rb
worker: bundle exec -C config/sidekiq.yml
</code></pre>

<p>Here's my the <code>Sidekiq.rb</code> intializer file:</p>

<pre><code>require 'sidekiq'

Sidekiq.configure_client do |config|  
  config.redis = { url: ENV['REDIS_PROVIDER'] }
end 

Sidekiq.configure_client do |config|  
   config.redis = { url: ENV['REDIS_PROVIDER'] }
end
</code></pre>

<p>The <code>REDIS_PROVIDER</code>variable is set to <code>REDISTOGO_URL</code> in Heroku. Per the instructions provided <a href="https://devcenter.heroku.com/articles/redistogo" rel="nofollow">here</a> I added an intializer file <code>redis.rb</code> as well. Here are the contents:</p>

<pre><code>uri = URI.parse(ENV["REDIS_PROVIDER"])
REDIS = Redis.new(:url =&gt; uri)
</code></pre>

<p>I'm getting the following error and not sure how to resolve it. Heroku is also throwing an H10 error</p>

<pre><code>[3] ! Unable to load application: ArgumentError: invalid uri scheme '

/app/vendor/bundle/ruby/2.2.0/gems/redis-3.3.0/lib/redis/client.rb:416:in `_parse_options': invalid uri scheme '' (ArgumentError) 
</code></pre>

<p>UPDATE:</p>

<p>I rolled back to a previous version on Heroku and removed the redis gem from the gemfile, removed the redis intializer file, and the app is no longer crashing. However background jobs still aren't working and I'm getting these errors in the log: </p>

<pre><code>heroku/worker.1:  Starting process with command `bundle exec -C config/sidekiq.yml`
heroku/worker.1:  State changed from starting to up
app/worker.1:  bundler: command not found: -C 
heroku/worker.1:  Process exited with status 127 
heroku/worker.1:  State changed from up to crashed 
app/worker.1:  Install missing gem executables with `bundle install` 
</code></pre>

<p>Why is the system not accepting the config parameter causing the worker to crash?</p>

<p>The error of the invalid uri scheme persists:</p>

<pre><code>app/web.1:  Completed 500 Internal Server Error in 303ms (ActiveRecord: 0.0ms) 
app/web.1:  ArgumentError (invalid uri scheme ''): 
</code></pre>

<p>sidekiq.yml file</p>

<pre><code># Sample configuration file for Sidekiq.
# Options here can still be overridden by cmd line args.
# Place this file at config/sidekiq.yml and Sidekiq will
# pick it up automatically.
---
:verbose: false
:concurrency: 10

# Set timeout to 8 on Heroku, longer if you manage your own systems.
</code></pre>

<p>:timeout: 8</p>

<pre><code># Sidekiq will run this file through ERB when reading it so you can
# even put in dynamic logic, like a host-specific queue.
# http://www.mikeperham.com/2013/11/13/advanced-sidekiq-host-specific-queues/
:queues:
  - critical
  - default
  - low

# you can override concurrency based on environment
</code></pre>

<p>production:
      :concurrency: 25
   staging:
      :concurrency: 10</p>