InstantRailsをRails 2.0.2にする
メモ。
まっさらな状態で試したわけではないので、この通りにやって確実に成功するかは微妙(何か足りないかも)。また、時代はsqlite3らしいので、MySQLではなくsqlite3を使う方法で。
- InstantRailsのRailsのバージョンをあげる
$ gem update --system $ gem install rails
gem install rails は gem update rails でもいいはず。
- sqlite3をインストールする
http://www.sqlite.org/download.html よりsqlitedll-3_5_4.zipをダウンロードし、展開して、ruby\bin\ ディレクトリに置く。
2007/12/23追記: Railsで実行するだけならこれでいいですが、コマンドラインも使いたいのでsqlite3.exeも持ってきましょう。上記URLからsqlite-3_5_4.zipもダウンロード&展開して、ruby\bin\ ディレクトリに置くと使えるようになります。
- sqlite3-rubyをインストールする
$ gem install sqlite3-ruby
- railsコマンドを実行
C:\InstantRails-2.0pr\rails_apps>rails rails202sample1 create create app/controllers create app/helpers create app/models create app/views/layouts create config/environments create config/initializers 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/mocks/development create test/mocks/test 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 config/database.yml create config/routes.rb create public/.htaccess create config/initializers/inflections.rb create config/initializers/mime_types.rb 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/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
- ディレクトリを移動してscript/serverを起動
C:\InstantRails-2.0pr\rails_apps>cd rails202sample1 C:\InstantRails-2.0pr\rails_apps\rails202sample1>ruby script\server => Booting Mongrel (use 'script/server webrick' to force WEBrick) => Rails application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Signals ready. INT => stop (no restart). ** Mongrel available at 0.0.0.0:3000 ** Use CTRL-C to stop.
結果は↓こんな感じ。
とりあえず今日はここまで。