There are a lot of posts on how to build rubygems. With Rails 3.1, though, they’re all old and busted.
The new hotness is built right into rails now. Just incant
rails plugin new APP_PATH
You’ll get:
- a .gemspec and Gemfile to get started
- a dummy rails app to integration test your new gem against
- a (deprecated) RDoc rake task
When you run rake, you’ll see “rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)”. To remedy, follow these steps.
The Edge edition of the Ruby on Rails Guides has more information.