初期設定(windows7)

概要


インストール

Ruby on Rails

c:\>gem install rails
Fetching: i18n-0.6.1.gem (100%)
Successfully installed i18n-0.6.1
Fetching: multi_json-1.7.3.gem (100%)
Successfully installed multi_json-1.7.3
Fetching: activesupport-3.2.13.gem (100%)
Successfully installed activesupport-3.2.13
Fetching: builder-3.0.4.gem (100%)
Successfully installed builder-3.0.4
Fetching: activemodel-3.2.13.gem (100%)
Successfully installed activemodel-3.2.13
Fetching: rack-1.4.5.gem (100%)
Successfully installed rack-1.4.5
Fetching: rack-cache-1.2.gem (100%)
Successfully installed rack-cache-1.2
Fetching: rack-test-0.6.2.gem (100%)
Successfully installed rack-test-0.6.2
Fetching: journey-1.0.4.gem (100%)
Successfully installed journey-1.0.4
Fetching: hike-1.2.2.gem (100%)
Successfully installed hike-1.2.2
Fetching: tilt-1.4.1.gem (100%)
Successfully installed tilt-1.4.1
Fetching: sprockets-2.2.2.gem (100%)
Successfully installed sprockets-2.2.2
Fetching: erubis-2.7.0.gem (100%)
Successfully installed erubis-2.7.0
Fetching: actionpack-3.2.13.gem (100%)
Successfully installed actionpack-3.2.13
Fetching: arel-3.0.2.gem (100%)
Successfully installed arel-3.0.2
Fetching: tzinfo-0.3.37.gem (100%)
Successfully installed tzinfo-0.3.37
Fetching: activerecord-3.2.13.gem (100%)
Successfully installed activerecord-3.2.13
Fetching: activeresource-3.2.13.gem (100%)
Successfully installed activeresource-3.2.13
Fetching: mime-types-1.23.gem (100%)
Successfully installed mime-types-1.23
Fetching: polyglot-0.3.3.gem (100%)
Successfully installed polyglot-0.3.3
Fetching: treetop-1.4.12.gem (100%)
Successfully installed treetop-1.4.12
Fetching: mail-2.5.4.gem (100%)
Successfully installed mail-2.5.4
Fetching: actionmailer-3.2.13.gem (100%)
Successfully installed actionmailer-3.2.13
Fetching: rack-ssl-1.3.3.gem (100%)
Successfully installed rack-ssl-1.3.3
Fetching: thor-0.18.1.gem (100%)
Successfully installed thor-0.18.1
Fetching: rdoc-3.12.2.gem (100%)
rdoc's executable "rdoc" conflicts with C:/Ruby200-x64/bin/rdoc
Overwrite the executable? [yN]
ERROR:  Error installing rails:
        "rdoc" from rdoc conflicts with C:/Ruby200-x64/bin/rdoc
 
c:\>gem install rails
rdoc's executable "rdoc" conflicts with C:/Ruby200-x64/bin/rdoc
Overwrite the executable? [yN]  y
rdoc's executable "ri" conflicts with C:/Ruby200-x64/bin/ri
Overwrite the executable? [yN]  y
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
 
<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Successfully installed rdoc-3.12.2
Fetching: railties-3.2.13.gem (100%)
Successfully installed railties-3.2.13
Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
Fetching: rails-3.2.13.gem (100%)
Successfully installed rails-3.2.13
Parsing documentation for rdoc-3.12.2
Installing ri documentation for rdoc-3.12.2
Parsing documentation for railties-3.2.13
Installing ri documentation for railties-3.2.13
Parsing documentation for bundler-1.3.5
Installing ri documentation for bundler-1.3.5
Parsing documentation for rails-3.2.13
Installing ri documentation for rails-3.2.13
4 gems installed
 
c:\>
 

DevKitのダウンロード、インストール

ダウンロード

http://rubyinstaller.org/downloadsより、「DEVELOPMENT KIT」のファイルをダウンロードする

任意の場所へ解凍

インストール

コマンドプロンプトを開き、解凍した場所へ移動
c:\>cd C:\Ruby200-x64\DevKit
 
C:\Ruby200-x64\DevKit>
 

「ruby dk.rb init」で初期化
C:\Ruby200-x64\DevKit>ruby dk.rb init
 
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
 
C:\Ruby200-x64\DevKit>
 

「config.yaml」を編集する
# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
- C:/Ruby200-x64
---
 
 

「ruby dk.rb install」でインストール
C:\Ruby200-x64\DevKit>ruby dk.rb install
[INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/2.0.0/rubygems/defaults/operating_system.rb'
[INFO] Installing 'C:/Ruby200-x64/lib/ruby/site_ruby/devkit.rb'
 
C:\Ruby200-x64\DevKit>
 

gemでパッケージインストール

sqlite3


サンプルアプリ作成

sqlite3のサンプル





最終更新:2013年05月18日 11:45