LoginSignup
63
51

More than 5 years have passed since last update.

[ruby] CentOS に gem が入っていなかったときのインストールメモ

Last updated at Posted at 2013-12-13
#
# cat /etc/redhat-release
#
CentOS release 6.4 (Final)

#
# yum install ruby
# ruby -v
#
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

#
# git clone https://github.com/rubygems/rubygems.git rubygems
#
Initialized empty Git repository in /root/Documents/rubygems/.git/
remote: Counting objects: 38455, done.
remote: Compressing objects: 100% (17834/17834), done.
remote: Total 38455 (delta 22413), reused 34895 (delta 18918)
Receiving objects: 100% (38455/38455), 12.63 MiB | 144 KiB/s, done.
Resolving deltas: 100% (22413/22413), done.

#
# cd rubygems
# ruby setup.rb
#
RubyGems 2.2.0 installed
ERROR:  While executing gem ... (Gem::DocumentError)
    RDoc is not installed: no such file to load -- rdoc/rdoc

#
# yum install rdoc
# rdoc -v
#
RDoc V1.0.1 - 20041108

#
# ruby setup.rb
#
RubyGems 2.2.0 installed
Installing ri documentation for rubygems-2.2.0
/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block



------------------------------------------------------------------------------

RubyGems installed the following executables:
        /usr/bin/gem

Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for ruby libraries. You may access it like this:
  ri Classname
  ri Classname.class_method
  ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.


#
# gem -v
#
2.2.0

#
# gem install sass
#
Fetching: sass-3.2.12.gem (100%)
Successfully installed sass-3.2.12
Installing ri documentation for sass-3.2.12
/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
Done installing documentation for sass after 42 seconds
1 gem installed

#
# sass -v
#
Sass 3.2.12 (Media Mark)

以上。

追記:2015-01-19

もっと簡単でした。

# yum install rubygems
63
51
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
63
51