moroの日記を見て試してみる。
$ rails _1.2.6_ -v create create app/controllers (snip) $ grep ^RAILS_GEM_VERSION _1.2.6_/config/environment.rb RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
なぜー???……と思ったら、
$ type -a rails rails is aliased to `/home/nov/gems/bin/rails -d sqlite3' rails is /usr/bin/rails
としてたんだった。とりあえず
$ type -a rails rails2 rails is a function rails () { /home/nov/gems/bin/rails _1.2.6_ "$@" -d sqlite3 } rails is /usr/bin/rails rails2 is aliased to `/home/nov/gems/bin/rails _2.0.2_'
こうしておいた。2.0.2 で SQLite3 がデフォルトなので -d は必要ないのね。
$ rails -v Rails 1.2.6 $ grep ^RAILS_GEM_VERSION rails_1_2_6/config/environment.rb RAILS_GEM_VERSION = '1.2.6' unless defined? RAILS_GEM_VERSION $ grep adapter rails_1_2_6/config/database.yml | uniq adapter: sqlite3 $ rails2 -v Rails 2.0.2 $ grep ^RAILS_GEM_VERSION rails_2_0_2/config/environment.rb RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION $ grep adapter rails_2_0_2/config/database.yml | uniq adapter: sqlite3
ふむ。