Installing gem: how to let it look in the Gemfile for dependencies?

I have a gem, which depends on an other gem, which is on my server.
So, the gem is like:

#!/usr/bin/env ruby
gem ‘scriptingutils’, ‘>= 0.0.4’
require ‘scriptingutils’
quit(‘Hello World!’,0)

In the .gemspec file I have:

spec.add_dependency(‘scriptingutils’,[">= 0.0.4"])

and in the top directory, where the Rakefile is, I have a file Gemfile,

source “
gem “scriptingutils”, “>= 0.0.4”

Still, when I try to install, I get the message:
ERROR: While executing gem … (Gem::DependencyError)
Unable to resolve dependencies: hello requires scriptingutils
(>= 0.0.4)

It helps when I first run:
gem sources --add

But that information is already in the Gemfile, and I don’t want users
of the gem to add that source explicitly, of course. How can I make gem
to read the Gemfile?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs