履歴: ソフトウェア/rails/言語ネゴシエーション/開発用&テスト用環境の構築

各行は、その日時に書かれた内容です。追加・削除は、1 つ前の版との行数の差です (全 3 版)。「差分」は比較する版、「基準」は比べる相手の版を選びます

日時タイトル文字数追加削除内容差分基準
2009/6/21 12:03:38ソフトウェア/rails/言語ネゴシエーション/開発用&テスト用環境の構築 最新版1,755+2 -1表示差分—
2009/6/21 3:03:38ソフトウェア/rails/言語ネゴシエーション/開発用&テスト用環境の構築 1,647+5 -2表示差分選択
2009/6/21 3:03:04ソフトウェア/rails/言語ネゴシエーション/開発用&テスト用環境の構築 1,624— —表示中—選択

2009/6/21 3:03:04 に書かれた内容

ソフトウェア/rails/言語ネゴシエーション/開発用&テスト用環境の構築


ソフトウェア/rails/言語ネゴシエーション

negotiation という名前のアプリケーションの作成†

テスト用に negotiation という名前のアプリケーションを作成。

$ rails negotiation
$ cd negotiation

開発用サーバーの起動と環境の確認†

$ script/server &
$ wget -qO- http://localhost:3000/ | html2text
 ...
 
 ****** Welcome aboard ******
 ***** You’re riding Ruby on Rails! *****
 **** About_your_application’s_environment ****
 ...
 
$ $ ls db/*
 ls: cannot access db/*: そのようなファイルやディレクトリはありません
$ wget -qO- http://localhost:3000/rails/info/properties | html2text
 Ruby version            1.8.7 (i486-linux)
 RubyGems version        1.3.2
 Rails version           2.2.2
 Active Record version   2.2.2
 Action Pack version     2.2.2
 Active Resource version 2.2.2
 Action Mailer version   2.2.2
 Active Support version  2.2.2
 Edge Rails revision     unknown
 Application root        (rails)/negotiation
 Environment             development
 Database adapter        sqlite3
 Database schema version 0
$ ls db/*
 db/development.sqlite3

このとき自動的に sqlite3 のデータベースが作成される。

test コントローラとビューの作成†

$ script/generate controller Test
     exists  app/controllers/
     exists  app/helpers/
     create  app/views/test
     exists  test/functional/
     create  app/controllers/test_controller.rb
     create  test/functional/test_controller_test.rb
     create  app/helpers/test_helper.rb
$ echo "Test" > app/views/test/index.html.erb
$ (restart script/server)
$ wget -qO- http://localhost:3000/test
 Test

次へ 上へ