title: Gemspec dependencies are not loaded with Gemfile
body: <p>For example, given Gemspec file:</p>
  
  <pre><code>$:.push File.expand_path("../lib", __FILE__)
  
  # Maintain your gem's version:
  require "github_stats/version"
  
  # Describe your gem and declare its dependencies:
  Gem::Specification.new do |s|
    s.name        = "github_stats"
    s.version     = GithubStats::VERSION
    s.authors     = ["Pura Dawid"]
    s.email       = ["puradawid@gmail.com"]
    s.homepage    = "https://github.com/puradawid/github_stats"
    s.summary     = "Project repository model wrapper and statistic fetcher."
    s.description = ""
    s.license     = "MIT"
  
    s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
    s.test_files = Dir["test/**/*"]
  
    s.add_dependency "rails", "~&gt; 4.1.8"
    s.add_runtime_dependency "github_api", "0.12.3"
  
    s.add_development_dependency "sqlite3"
  end
  </code></pre>
  
  <p>And Gemfile for Gods sake:</p>
  
  <pre><code>source 'https://rubygems.org'
  
  # Declare your gem's dependencies in github_stats.gemspec.
  # Bundler will treat runtime dependencies like base dependencies, and
  # development dependencies will be added by default to the :development group.
  gemspec
  
  # Declare any dependencies that are still in development here instead of in
  # your gemspec. These might include edge Rails or gems from your path or
  # Git. Remember to move these dependencies to your gemspec before releasing
  # your gem to rubygems.org.
  
  # To use a debugger
  #gem 'byebug', group: [:development, :test]
  
  #gem 'github_api', '0.12.3'
  
  group :development do
    gem 'byebug'
    gem 'mocha'
    gem 'guard'
    gem 'guard-minitest'
  end
  
  group :test do
    gem 'rake'
  end
  </code></pre>
  
  <p><code>github_api</code> is commented out (it working obviously if i put it here).</p>
  
  <p>As you can see, github_api is added as a dependency (it's a gem). Is it working? Of course not. Typing a <code>Bundler.require</code> gives me: </p>
  
  <pre><code>[&lt;Bundler::Dependency type=:runtime name="github_stats" requirements="&gt;= 0"&gt;,
  &lt;Bundler::Dependency type=:development name="sqlite3" requirements="&gt;= 0"&gt;,
  &lt;Bundler::Dependency type=:runtime name="byebug" requirements="&gt;= 0"&gt;,
  &lt;Bundler::Dependency type=:runtime name="mocha" requirements="&gt;= 0"&gt;,
  &lt;Bundler::Dependency type=:runtime name="guard" requirements="&gt;= 0"&gt;,
  &lt;Bundler::Dependency type=:runtime name="guard-minitest" requirements="&gt;= 0"&gt;,
  &lt;Bundler::Dependency type=:runtime name="rake" requirements="&gt;= 0"&gt;]
  </code></pre>
  
  <p>I saw this issue <a href="https://github.com/bundler/bundler/issues/1096" rel="nofollow">here</a>, but i don't see a clean solution.</p>
  
  <p>What is wrong with me? <code>add_dependency</code> is not working as well <code>add_development_dependency</code> but the last one make no sense here at all, even though i tried it too.</p>
  
  <pre><code> Bundler version 1.8.4
   =&gt; ruby-2.1.5 [ x86_64 ]
  </code></pre>
  
  <p>Thanks for help, folks!</p>