Video: https://www.youtube.com/watch?v=bMD5IB8vKmA
Real time chat: http://tlk.io/ror-study-group
-
Create the gem skeleton
bundle gem topreddit
-
CD into the gem
cd topreddit
-
Alter the gemspec to add anything you'd normally put in the Gemfile
vi topreddit.gemspec
Note: You can add runtime dependencies with
spec.add_runtime_dependency
-
Add the fluff of your gem to
lib/topreddit.rb
or require the appropriate other files fromlib/topreddit/
vi lib/topreddit.rb
-
Make your gem executable, add any instantiation options here
vi bin/topreddit chmod +x bin/topreddit
Note: You'll need to require the main file in lib
-
Add the files in git
git add . git commit -m "Initial commit"
-
Build your gem locally
gem build topreddit.gemspec
-
Install your gem locally
gem install ./topreddit-0.0.1.gem
-
Deploy to rubygems
gem push topreddit-0.0.1.gem