C:\work> ruby -v
ruby 1.8.5 (2006-12-25 patchlevel 12) [i386-mswin32]
C:\work> unzip rubygems-0.9.4.zip (rubygems-0.9.4.zipを展開する)
C:\work> cd rubygems-0.9.4
C:\work\rubygems-0.9.4> ruby setup.rb
C:\work\rubygems-0.9.4> cd ..
C:\work> gem --version
0.9.4
C:\work> gem install rails --include-dependencies
C:\work> rails --version
Rails 1.2.3
C:\work> gem list --remote sqlite
*** REMOTE GEMS ***
Need to update 20 gems from http://gems.rubyforge.org
....................
complete
sqlite (2.0.1, 2.0.0, 1.3.1, 1.3.0, 1.2.9.1, 1.2.0, 1.1.3, 1.1.2, 1.1.1, 1.1)
SQLite/Ruby is a module to allow Ruby scripts to interface with a
SQLite database. VERSIONS >=2.0.0 ARE BETA RELEASES. THEY ARE
INTENDED FOR TESTING ONLY, AND SHOULD NOT BE CONSIDERED
PRODUCTION-WORTHY YET.
sqlite-ruby (2.2.3, 2.2.2, 2.2.1, 2.2.0, 2.1.0, 2.0.3, 2.0.2)
SQLite/Ruby is a module to allow Ruby scripts to interface with a
SQLite database.
sqlite3-ruby (1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0.0, 0.9.0, 0.6.0, 0.5.0)
SQLite3/Ruby is a module to allow Ruby scripts to interface with a
SQLite database.
C:\work> gem install sqlite3-ruby
Select which gem to install for your platform (i386-mswin32)
1. sqlite3-ruby 1.2.1 (mswin32)
2. sqlite3-ruby 1.2.1 (ruby)
3. sqlite3-ruby 1.2.0 (mswin32)
4. sqlite3-ruby 1.2.0 (ruby)
5. Skip this gem
6. Cancel installation
> 1
Successfully installed sqlite3-ruby-1.2.1-mswin32
Installing ri documentation for sqlite3-ruby-1.2.1-mswin32...
Installing RDoc documentation for sqlite3-ruby-1.2.1-mswin32...
C:\work> cd sqlite
C:\work\sqlite> unzip sqlite-3_3_17.zip (sqlite-3_3_17.zipを展開する)
C:\work\sqlite> xcopy sqlite3.exe C:\ruby\bin
C:\work\sqlite> cd ..
C:\work> sqlite3
SQLite version 3.3.17
Enter ".help" for instructions
sqlite> .quit
C:\work> cd sqlite
C:\work\sqlite> unzip sqlitedll-3_3_17.zip (sqlitedll-3_3_17.zipを展開する)
C:\work\sqlite> xcopy sqlite3.dll C:\ruby\bin
C:\work\sqlite> xcopy sqlite3.def C:\ruby\bin
C:\work\sqlite> cd ..
C:\work> rails --help
C:\work> rails --database=sqlite3 sample
C:\work> cd sample
C:\work\sample> (db\create.sqlを作成する)
C:\work\sample> type db\create.sql
DROP TABLE IF EXISTS cards;
CREATE TABLE cards (
id AUTO_INCREMENT,
title VARCHAR(256),
content TEXT,
PRIMARY KEY (id)
);
C:\work\sample> sqlite3 db\development.sqlite3 < db\create.sql
C:\work\sample> ruby script\generate scaffold Card Admin
C:\work\sample> ruby script\server