Rails 2.3.2 の Application Templates

Rails 2.3.2 の template_runner.rb railties/lib/rails_generator/generators/applications/app/template_runner.rb at 39ff550fa88da9a22d8c21ca872f5e4d0d83f8d4 from rails's rails - GitHub

OpenID Authentication

いますぐ使えるOpenID:第4回 Railsで作るOpenID対応アプリケーション実践(前編)|gihyo.jp $ rails openid_test $ cd openid_test/$ script/plugin install git://github.com/rails/open_id_authentication.git $ rake open_id_authentication:db:create$…

ActiveRecord Validation, Callback, Observer

Active Record Validations and Callbacks - Ruby on Rails guides trigger validations create create! save save! update update_attributes update_attributes! skip validations save(false) update_all update_attribute update_counters decrement! de…

croc インストールしたgemのドキュメントをブラウザでインクリメンタル検索

install $ gem install croc Successfully installed croc-1.0.0 1 gem installed Installing ri documentation for croc-1.0.0... Installing RDoc documentation for croc-1.0.0... $ croc /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in …

Cygwin + Rails + SQLite3

Cygwin Ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin] SQLite3 3.6.2 RubyGems 1.3.1 Ruby on Rails 2.2.2 sqlite3-ruby 1.2.4 RSpec 1.1.12 RSpec on Rails 1.1.12 rcov 0.8.1.2.0 ZenTest 4.0.0 Cygwin [Devel]-[cygport] [Devel]-[gcc] [Interpre…

メール設定をYAMLファイルから読み込む

Typo 5.2 (MIT-LICENSE) config/environment.rb if RAILS_ENV != 'test' begin mail_settings = YAML.load(File.read("#{RAILS_ROOT}/config/mail.yml")) ActionMailer::Base.delivery_method = mail_settings['method'] ActionMailer::Base.server_settings…

RSpec + RSpec on Rails

関連 http://d.hatena.ne.jp/mpen/20090318/p1 install gem install rspec gem install rspec-railsrspec と rspec-rails は同じバージョンであること 使い方 rails rspec_test cd rspec_test ruby script/generate rspec ruby script/generate rspec_model …

WindowsでSQLite 3のインストール

sqlite3-ruby http://rubyforge.org/frs/shownotes.php?release_id=25302 1.2.4のWindows用はないので、1.2.3を使用する gem list sqlite3-ruby --remote --all gem install sqlite3-ruby --version 1.2.3 --remote SQLite3 http://www.sqlite.org/download.…

Rails 2.2 の国際化

Controller flash[:notice] = I18n.t( :updated_success, :default => '{{model}} was successfully updated.', :model => Blog.human_name, :scope => [:railties, :scaffold] ) I18n.t 'date.formats.short' I18n.t 'short', :scope => 'date.formats' Vie…

Git

git

初期設定 $ git config --global user.name "XXXX" $ git config --global user.email XXX@example.com $ git config --global core.editor "'/cygdrive/d/XXX/XXX.exe' -CODE=4" $ git config --global color.diff auto $ git config --global color.status…

restful-authentication と aasm のインストールと設定

使用環境 OS Windows XP Ruby 1.8.6 mswin32 Ruby on Rails 2.2.2 MySQL Community Server 5.0.77 NetBeans 6.5 Mongrel 1.1.5 aasm のインストール gem sources -a http://gems.github.comgem install rubyist-aasm Git(MinGW版)のインストール インストー…

config/routes.rb

使用環境 Ruby on Rails 2.2.2 map.root map.root :controller => 'users' root / {:action=>"index", :controller=>"users"} map.connect map.connect 'articles/:year/:month/:day', :controller => 'articles', :action => 'find_by_date', :year => /\d{…

config/routes.rb : map.resources

使用環境 Ruby on Rails 2.2.2 map.resources map.resources :coms .:format は省略 coms GET /coms {:action=>"index", :controller=>"coms"} POST /coms {:action=>"create", :controller=>"coms"} new_com GET /coms/new {:action=>"new", :controller=>"…

Ruby on Rails 2.0入門:Flickerベースのアプリケーションの作成

http://japan.internet.com/developer/20080606/26.html 使用環境 Ruby 1.8.6 mswin32 Ruby on Rails 2.2.2 MySQL Community Server 5.0.77 NetBeans 6.5 Mongrel 1.1.5 respond_to scaffold respond_to do |format| format.html # index.html.erb format.xm…

Ruby on Rails のチュートリアル

Ruby on Rails チュートリアル集 http://diaspar.jp/node/81 NetBeans6.1によるRuby on Rails開発環境構築手順書 http://codezine.jp/article/detail/2578 http://d.hatena.ne.jp/mpen/20090224/p1 Ruby のブログを 10 分で作成 http://www.netbeans.org/kb/…

NetBeans6.1によるRuby on Rails開発環境構築手順書

http://codezine.jp/article/detail/2578 使用環境 Ruby 1.8.6 mswin32 Ruby on Rails 2.2.2 MySQL Community Server 5.0.77 NetBeans 6.5 Mongrel 1.1.5 page3 データベースの作成 database.yml に3つある password:にパスワードを入れる page4 Webサーバの…

gemファイルの依存関係を調べる

RubyGems で Ruby on Rails 2.2.2 の依存関係をリモートで調べる gem dependency rails --version 2.2.2 --remote Gem rails-2.2.2 rake (>= 0.8.3, runtime) activesupport (= 2.2.2, runtime) activerecord (= 2.2.2, runtime) actionpack (= 2.2.2, runti…

Ruby on Rails のローカルインストール

リモートインストールできない Windows XP のパソコンに Ruby on Rails をローカルインストールする 構築する環境 Ruby 1.8.6 mswin32 Ruby on Rails 2.2.2 MySQL Community Server 5.0.77 MySQL GUI Tools 5.0-r16 1 ファイルのダウンロード 1.1 Ruby One-C…