Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

RubyGems

From Wikipedia, the free encyclopedia
Package manager for Ruby
This articlerelies excessively onreferences toprimary sources. Please improve this article by addingsecondary or tertiary sources.
Find sources: "RubyGems" – news ·newspapers ·books ·scholar ·JSTOR
(July 2021) (Learn how and when to remove this message)
"Gem (software)" redirects here. For the 1980s desktop, seeGEM (desktop environment).
RubyGems
Stable release
3.6.5[1] / 20 February 2025; 26 days ago (20 February 2025)
Repository
Written inRuby
Operating systemCross-platform
TypePackage manager
LicenseRuby License
Websiterubygems.org
Total gems173,000+
Total downloads109+ billion

RubyGems is apackage manager for theRuby programming language that provides a standard format for distributing Ruby programs andlibraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and aserver for distributing them. It was created byChad Fowler,Jim Weirich,David Alan Black,Paul Brannan andRichard Kilmer in 2004.[2]

The interface for RubyGems is acommand-line tool calledgem which can install and manage libraries (the gems).[3] RubyGems integrates with Ruby run-timeloader to help find and load installed gems from standardized library folders. Though it is possible to use a private RubyGemsrepository, the public repository is most commonly used for gem management.

The public repository helps users find gems, resolvedependencies and install them. RubyGems is bundled with the standard Ruby package as of Ruby 1.9.[4]

History

[edit]

Development on RubyGems started in November 2003 and was released to the public on March 14, 2004, orPi Day 2004.[5]

It was created byChad Fowler,Jim Weirich,David Alan Black,Paul Brannan andRichard Kilmer during RubyConf 2004.[2]

In 2010, the default public repository for gems moved from gems.rubyforge.org to rubygems.org, which is still in use. Also, RubyGems development was moved toGitHub in 2010. Though RubyGems has existed since Ruby 1.8, it was not a part of the standard Ruby distribution until Ruby 1.9.[citation needed]

There were 38 releases from 2004 to 2010.[5]

Previously,compatibility with RubyGems and Ruby varied. Many versions of RubyGems are almost fully incompatible with many versions of Ruby and some versions had key features unusable. For example, Ruby 1.9 came with RubyGems 1.3.7 in its standard distribution, but RubyGems 1.4.x was not compatible with Ruby 1.9. This meant that updating RubyGems on Ruby 1.9 was not possible until RubyGems 1.5.0 was released in 2011, two years after the first stable release of Ruby 1.9.[6] These compatibility issues led to a rapid development of RubyGems, switching to a 4–6 week release schedule, and more version releases.[5]

There were 117 releases from 2011 to 2016. 45 versions were released in 2013, which is the highest number of releases in a year for RubyGems.[5]

Structure of a gem

[edit]

Every gem contains a name, version and platform. Gems work only on ruby designed for a particular platform based onCPU architecture and operating-system type and version.[7]

Each gem consists of:

  1. Code
  2. Documentation
  3. Gem specification (Gemspec)

The code organization follows the following structure for a gem calledgem_name:

gem_name/├── bin/│   └── gem_name├── lib/│   └── gem_name.rb├── test/│   └── test_gem_name.rb├── README├── Rakefile└── gem_name.gemspec
  • The lib directory contains the code for the gem.
  • The test (or spec) directory is used for testing.
  • Rakefile is used byRake to automate tests and to generate code.
  • README includes the documentation,RDOC, for most gems.
  • Gem specification (gemspec) contains information about the author of the gem, the time of creation and the purpose the gem serves.

Security concerns

[edit]

Since gems run their own code in an application it may lead to various security issues due to installation of malicious gems. The creator of a malicious gem may be able to compromise the user's system or server.[8]

A number of methods have been developed to counter the security threat:

  • Cryptographic signing of gems since RubyGems version 0.8.11. The gem cert and gem install commands are used for this purpose.
  • New signing models such asX509 andOpenPGP have been proposed and are actively being discussed among Ruby experts.

See also

[edit]

References

[edit]
  1. ^"Release 3.6.5". 20 February 2025. Retrieved28 February 2025.
  2. ^ab"174 Rubygems with Eric Hodel". Archived fromthe original on 2021-07-31. Retrieved2018-05-09.
  3. ^"RubyGems Command Reference".guides.rubygems.org. Retrieved2016-09-18.
  4. ^"Ruby 1.9.1 changelog". Archived fromthe original on 2022-01-17.
  5. ^abcd"Version history of RubyGems".GitHub. Retrieved2016-09-18.
  6. ^"Ruby 1.9.1 released".www.ruby-lang.org. Retrieved2016-09-18.
  7. ^"What is a gem? - RubyGems.org".guides.rubygems.org. Retrieved2016-09-18.
  8. ^"Security - RubyGems Guides".guides.rubygems.org. Retrieved2016-09-23.

External links

[edit]
Implementations
Active
Discontinued
IDE
Applications
Libraries andframeworks
Server software
People
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=RubyGems&oldid=1260912818"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp