概要:RubyのフレームワークであるRuby on RailsおよびMySQLのRuby APIのmysql-rubyをインストールする。

前提:

  • mysql-devel (mysql-rubyで必要)

1. Ruby on Railsの確認 gemコマンドで表示されないことを確認する。

# gem list

*** LOCAL GEMS ***

2. Ruby on Railsのインストール

# gem install rails ← 結構時間がかかる。
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
8 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.5...
Installing ri documentation for activerecord-2.3.5...
Installing ri documentation for rack-1.0.1...
Installing ri documentation for actionpack-2.3.5...
Installing ri documentation for actionmailer-2.3.5...
Installing ri documentation for activeresource-2.3.5...
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rake-0.8.7...
Installing RDoc documentation for activesupport-2.3.5...
Installing RDoc documentation for activerecord-2.3.5...
Installing RDoc documentation for rack-1.0.1...
Installing RDoc documentation for actionpack-2.3.5...
Installing RDoc documentation for actionmailer-2.3.5...
Installing RDoc documentation for activeresource-2.3.5...
Installing RDoc documentation for rails-2.3.5...

3. Ruby on Railsの導入の確認

# gem list

*** LOCAL GEMS ***

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)

4. mysql-rubyのインストール

  1. ) mysql-develの確認&インストール
    # rpm -qi mysql-devel
    # yum -y install mysql-devel ← mysql-develのインストール(上記で無かった場合)
    
  2. ) mysql-rubyのインストール
    # gem install mysql
    Building native extensions.  This could take a while...
    Successfully installed mysql-2.8.1
    1 gem installed
    Installing ri documentation for mysql-2.8.1...
    
    No definition for next_result
       :
       :
    Installing RDoc documentation for mysql-2.8.1...
    
    No definition for next_result
       :
       :
    No definition for error_sqlstate
    
  3. ) mysql-rubyの確認
    # gem list
    
    *** LOCAL GEMS ***
    
    actionmailer (2.3.5)
    actionpack (2.3.5)
    activerecord (2.3.5)
    activeresource (2.3.5)
    activesupport (2.3.5)
    mysql (2.8.1) ← インストールされている。
    rack (1.0.1)
    rails (2.3.5)
    rake (0.8.7)
    

最終更新のRSS
Last-modified: 2014-03-11 (火) 01:59:57 (1989d)