I have created a gem(X) and it's not published. Now I am creating an another gem which will add the gem X as a dependency like this :-
s.add_dependency "X"
in gemspec file.
since the gem(X) is not on rubygem or git or rubyforge, the bundle install command throws the error:
could not find the gem X**
I think specifying the path for X will do the trick, but how?
I think I see what @bor1s was pointing to in the SO post about git references.
The
gemspec
file is about dependencies for publishing your gem. YourGemfile
sets up your local environment for development, usually by callinggemspec
.In your case your
gemspec
should have thisAnd then your
Gemfile
would look something like this (make sure the local reference is after thegemspec
call):Quoting from Yahuda Katz's blog post about gemspec and Bundler
I think you can find an answer for your question here: Gem dependency
Hope it will help.