Using Bundler with Rubygem gemspecs
If you already have a gem with a gemspec, you can generate a Gemfile for your gem.
$ bundle init
If you are creating a new gem, simply create a new Gemfile. Otherwise, add the following to your new Gemfile
Runtime dependencies in your gemspec are treated like base dependencies, and development dependencies are added by default to the group,
:development. You can change that group with the
gemspec :development_group => :dev
As well, you can point to a specific gemspec using
:path. If your gemspec is in
gemspec :path => '/gemspec/path'
If you have multiple gemspecs in the same directory, specify which one you'd like to reference using
gemspec :name => 'my_awesome_gem'
This will use
That's it! Use bundler when developing your gem, and otherwise, use gemspecs normally!
$ gem build my_gem.gemspec