開発用&テスト用環境の構築 の履歴(No.2)
更新negotiation という名前のアプリケーションの作成†
テスト用に negotiation という名前のアプリケーションを作成。
LANG:console $ rails negotiation $ cd negotiation
開発用サーバーの起動と環境の確認†
LANG:console $ 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 コントローラとビューの作成†
LANG:console $ 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
Counter: 4705 (from 2010/06/03),
today: 1,
yesterday: 0