VistaにRails(とかSQLite3)をセットアップするメモ

1. ActiveScriptRuby 1.8.7のインストール

http://arton.hp.infoseek.co.jp/indexj.htmlから取ってきてPATHに設定します。なんかRubyGemも入っているみたいですね。

>ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32]

>gem -v
1.2.0

2. Rails 2.2のインストール

>gem install rails
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - C:/Program Files/ruby-1.8/bin/rake.bat

なんかエラーになりますね。

Windows VistaでRubyGemを利用する場合、プログラムメニューに登録されたruby consoleをコンテキストメニューの「管理者権限で実行」を選択して実行してください。

http://arton.hp.infoseek.co.jp/indexj.html

だそうなので、そのようにします。

>gem install rails
Successfully installed rake-0.8.3
Successfully installed activesupport-2.2.2
Successfully installed activerecord-2.2.2
Successfully installed actionpack-2.2.2
Successfully installed actionmailer-2.2.2
Successfully installed activeresource-2.2.2
Successfully installed rails-2.2.2
7 gems installed
Installing ri documentation for rake-0.8.3...
Installing ri documentation for activesupport-2.2.2...
Installing ri documentation for activerecord-2.2.2...
Installing ri documentation for actionpack-2.2.2...
Installing ri documentation for actionmailer-2.2.2...
Installing ri documentation for activeresource-2.2.2...
Installing RDoc documentation for rake-0.8.3...
Installing RDoc documentation for activesupport-2.2.2...
Installing RDoc documentation for activerecord-2.2.2...
Installing RDoc documentation for actionpack-2.2.2...
Installing RDoc documentation for actionmailer-2.2.2...
Installing RDoc documentation for activeresource-2.2.2...

Rails2.2がインストールされました。

3. SQLite 3.6.11のインストール

SQLite Download Pageから取ってきてPATHを設定します。

Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

>sqlite3
SQLite version 3.6.11
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .quit

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

>gem install sqlite3-ruby
Building native extensions.  This could take a while...
ERROR:  Error installing sqlite3-ruby:
        ERROR: Failed to build gem native extension.

C:/PROGRA~1/ruby-1.8/bin/ruby.exe extconf.rb install sqlite3-ruby
checking for fdatasync() in rt.lib... no
checking for sqlite3.h... no

nmake
'nmake' は、内部コマンドまたは外部コマンド、
操作可能なプログラムまたはバッチ ファイルとして認識されていません。


Gem files will remain installed in C:/PROGRA~1/ruby-1.8/lib/ruby/gems/1.8/gems/s
qlite3-ruby-1.2.4 for inspection.
Results logged to C:/PROGRA~1/ruby-1.8/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.4
/ext/sqlite3_api/gem_make.out

なんか1.2.3じゃないとダメらしいです。

>gem install --version 1.2.3 sqlite3-ruby
Successfully installed sqlite3-ruby-1.2.3-x86-mswin32
1 gem installed
Installing ri documentation for sqlite3-ruby-1.2.3-x86-mswin32...
Installing RDoc documentation for sqlite3-ruby-1.2.3-x86-mswin32...

5. Railsプロジェクトの作成とサーバーの起動

>rails hello
      create
      create  app/controllers
      create  app/helpers
      create  app/models
      create  app/views/layouts
      create  config/environments
      create  config/initializers
      create  config/locales
      create  db
      create  doc
      create  lib
      create  lib/tasks
      create  log
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  script/performance
      create  script/process
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance
      create  test/unit
      create  vendor
      create  vendor/plugins
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  Rakefile
      create  README
      create  app/controllers/application.rb
      create  app/helpers/application_helper.rb
      create  test/test_helper.rb
      create  test/performance/browsing_test.rb
      create  config/database.yml
      create  config/routes.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/new_rails_defaults.rb
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/environment.rb
      create  config/environments/production.rb
      create  config/environments/development.rb
      create  config/environments/test.rb
      create  script/about
      create  script/console
      create  script/dbconsole
      create  script/destroy
      create  script/generate
      create  script/performance/benchmarker
      create  script/performance/profiler
      create  script/performance/request
      create  script/process/reaper
      create  script/process/spawner
      create  script/process/inspector
      create  script/runner
      create  script/server
      create  script/plugin
      create  public/dispatch.rb
      create  public/dispatch.cgi
      create  public/dispatch.fcgi
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/index.html
      create  public/favicon.ico
      create  public/robots.txt
      create  public/images/rails.png
      create  public/javascripts/prototype.js
      create  public/javascripts/effects.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/controls.js
      create  public/javascripts/application.js
      create  doc/README_FOR_APP
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log

>cd hello

>ruby script\server
Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system`
and try again.

なんかRubyGemsが1.3.1以上じゃないとだめみたいです。

6. RubyGemsのアップデート

>gem update --system
Updating RubyGems
Nothing to update

>gem -v
1.2.0

あれ。これじゃだめみたい。

>gem install rubygems-update
Successfully installed rubygems-update-1.3.1
1 gem installed

>gem -v
1.2.0

まだだめ。

>update_rubygems
Installing RubyGems 1.3.1
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8
mkdir -p C:/PROGRA~1/ruby-1.8/bin
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rbconfig
install -c -m 0644 rbconfig/datadir.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1
.8/rbconfig/datadir.rb
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems
install -c -m 0644 rubygems/builder.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1
.8/rubygems/builder.rb
install -c -m 0644 rubygems/command.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1
.8/rubygems/command.rb
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/commands
install -c -m 0644 rubygems/commands/build_command.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/commands/build_command.rb
install -c -m 0644 rubygems/commands/cert_command.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/commands/cert_command.rb
install -c -m 0644 rubygems/commands/check_command.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/commands/check_command.rb
install -c -m 0644 rubygems/commands/cleanup_command.rb C:/PROGRA~1/ruby-1.8/lib
/ruby/site_ruby/1.8/rubygems/commands/cleanup_command.rb
install -c -m 0644 rubygems/commands/contents_command.rb C:/PROGRA~1/ruby-1.8/li
b/ruby/site_ruby/1.8/rubygems/commands/contents_command.rb
install -c -m 0644 rubygems/commands/dependency_command.rb C:/PROGRA~1/ruby-1.8/
lib/ruby/site_ruby/1.8/rubygems/commands/dependency_command.rb
install -c -m 0644 rubygems/commands/environment_command.rb C:/PROGRA~1/ruby-1.8
/lib/ruby/site_ruby/1.8/rubygems/commands/environment_command.rb
install -c -m 0644 rubygems/commands/fetch_command.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/commands/fetch_command.rb
install -c -m 0644 rubygems/commands/generate_index_command.rb C:/PROGRA~1/ruby-
1.8/lib/ruby/site_ruby/1.8/rubygems/commands/generate_index_command.rb
install -c -m 0644 rubygems/commands/help_command.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/commands/help_command.rb
install -c -m 0644 rubygems/commands/install_command.rb C:/PROGRA~1/ruby-1.8/lib
/ruby/site_ruby/1.8/rubygems/commands/install_command.rb
install -c -m 0644 rubygems/commands/list_command.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/commands/list_command.rb
install -c -m 0644 rubygems/commands/lock_command.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/commands/lock_command.rb
install -c -m 0644 rubygems/commands/mirror_command.rb C:/PROGRA~1/ruby-1.8/lib/
ruby/site_ruby/1.8/rubygems/commands/mirror_command.rb
install -c -m 0644 rubygems/commands/outdated_command.rb C:/PROGRA~1/ruby-1.8/li
b/ruby/site_ruby/1.8/rubygems/commands/outdated_command.rb
install -c -m 0644 rubygems/commands/pristine_command.rb C:/PROGRA~1/ruby-1.8/li
b/ruby/site_ruby/1.8/rubygems/commands/pristine_command.rb
install -c -m 0644 rubygems/commands/query_command.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/commands/query_command.rb
install -c -m 0644 rubygems/commands/rdoc_command.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/commands/rdoc_command.rb
install -c -m 0644 rubygems/commands/search_command.rb C:/PROGRA~1/ruby-1.8/lib/
ruby/site_ruby/1.8/rubygems/commands/search_command.rb
install -c -m 0644 rubygems/commands/server_command.rb C:/PROGRA~1/ruby-1.8/lib/
ruby/site_ruby/1.8/rubygems/commands/server_command.rb
install -c -m 0644 rubygems/commands/sources_command.rb C:/PROGRA~1/ruby-1.8/lib
/ruby/site_ruby/1.8/rubygems/commands/sources_command.rb
install -c -m 0644 rubygems/commands/specification_command.rb C:/PROGRA~1/ruby-1
.8/lib/ruby/site_ruby/1.8/rubygems/commands/specification_command.rb
install -c -m 0644 rubygems/commands/stale_command.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/commands/stale_command.rb
install -c -m 0644 rubygems/commands/uninstall_command.rb C:/PROGRA~1/ruby-1.8/l
ib/ruby/site_ruby/1.8/rubygems/commands/uninstall_command.rb
install -c -m 0644 rubygems/commands/unpack_command.rb C:/PROGRA~1/ruby-1.8/lib/
ruby/site_ruby/1.8/rubygems/commands/unpack_command.rb
install -c -m 0644 rubygems/commands/update_command.rb C:/PROGRA~1/ruby-1.8/lib/
ruby/site_ruby/1.8/rubygems/commands/update_command.rb
install -c -m 0644 rubygems/commands/which_command.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/commands/which_command.rb
install -c -m 0644 rubygems/command_manager.rb C:/PROGRA~1/ruby-1.8/lib/ruby/sit
e_ruby/1.8/rubygems/command_manager.rb
install -c -m 0644 rubygems/config_file.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/config_file.rb
install -c -m 0644 rubygems/custom_require.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site
_ruby/1.8/rubygems/custom_require.rb
install -c -m 0644 rubygems/defaults.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/
1.8/rubygems/defaults.rb
install -c -m 0644 rubygems/dependency.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_rub
y/1.8/rubygems/dependency.rb
install -c -m 0644 rubygems/dependency_installer.rb C:/PROGRA~1/ruby-1.8/lib/rub
y/site_ruby/1.8/rubygems/dependency_installer.rb
install -c -m 0644 rubygems/dependency_list.rb C:/PROGRA~1/ruby-1.8/lib/ruby/sit
e_ruby/1.8/rubygems/dependency_list.rb
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/digest
install -c -m 0644 rubygems/digest/digest_adapter.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/digest/digest_adapter.rb
install -c -m 0644 rubygems/digest/md5.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_rub
y/1.8/rubygems/digest/md5.rb
install -c -m 0644 rubygems/digest/sha1.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/digest/sha1.rb
install -c -m 0644 rubygems/digest/sha2.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/digest/sha2.rb
install -c -m 0644 rubygems/doc_manager.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/doc_manager.rb
install -c -m 0644 rubygems/exceptions.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_rub
y/1.8/rubygems/exceptions.rb
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/ext
install -c -m 0644 rubygems/ext/builder.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/ext/builder.rb
install -c -m 0644 rubygems/ext/configure_builder.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/ext/configure_builder.rb
install -c -m 0644 rubygems/ext/ext_conf_builder.rb C:/PROGRA~1/ruby-1.8/lib/rub
y/site_ruby/1.8/rubygems/ext/ext_conf_builder.rb
install -c -m 0644 rubygems/ext/rake_builder.rb C:/PROGRA~1/ruby-1.8/lib/ruby/si
te_ruby/1.8/rubygems/ext/rake_builder.rb
install -c -m 0644 rubygems/ext.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/r
ubygems/ext.rb
install -c -m 0644 rubygems/format.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.
8/rubygems/format.rb
install -c -m 0644 rubygems/gem_openssl.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/gem_openssl.rb
install -c -m 0644 rubygems/gem_path_searcher.rb C:/PROGRA~1/ruby-1.8/lib/ruby/s
ite_ruby/1.8/rubygems/gem_path_searcher.rb
install -c -m 0644 rubygems/gem_runner.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_rub
y/1.8/rubygems/gem_runner.rb
install -c -m 0644 rubygems/indexer.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1
.8/rubygems/indexer.rb
install -c -m 0644 rubygems/installer.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby
/1.8/rubygems/installer.rb
install -c -m 0644 rubygems/install_update_options.rb C:/PROGRA~1/ruby-1.8/lib/r
uby/site_ruby/1.8/rubygems/install_update_options.rb
install -c -m 0644 rubygems/local_remote_options.rb C:/PROGRA~1/ruby-1.8/lib/rub
y/site_ruby/1.8/rubygems/local_remote_options.rb
install -c -m 0644 rubygems/old_format.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_rub
y/1.8/rubygems/old_format.rb
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/package
install -c -m 0644 rubygems/package/f_sync_dir.rb C:/PROGRA~1/ruby-1.8/lib/ruby/
site_ruby/1.8/rubygems/package/f_sync_dir.rb
install -c -m 0644 rubygems/package/tar_header.rb C:/PROGRA~1/ruby-1.8/lib/ruby/
site_ruby/1.8/rubygems/package/tar_header.rb
install -c -m 0644 rubygems/package/tar_input.rb C:/PROGRA~1/ruby-1.8/lib/ruby/s
ite_ruby/1.8/rubygems/package/tar_input.rb
install -c -m 0644 rubygems/package/tar_output.rb C:/PROGRA~1/ruby-1.8/lib/ruby/
site_ruby/1.8/rubygems/package/tar_output.rb
mkdir -p C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader

install -c -m 0644 rubygems/package/tar_reader/entry.rb C:/PROGRA~1/ruby-1.8/lib
/ruby/site_ruby/1.8/rubygems/package/tar_reader/entry.rb
install -c -m 0644 rubygems/package/tar_reader.rb C:/PROGRA~1/ruby-1.8/lib/ruby/
site_ruby/1.8/rubygems/package/tar_reader.rb
install -c -m 0644 rubygems/package/tar_writer.rb C:/PROGRA~1/ruby-1.8/lib/ruby/
site_ruby/1.8/rubygems/package/tar_writer.rb
install -c -m 0644 rubygems/package.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1
.8/rubygems/package.rb
install -c -m 0644 rubygems/platform.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/
1.8/rubygems/platform.rb
install -c -m 0644 rubygems/remote_fetcher.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site
_ruby/1.8/rubygems/remote_fetcher.rb
install -c -m 0644 rubygems/requirement.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/requirement.rb
install -c -m 0644 rubygems/require_paths_builder.rb C:/PROGRA~1/ruby-1.8/lib/ru
by/site_ruby/1.8/rubygems/require_paths_builder.rb
install -c -m 0644 rubygems/rubygems_version.rb C:/PROGRA~1/ruby-1.8/lib/ruby/si
te_ruby/1.8/rubygems/rubygems_version.rb
install -c -m 0644 rubygems/security.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/
1.8/rubygems/security.rb
install -c -m 0644 rubygems/server.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.
8/rubygems/server.rb
install -c -m 0644 rubygems/source_index.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_r
uby/1.8/rubygems/source_index.rb
install -c -m 0644 rubygems/source_info_cache.rb C:/PROGRA~1/ruby-1.8/lib/ruby/s
ite_ruby/1.8/rubygems/source_info_cache.rb
install -c -m 0644 rubygems/source_info_cache_entry.rb C:/PROGRA~1/ruby-1.8/lib/
ruby/site_ruby/1.8/rubygems/source_info_cache_entry.rb
install -c -m 0644 rubygems/specification.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_
ruby/1.8/rubygems/specification.rb
install -c -m 0644 rubygems/spec_fetcher.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_r
uby/1.8/rubygems/spec_fetcher.rb
install -c -m 0644 rubygems/test_utilities.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site
_ruby/1.8/rubygems/test_utilities.rb
install -c -m 0644 rubygems/timer.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8
/rubygems/timer.rb
install -c -m 0644 rubygems/uninstaller.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ru
by/1.8/rubygems/uninstaller.rb
install -c -m 0644 rubygems/user_interaction.rb C:/PROGRA~1/ruby-1.8/lib/ruby/si
te_ruby/1.8/rubygems/user_interaction.rb
install -c -m 0644 rubygems/validator.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby
/1.8/rubygems/validator.rb
install -c -m 0644 rubygems/version.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1
.8/rubygems/version.rb
install -c -m 0644 rubygems/version_option.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site
_ruby/1.8/rubygems/version_option.rb
install -c -m 0644 rubygems.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/rubyg
ems.rb
install -c -m 0644 ubygems.rb C:/PROGRA~1/ruby-1.8/lib/ruby/site_ruby/1.8/ubygem
s.rb
cp gem C:/Users/wataru/AppData/Local/Temp/gem
install -c -m 0755 C:/Users/wataru/AppData/Local/Temp/gem C:/PROGRA~1/ruby-1.8/b
in/gem
rm C:/Users/wataru/AppData/Local/Temp/gem
install -c -m 0755 C:/Users/wataru/AppData/Local/Temp/gem.bat C:/PROGRA~1/ruby-1
.8/bin/gem.bat
rm C:/Users/wataru/AppData/Local/Temp/gem.bat
Removing old RubyGems RDoc and ri
rm -rf C:/PROGRA~1/ruby-1.8/lib/ruby/gems/1.8/doc/rubygems-1.2.0
Installing rubygems-1.3.1 ri into C:/PROGRA~1/ruby-1.8/lib/ruby/gems/1.8/doc/rub
ygems-1.3.1/ri
Installing rubygems-1.3.1 rdoc into C:/PROGRA~1/ruby-1.8/lib/ruby/gems/1.8/doc/r
ubygems-1.3.1/rdoc

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

= Announce: RubyGems Release 1.3.0

NOTE:  RubyGems 1.1 and 1.2 have problems upgrading when there is no
rubygems-update installed.  You will need to follow the second set of update
instructions if you see "Nothing to update".

Release 1.3.0 fixes some bugs.

Bugs fixed:

* Disregard ownership of ~ under Windows while creating ~/.gem.  Fixes
  issues related to no uid support under Windows.
* Fix requires for Gem::inflate, Gem::deflate, etc.
* Make Gem.dir respect :gemhome value from config.  (Note: this feature may be
  removed since it is hard to implement on 1.9.)
* Kernel methods are now private.  Patch #20801 by Stefan Rusterholz.
* Gem::location_of_caller now behaves on Windows.  Patch by Daniel Berger.
* Silence PATH warning.

Deprecation Notices:

* Gem::manage_gems will be removed on or after March 2009.

For a full list of changes to RubyGems and the contributor for each change, see
the ChangeLog file.

Special thanks to Chad Wooley for backwards compatibility testing and Luis
Lavena for continuing windows support.

== How can I get RubyGems?

NOTE:  If you have installed RubyGems using a package system you may want to
install a new RubyGems through the same packaging system.

If you have a recent version of RubyGems (0.8.5 or later), then all
you need to do is:

  $ gem update --system   (you might need to be admin/root)

NOTE:  RubyGems 1.1 and 1.2 have problems upgrading when there is no
rubygems-update installed.  You will need to follow the second set of update
instructions if you see "Nothing to update".

NOTE: You may have to run the command twice if you have any previosly
installed rubygems-update gems.

If you have an older version of RubyGems installed, then you can still
do it in two steps:

  $ gem install rubygems-update  (again, might need to be admin/root)
  $ update_rubygems              (... here too)

If you don't have any gems install, there is still the pre-gem
approach to getting software ... doing it manually:

1. DOWNLOAD FROM: http://rubyforge.org/frs/?group_id=126
2. UNPACK INTO A DIRECTORY AND CD THERE
3. INSTALL WITH:  ruby setup.rb  (you may need admin/root privilege)

== To File Bugs

The RubyGems bug tracker can be found on RubyForge at:
http://rubyforge.org/tracker/?func=add&group_id=126&atid=575

When filing a bug, `gem env` output will be helpful in diagnosing the issue.

If you find a bug where RubyGems crashes, please provide debug output. You can
do that with `gem --debug the_command`.

== Thanks

Keep those gems coming!

-- Jim & Chad & Eric (for the RubyGems team)


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

RubyGems installed the following executables:
        C:/PROGRA~1/ruby-1.8/bin/gem

If `gem` was installed by a previous RubyGems installation, you may need
to remove it by hand.


>gem -v
1.3.1

ようやくOKみたい。

7. トップページの確認


8. scaffoldとマイグレーションの実行

>ruby script\generate scaffold memo title:s
tring content:text
      exists  app/models/
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/memos
      exists  app/views/layouts/
      exists  test/functional/
      exists  test/unit/
      exists  public/stylesheets/
      create  app/views/memos/index.html.erb
      create  app/views/memos/show.html.erb
      create  app/views/memos/new.html.erb
      create  app/views/memos/edit.html.erb
      create  app/views/layouts/memos.html.erb
      create  public/stylesheets/scaffold.css
      create  app/controllers/memos_controller.rb
      create  test/functional/memos_controller_test.rb
      create  app/helpers/memos_helper.rb
       route  map.resources :memos
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
      create    app/models/memo.rb
      create    test/unit/memo_test.rb
      create    test/fixtures/memos.yml
      create    db/migrate
      create    db/migrate/20090222122836_create_memos.rb

>rake db:migrate
(in C:/〜/hello)
rake aborted!
unknown error

(See full trace by running task with --trace)

DLLが無いって怒られた><

DLLもってくればOKです。exeだけじゃだめみたいです。

>rake db:migrate
(in C:/〜/hello)
==  CreateMemos: migrating ====================================================
-- create_table(:memos)
   -> 0.0440s
==  CreateMemos: migrated (0.0440s) ===========================================

9. サーバー起動&動作確認

>ruby script\server
=> Booting WEBrick...
=> Rails 2.2.2 application started on http://0.0.0.0:3000
=> Ctrl-C to shutdown server; call with --help for options
[2009-02-22 21:32:08] INFO  WEBrick 1.3.1
[2009-02-22 21:32:08] INFO  ruby 1.8.7 (2008-08-11) [i386-mswin32]
[2009-02-22 21:32:08] INFO  WEBrick::HTTPServer#start: pid=5968 port=3000

ふう。OK牧場のようです。いろいろはまりポイントはあるね。