title: URI::InvalidComponentError: bad component(expected host component): localhost:3000
body: <p>I am not sure what is wrong but in the console when running <code>NewsletterMailer.weekly("username-here@gmail.com").deliver</code> I get the error <code>URI::InvalidComponentError: bad component(expected host component): localhost:3000</code></p>
  
  <p>I double check my settings and everything seems to be fine. Here's the full output of the error:</p>
  
  <pre><code>    from /Users/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/uri/generic.rb:605:in `check_host'
      from /Users/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/uri/generic.rb:646:in `host='
      from /Users/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/uri/generic.rb:195:in `initialize'
      from /Users/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/uri/generic.rb:141:in `new'
      from /Users/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/uri/generic.rb:141:in `build'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:206:in `absolute_url_base'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:192:in `ensure_absolute_url'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:180:in `block in make_image_urls_absolute'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:237:in `block in each'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:236:in `upto'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/nokogiri-1.6.1/lib/nokogiri/xml/node_set.rb:236:in `each'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:179:in `make_image_urls_absolute'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:57:in `block in execute'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:80:in `block in adjust_html'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:79:in `tap'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/roadie-2.4.3/lib/roadie/inliner.rb:79:in `adjust_html'
  ... 10 levels...
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.0.rc1/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0.rc1/lib/active_support/callbacks.rb:392:in `_run__4195001508967449441__process_action__callbacks'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/activesupport-4.0.0.rc1/lib/active_support/callbacks.rb:80:in `run_callbacks'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.0.rc1/lib/abstract_controller/callbacks.rb:17:in `process_action'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.0.rc1/lib/abstract_controller/base.rb:136:in `process'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionpack-4.0.0.rc1/lib/abstract_controller/rendering.rb:44:in `process'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionmailer-4.0.0.rc1/lib/action_mailer/base.rb:503:in `process'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionmailer-4.0.0.rc1/lib/action_mailer/base.rb:497:in `initialize'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionmailer-4.0.0.rc1/lib/action_mailer/base.rb:480:in `new'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/actionmailer-4.0.0.rc1/lib/action_mailer/base.rb:480:in `method_missing'
      from (irb):1
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0.rc1/lib/rails/commands/console.rb:90:in `start'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0.rc1/lib/rails/commands/console.rb:9:in `start'
      from /Users/.rvm/gems/ruby-2.0.0-p451/gems/railties-4.0.0.rc1/lib/rails/commands.rb:66:in `&lt;top (required)&gt;'
  </code></pre>
  
  <p>Development.rb:</p>
  
  <pre><code> config.cache_classes = false
  
    config.eager_load = false
  
    config.consider_all_requests_local       = true
    config.action_controller.perform_caching = false
  
    config.action_mailer.raise_delivery_errors = false
  
    config.active_support.deprecation = :log
  
    config.assets.debug = true
  
    config.eager_load = false
  
    # Change mail delvery to either :smtp, :sendmail, :file, :test
    config.action_mailer.delivery_method = :smtp
    config.action_mailer.smtp_settings = {
      address:              'smtp.gmail.com',
      port:                 587,
      domain:               'gmail.com',
      user_name:            'username-here@gmail.com',
      password:             'password-here',
      authentication:       'plain',
      enable_starttls_auto: false  }
  
    config.action_mailer.default_url_options = { :host =&gt; "localhost:3000" }
  
  end
  </code></pre>