小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

RubyGems簡介

 xos 2007-01-22
RubyGems是一個方便而強(qiáng)大的Ruby程序包管理器( package manager),類似RedHat的RPM.它將一個Ruby應(yīng)用程序打包到一個gem里,作為一個安裝單元。
當(dāng)前最新版本為0.8.3
下載地址:http:///frs/?group_id=126
主頁:http://rubygems./wiki/wiki.pl
最新的Ruby版本已經(jīng)包含RubyGems了。


特點(diǎn):
能遠(yuǎn)程安裝包
包之間依賴關(guān)系的管理
簡單可靠的卸載(uninstallation)
查詢機(jī)制,能查詢本地和遠(yuǎn)程服務(wù)器的包信息
能保持一個包的不同版本
基于Web的查看接口,能查看你安裝的gem的信息。


安裝RubyGems
首先從rubyforge下載它的源文件 ,然后解壓縮到一個地方,比如C:rubygems-0.8.3

C:rubygems-0.8.3>ruby setup.rb
---> bin
<--- bin
---> lib
---> lib/rubygems
<--- lib/rubygems
<--- lib
---> bin
<--- bin
---> lib
---> lib/rubygems
<--- lib/rubygems
<--- lib
rm -f InstalledFiles
---> bin
mkdir -p c:/ruby/bin/
install gem c:/ruby/bin/
install gem_server c:/ruby/bin/
install generate_yaml_index.rb c:/ruby/bin/
install update_rubygems c:/ruby/bin/
<--- bin
---> lib
mkdir -p c:/ruby/lib/ruby/site_ruby/1.8/
install rubygems.rb c:/ruby/lib/ruby/site_ruby/1.8/
install ubygems.rb c:/ruby/lib/ruby/site_ruby/1.8/
---> lib/rubygems
mkdir -p c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install builder.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install cmd_manager.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install command.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install config_file.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install doc_manager.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install format.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install gem_commands.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install gem_runner.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install installer.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install loadpath_manager.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install old_format.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install open-uri.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install package.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install remote_installer.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install rubygems_version.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install source_index.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install specification.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install user_interaction.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install validator.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
install version.rb c:/ruby/lib/ruby/site_ruby/1.8/rubygems
<--- lib/rubygems
<--- lib

As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a while)...
...done.
No library stubs found.

Successfully built RubyGem
Name: sources
Version: 0.0.1
File: sources-0.0.1.gem

C:rubygems-0.8.3>gem -v
0.8.3

安裝其實(shí)很簡單。使用也簡單,不帶參數(shù)運(yùn)行g(shù)em則顯示使用方法:

C:rubygems-0.8.3>gem

RubyGems is a sophisticated package manager for Ruby. This is a
basic help message containing pointers to more information.

Usage:
gem -h/--help
gem -v/--version
gem command [arguments...] [options...]

Examples:
gem install rake
gem list --local
gem build package.gemspec
gem help install

Further help:
gem help commands list all ‘gem‘ commands
gem help examples show some examples of usage
gem help show help on COMMAND
(e.g. ‘gem help install‘)
Further information:
http://rubygems.

安裝Rails

C:rubygems-0.8.3>gem install rails
Attempting local installation of ‘rails‘
Local gem file not found: rails*.gem
Attempting remote installation of ‘rails‘
Install required dependency rake? [Yn] y
Install required dependency activerecord? [Yn] y
Install required dependency actionpack? [Yn] y
Install required dependency actionmailer? [Yn] y
Successfully installed rails, version 0.9.1
Installing RDoc documentation for rails-0.9.1...
WARNING: Generating RDoc on .gem that may not have RDoc.

lib/binding_of_caller.rb:4:25: Couldn‘t find Continuation. Assuming it‘s a mod
e

lib/binding_of_caller.rb:36:21: Couldn‘t find Binding. Assuming it‘s a module

lib/rails_generator.rb:34:46: Skipping require of dynamic string: "#{path}/#{n
e}_generator.rb"
Installing RDoc documentation for rake-0.4.12...
Installing RDoc documentation for activerecord-1.2.0...
Installing RDoc documentation for actionpack-1.0.1...

lib/action_controller/scaffolding.rb:87:37: Skipping require of dynamic string
"#{model_id.id2name}"
Installing RDoc documentation for actionmailer-0.5.0...

C:rubygems-0.8.3>gem query --local

*** LOCAL GEMS ***

actionmailer (0.5.0)
Service layer for easy email delivery and testing.

actionpack (1.0.1)
Web-flow and rendering framework putting the VC in MVC.

activerecord (1.2.0)
Implements the ActiveRecord pattern for ORM.

rails (0.9.1)
Web-application framework with template engine, control-flow layer,
and ORM.

rake (0.4.12)
Ruby based make-like utility.

sources (0.0.1)
This package provides download sources for remote gem installation


如果命令沒有指明是從本地還是遠(yuǎn)程安裝,則默認(rèn)先從本地安裝,因?yàn)檎也坏絩ails*.gem文件,所以,所以再從遠(yuǎn)程安裝。
遇到Rails依賴的包,我們也需要安裝。
默認(rèn)得,這些gems都被安裝到了RUBY_HOMElibrubygems1.8gems下了(各個平臺,版本都可能不同)
你可以用--dir選項(xiàng)覆蓋這個默認(rèn)值。


RubyGems還自帶了一個基于
WEBrick的web服務(wù)器程序gem_server,使得你可以通過web來查看生成的RDoc文檔。
C:rubygems-0.8.3>gem_server
[2004-12-19 13:06:12] INFO WEBrick 1.3.1
[2004-12-19 13:06:12] INFO ruby 1.8.2 (2004-11-06) [i386-mswin32]
[2004-12-19 13:06:12] INFO WEBrick::HTTPServer#start: pid=624 port=8808
127.0.0.1 - - [19/Dec/2004:13:06:26 中國標(biāo)準(zhǔn)時間] "GET / HTTP/1.1" 200 2248

    本站是提供個人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多