I wrote a gem. In my Gem's gemspec file, I have something like this:
spec.add_development_dependency "aws-sdk-mturk", '~> 1.3'
And in one of my Gem's files I have:
require 'aws-sdk-mturk'
This gem is not published to rubygems.org. It is a private gem on my private git account. So I wanted to add it to my Rails project and so I did this in Gemfile:
gem "my_gem", git: "https://git.mygitlab.net/myuser/mygem.git", branch: "master"
And I notice when I run bundle install and then subsequently bundle update --source mygem, in Gemfile.lock it does not show any of the dependencies, including aws-sdk-mturk.
So when I try to run Rails application, I get this error:
gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- aws-sdk-mturk (LoadError)
When doesn't bundler/the Rails application read the .gemspec dependencies of my private gem?