Linux ubuntu 安装gem

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 show help on COMMAND
(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

就好了。


This entry was posted in Linux and tagged , , . Bookmark the permalink.
月小升QQ 2651044202, 技术交流QQ群 178491360
首发地址:月小升博客https://java-er.com/blog/linux-ubuntu-gem/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
您的评论是我写作的动力.
2020.03.24 评论已经全局关闭,有事加QQ聊天