2008-03-31から1日間の記事一覧
http://shokai.mag.keio.ac.jp/shiritori/migrate class CreateWords < ActiveRecord::Migration def self.up create_table :words do |t| t.text :item t.timestamps end end def self.down drop_table :words end end word model class Word < ActiveRecor…
MongrelでRailsをデプロイ - shokaiの日記の続きの状態で、mongrelが4000~4004番portで起動している状態から。http://shokai.mag.keio.ac.jp/は普通のapacheのDocumentRoot以下で見せておいて、 http://shokai.mag.keio.ac.jp/shiritori/以下だけをmongrelで…
rubyneko - 誰でも30秒ぐらいでできるrailsのデプロイ mongrel_rails cluster::configure Writing configuration file to config/mongrel_cluster.yml.config/mongrel_cluster.yml log_file: log/mongrel.log port: 4000 pid_file: tmp/pids/mongrel.pid ser…
sudo gem install rspec1.1.3が入った ./script/plugin install http://rspec.rubyforge.org/svn/tags/REL_1_1_3/rspec/ ./script/plugin install http://rspec.rubyforge.org/svn/tags/REL_1_1_3/rspec_on_rails./script/generate rspec ./script/generate …
rails mashalbum cd mashalbum ./script/generate scaffold photo ./script/generate scaffold album rake db:migrate VERSION=001 db/migrate/001_create_photos.rb class CreatePhotos < ActiveRecord::Migration def self.up create_table :photos do |t|…