Successfully reported this slideshow.
RubyGem
What?
Why?
How to write a rubygem?
$ bundle gem <gem name>
<gem name>.gemspec            http://guides.rubygems.org/specification-reference/
lib/<gem name>.rb
$ gem build <gem name>.gemspec
How to install a rubygem?
$ gem install <gem name>.gem
$ irb• require ‘rubygems’ (only in 1.8)• require ‘<gem name>’• then test and enjoy it …Question:What does “require ‘rubyge...
Push your new gem to rubygems.org
$ gem push <gem name>.gem
How to use a gem in a project?
in Rails 2.3?
in Rails 3?
Recommendations
Vendorize a gem in Rails
Pack gems into a project
$ bundle package
$ bundle exec <command>
GemBundler
How does it work?
Why is GemBundler better?
Can Rails 2.3 use it?
Thank you!
Upcoming SlideShare
Loading in …5
×

RubyGem

1,174 views

Published on

My

Published in: Technology
  • Be the first to comment

  • Be the first to like this

RubyGem

  1. 1. RubyGem
  2. 2. What?
  3. 3. Why?
  4. 4. How to write a rubygem?
  5. 5. $ bundle gem <gem name>
  6. 6. <gem name>.gemspec http://guides.rubygems.org/specification-reference/
  7. 7. lib/<gem name>.rb
  8. 8. $ gem build <gem name>.gemspec
  9. 9. How to install a rubygem?
  10. 10. $ gem install <gem name>.gem
  11. 11. $ irb• require ‘rubygems’ (only in 1.8)• require ‘<gem name>’• then test and enjoy it …Question:What does “require ‘rubygems’” do?What does “require ‘<gem name>’” do?
  12. 12. Push your new gem to rubygems.org
  13. 13. $ gem push <gem name>.gem
  14. 14. How to use a gem in a project?
  15. 15. in Rails 2.3?
  16. 16. in Rails 3?
  17. 17. Recommendations
  18. 18. Vendorize a gem in Rails
  19. 19. Pack gems into a project
  20. 20. $ bundle package
  21. 21. $ bundle exec <command>
  22. 22. GemBundler
  23. 23. How does it work?
  24. 24. Why is GemBundler better?
  25. 25. Can Rails 2.3 use it?
  26. 26. Thank you!

×