I wanted to create a gem with some dependencies. I followed a tutorial, here is the full code.
I have
s.add_dependency "sinatra"
In the gemspec. I build the gem. When I tried to install it with
gem install --local gemname.gem
I got
ERROR: Could not find a valid gem 'sinatra' (>= 0) in any repository
I instead expected that gem install
will first install sinatra and then proceed with my gem.
How can I make it install any dependencies prior to my gem? I tried to:
- add
gem 'sinatra'
to the gemfile - use
add_runtime_dependency
instead ofadd_dependency
require 'rubygems'
on top of my gemspec file