gem 类似yum 用来安装软件
想起了Ubuntu的apt-get
安装gem
wget -c http://production.cf.rubygems.org/rubygems/rubygems-1.8.24.tgz
tar xzcf rubygems-1.8.24.tgz
cd rubygems-1.8.24
ruby setup.rb
执行gem
老提示
程序 'gem' 已包含在以下软件包中:
* rubygems1.8
* rubygems1.9
试试:apt-get install <选定的软件包>
-bash: gem:找不到命令
后来发现安装好的gem应该用gem1.8来执行
gem1.8
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 platforms show information about platforms
gem help
(e.g. 'gem help install')
gem server present a web page at
http://localhost:8808/
with info about installed gems
Further information:
http://rubygems.rubyforge.org
还有一种办法是直接安装ruby
apt-get install rubygems-1.9.1
就好了。