ル微王徴

RubyGems

最終更新:

rubyocho

- view
メンバー限定 登録/ログイン

RubyGemsの使い方

gem help commands

GEM commands are:
----------------------------------------------------------------------------
   build            Build a gem from a gemspec
   cert             Adjust RubyGems certificate settings
   check            Check installed gems
   cleanup          Clean up old versions of installed gems in the local
                    repository
   contents         Display the contents of the installed gems
   dependency       Show the dependencies of an installed gem
   environment      Display information about the RubyGems environment
   help             Provide help on the 'gem' command
   install          Install a gem into the local repository
   list             Display all gems whose name starts with STRING
   outdated         Display all gems that need updates
   pristine         Restores gem directories to pristine condition from files
                    located in the gem cache
   query            Query gem information in local or remote repositories
   rdoc             Generates RDoc for pre-installed gems
   search           Display all gems whose name contains STRING
   sources          Manage the sources RubyGems will search forgems
   specification    Display gem specification (in yaml)
   uninstall        Uninstall gems from the local repository
   unpack           Unpack an installed gem to the current directory
   update           Update the named gem (or all installed gems) in the local
                    repository
----------------------------------------------------------------------------
For help on a particular command, use 'gem help COMMAND'.

使い方の基本

検索

# gem search rails --remote
*** REMOTE GEMS ***
Bulk updating Gem source index for: http://gems.rubyforge.org
ajp-rails (0.1.0, 0.0.4, 0.0.3, 0.0.2, 0.0.1, 0.0.0)
   Ruby on Rails Runner, which uses AJP(Apache JServ Protocol) to
   cooperate with a HTTPd, instead of CGI or FastCGI
atlas_on_rails (0.1.0)
   An API agnostic way of including maps within you Rails app (e.g.,
   GoogleMaps)
gemsonrails (0.4.3, 0.4.2, 0.3.0, 0.2.0)
   Link or freeze RubyGems into your rails apps, instead of plugins
odbc-rails (1.4, 1.3, 1.2)
   ODBC Data Adapter for ActiveRecord.
rails (1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.6, 1.1.5, 1.1.4, 1.1.3,
       1.1.2, 1.1.1, 1.1.0, 1.0.0, 0.14.4, 0.14.3, 0.14.2, 0.14.1,
        0.13.1, 0.13.0, 0.12.1, 0.12.0, 0.11.1, 0.11.0, 0.10.1,
        0.10.0, 0.9.5, 0.9.4.1, 0.9.4, 0.9.3, 0.9.2, 0.9.1, 0.9.0,
        0.8.5, 0.8.0, 0.7.0, 0.6.5, 0.6.0)
   Web-application framework with template engine, control-flow layer,
   and ORM.
rails-app-installer (0.2.0, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1, 0.1.0)
   An installer for Rails apps
rails_analyzer_tools (1.1.0, 1.0.0)
   Tools for analyzing the performance of web sites.
rails_env (0.1.0)
   description of gem
rails_product (0.6, 0.5)
   Creates a ready-to-go productized Ruby on Rails application from a
   single command ('rails_product').
rails_sql_views (0.5.1, 0.5.0, 0.4.0, 0.3.0, 0.2.0, 0.1.0)
   Adds SQL Views to Rails.
railsbench (0.9.2, 0.9.1, 0.9.0, 0.8.4)
   rails benchmarking tools
RailsEditor (0.0.26, 0.0.25, 0.0.24, 0.0.23, 0.0.22, 0.0.21)
   A screen + vim IDE setup for editing a Rails tree
railsmachine (0.1.2, 0.1.1, 0.1.0)
   The Rails Machine task library
RailsRemoteControl (1.0.0)
   Alter Rails log levels and monitor processes without restarts

インストール

# gem install rails --remote
Install required dependency rake? [Yn]  y
Install required dependency activesupport? [Yn]  y
Install required dependency activerecord? [Yn]  y
Install required dependency actionpack? [Yn]  y
Install required dependency actionmailer? [Yn]  y
Install required dependency actionwebservice? [Yn]  y
Successfully installed rails-1.2.3
Successfully installed rake-0.7.3
Successfully installed activesupport-1.4.2
Successfully installed activerecord-1.15.3
Successfully installed actionpack-1.13.3
Successfully installed actionmailer-1.3.3
Successfully installed actionwebservice-1.2.3

リスト

# gem list
*** LOCAL GEMS ***
actionmailer (1.3.3)
   Service layer for easy email delivery and testing.
actionpack (1.13.3)
   Web-flow and rendering framework putting the VC in MVC.
actionwebservice (1.2.3)
   Web service support for Action Pack.
activerecord (1.15.3)
   Implements the ActiveRecord pattern for ORM.
activesupport (1.4.2)
   Support and utility classes used by the Rails framework.
rails (1.2.3)
   Web-application framework with template engine, control-flow layer,
   and ORM.
rake (0.7.3)
   Ruby based make-like utility.
sources (0.0.1)
   This package provides download sources for remote gem installation
ウィキ募集バナー