Your SlideShare is downloading. ×
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
RubyGem
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

RubyGem

959

Published on

My

My

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
959
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a server for distributing them. It is analogous to EasyInstall for the Python programming language. RubyGems is now part of the standard library from Ruby version 1.9.Being very powerful, RubyGemsare of great importance in the Rubyland. They can easily be used to extend or change functionality within Ruby applications.More info: http://docs.rubygems.org/read/book/7
  • Gems are very useful for not reinventing the wheel and avoiding duplication. That’s basically it. Many Ruby developers create and publish awesome gems which address specific requirements, solve specific problems or add specific functionality. Anyone who comes across similar requirements or problems can use them and eventually improve them. That’s the joint awesomeness of Ruby’s strong open-source foundation and extreme flexibility. Anyway, you’re reading this article… so you’ve probably understood the concept and grasped its usefulness long before reading this paragraph.
  • require_paths: add paths to $LOAD_PATH($:)http://guides.rubygems.org/specification-reference/
  • Answer: show $LOAD_PATH, find rubygems.rb and then read custom_require.rb
  • How does it work?
  • How & Why?
  • How & Why?
  • How does “bundle install” work ?How does rails use it?
  • /Users/rongz/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.5/lib/bundler/runtime.rbhttp://yehudakatz.com/2010/04/12/some-of-the-problems-bundler-solves/bundle exec <command>
  • http://gembundler.com/rails23.html
  • Transcript

    • 1. RubyGem
    • 2. What?
    • 3. Why?
    • 4. How to write a rubygem?
    • 5. $ bundle gem <gem name>
    • 6. <gem name>.gemspec http://guides.rubygems.org/specification-reference/
    • 7. lib/<gem name>.rb
    • 8. $ gem build <gem name>.gemspec
    • 9. How to install a rubygem?
    • 10. $ gem install <gem name>.gem
    • 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. Push your new gem to rubygems.org
    • 13. $ gem push <gem name>.gem
    • 14. How to use a gem in a project?
    • 15. in Rails 2.3?
    • 16. in Rails 3?
    • 17. Recommendations
    • 18. Vendorize a gem in Rails
    • 19. Pack gems into a project
    • 20. $ bundle package
    • 21. $ bundle exec <command>
    • 22. GemBundler
    • 23. How does it work?
    • 24. Why is GemBundler better?
    • 25. Can Rails 2.3 use it?
    • 26. Thank you!

    ×