Since May 2011 we are
cutting new gems using Bundler
Show archive.org snapshot
, which is less painful than cutting gems using Jeweler. You know a gem was cut using Bundler if you see the word Bundler
in a gem project's Rakefile
.
This is how to update a gem that was cut using Bundler:
- Say
git pull
or check out a repository from Github likegit clone git@github.com:makandra/geordi.git
- Update the gem version in
lib/project/version.rb
- Make and commit your changes. You can but don't need to push your changes to Github.
- If you haven't logged in to Rubygems.org before:
- Get credentials for Rubygems.org from the team
- Say
rake release
, which will do everything right unless you haven't entered Rubygems credentials before- In that case kill the hanging
rake release
- Say
gem push path/to/packaged.gem
(e.g.pkg/geordi-1.2.3.gem
) manually, sogem
will properly prompt you for your credentials - For this time you're done. In the future, you only need to say
rake release
.
- In that case kill the hanging
- Say
rake release
. This will do many things for you:- Builds a gem package to e.g.
pkg/geordi-1.2.3.gem
- Adds and pushes a tag like "v1.2.3" to the repo
- Pushes commits to the repo
- Pushes the
.gem
package to Rubygems.org (what you could do manually by sayinggem push pkg/geordi-1.2.3.gem
)
- Builds a gem package to e.g.
- The gem will be available on RubyGems.org after about 5 minutes
- Install/update your own gem with
sudo gem install GEMNAME
Posted by Henning Koch to makandra dev (2011-05-26 09:22)