Main image
18th 8月
2008
written by tmiyai

NotePCに Ruby on Rails のNetBeans開発環境を構築する。

■ruby インストール
・One-Click Ruby
ruby186-26.exe

システム環境変数の”path”にrubyのpathを追加
;C:\ruby\bin

■MySQL
mysql-essential-5.0.51b-win32.msi

・default character を utf8 に変更
・Include Bin Directory in Windows PATHにチェックオン

■Rails
gemsでインストール

> gem install rails

c:\ruby>gem install rails
Bulk updating Gem source index for: http://gems.rubyforge.org
Install required dependency rake? [Yn] Y
Install required dependency activesupport? [Yn] Y
Install required dependency activerecord? [Yn] Y
Install required dependency actionpack? [Yn] Y
Install required dependency actionmailer? [Yn] Y
Install required dependency activeresource? [Yn] Y
Successfully installed rails-2.1.0
Successfully installed rake-0.8.1
Successfully installed activesupport-2.1.0
Successfully installed activerecord-2.1.0
Successfully installed actionpack-2.1.0
Successfully installed actionmailer-2.1.0
Successfully installed activeresource-2.1.0
Installing ri documentation for rake-0.8.1…
Installing ri documentation for activesupport-2.1.0…
Installing ri documentation for activerecord-2.1.0…
Installing ri documentation for actionpack-2.1.0…
Installing ri documentation for actionmailer-2.1.0…
Installing ri documentation for activeresource-2.1.0…
Installing RDoc documentation for rake-0.8.1…
Installing RDoc documentation for activesupport-2.1.0…
Installing RDoc documentation for activerecord-2.1.0…
Installing RDoc documentation for actionpack-2.1.0…
Installing RDoc documentation for actionmailer-2.1.0…
Installing RDoc documentation for activeresource-2.1.0…

c:\ruby>gem install rails
Successfully installed rails-2.1.0

#インストール許可を省略する際には”-y”オプション
> gem install rails -y

#1.2系をインストールする場合は以下参照
> gem install rails –version=”1.2.6″ -y

■プログラムインストール結果
C:\Documents and Settings\Miyai>mysql –version
mysql Ver 14.12 Distrib 5.0.51b, for Win32 (ia32)

C:\Documents and Settings\Miyai>rails -v
Rails 2.1.0

C:\Documents and Settings\Miyai>ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

■NetBeansインストール
JDKが必要
Java SE Downloads

NetBeans 日本語サイト
ja: NetBeans 日本語サイト
netbeans-6.1-ml-ruby-windows.exe
※mlはマルチランゲージの事。日本語版を含みます。

■チュートリアル
Ruby のブログを 10 分で作成 – NetBeans IDE 6.0 チュートリアル

Leave a Reply