Reputation: 10862
I am new to building gems, so bear with me.
Scenario:
[Gemfile]
source 'https://rubygems.org'
gem 'curriculous', path: '/mydev/curriculous'
$ ls /mydev/curriculous
Gemfile Rakefile curriculous.sublime-project
Gemfile.lock bin curriculous.sublime-workspace
LICENSE.txt curriculous-0.0.1.alpha.gem lib
README.md curriculous.gemspec spec
$ bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using curriculous (0.0.1.alpha) from source at /mydev/curriculous
Using bundler (1.3.5)
Your bundle is updated!
$ ls /mydev/curriculous
Gemfile Rakefile curriculous.sublime-workspace
Gemfile.lock bin lib
LICENSE.txt curriculous.gemspec spec
README.md curriculous.sublime-project
Question: where did my .gem file go? What am I doing wrong?
The version of gem (gem -v) is 2.0.2
I admit again that I've not done this before so I probably have something totally boneheaded that I am doing.
Upvotes: 1
Views: 153
Reputation: 9482
Is the Gemfile
that you're showing the one inside curriculous
itself, or a second project that uses curriculous
?
If it's the one inside curriculous
, then you should remove the gem 'curriculous', path: '/mydev/curriculous'
line. That indicates that curriculous depends on itself, which is probably not what you mean :)
Instead, add a line that has only gemspec
. This tells Bundler to read the curriculous.gemspec
file to find the dependencies for the project.
There's a basic tutorial for creating gems at http://net.tutsplus.com/tutorials/ruby/gem-creation-with-bundler/
If that Gemfile
is for a different project, then you're doing it correctly. Is there something that isn't working? Running bundle
will rebuild the gem. The specifics of what it does depends on what version of RubyGems is active. Can you post gem --version
?
Upvotes: 1