2005年12月17日土曜日

Ruby on Rails インストール・メモ

Download Ruby on Rails


Ruby on Rails をCygwin上にインストール
  • ruby-1.8.3をinstall (cygwin のsetup.exe経由でも、source compileでも可)
ruby-1.8.3 > ./configure --enable-shared
ruby-1.8.3 > make
ruby-1.8.3 > make install
  • RubyGemsをダウンロードして展開後、
rubygems-0.8.11 > ruby setup.rb
...
rubygems-0.8.11> gem update
Upgrading installed gems...
Updating Gem source index for: http://gems.rubyforge.org
Gems: [] updated
rubygems-0.8.11> gem install rails --include-dependency
Attempting local installation of 'rails'
Local gem file not found: rails*.gem
Attempting remote installation of 'rails'
Successfully installed rails-1.0.0
Successfully installed rake-0.6.2
Successfully installed activesupport-1.2.5
Successfully installed activerecord-1.13.2
Successfully installed actionpack-1.11.2
Successfully installed actionmailer-1.1.5
Successfully installed actionwebservice-1.0.0
Installing RDoc documentation for rake-0.6.2...
Installing RDoc documentation for activesupport-1.2.5...
Installing RDoc documentation for activerecord-1.13.2...
Installing RDoc documentation for actionpack-1.11.2...
Installing RDoc documentation for actionmailer-1.1.5...
Installing RDoc documentation for actionwebservice-1.0.0...

ruby setup.rbの部分で
ruby: No such file to load -- ubygems (LoadError)

と出る場合、環境変数RUBYOPTS=rubygemsと設定されているのが問題のよう。RUBYOPTはコマンドラインにデフォルトで渡される引数です。unset RUBYOPTなどするのがよいかと。

cygwin使わずにコマンドプロンプト(あるいはそれに代わる物)を使っている人にはこんな面倒なことをしなくても、One-Click Ruby Installerが便利。gemまで全部入れてくれます。ただ、こっちのversion使うと、cygwin上でパスの検索がうまくできなくなったりと、いろいろ不都合があるのです。

3 件のコメント:

匿名 さんのコメント...

Thank you!
[url=http://zojpeptt.com/assc/fmvb.html]My homepage[/url] | [url=http://jremuitg.com/kzpl/zeub.html]Cool site[/url]

匿名 さんのコメント...

Great work!
My homepage | Please visit

匿名 さんのコメント...

Thank you!
http://zojpeptt.com/assc/fmvb.html | http://shnhvsle.com/uwqe/ribd.html

License

Creative Commons LicenseLeo's Chronicle by Taro L. Saito is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.1 Japan License.