Rails3.0.8で作成したアプリを3.1.0.RC4に移行しています

検索関連のgemでエラーになったので、修正方法をメモっておきます。
will_paginate, meta_searchでエラーになりました。エラー内容はそれぞれ以下の通り。


.will_paginate

/home/User/.rvm/gems/ruby-1.9.2-p180/gems/will_paginate-2.3.15/lib/will_paginate.rb:39:in `enable_activerecord': uninitialized constant ActiveRecord::Associations::AssociationCollection (NameError)

・meta_search

Completed 500 Internal Server Error in 8ms

ArgumentError (ActiveRecord::Associations is not missing constant JoinDependency!):

修正方法はとりあえずgemが対応されるまでは、こんな感じでうまくいきました。
Gemfile

gem "meta_search", '1.1.0.pre'
gem "will_paginate", :git => 'git://github.com/wantful/will_paginate.git'

3.1.0になったのを機にHamlを使っていこうってことで設定方法です。
Gemfile

gem "haml-rails"


hamlオプションを追加してあげるとviewをHamlで生成してくれます。
(オプション追加しなくても大丈夫っぽい。)

$ rails g scaffold dog name:string --haml
      invoke  active_record
      create    db/migrate/20110617222555_create_dogs.rb
      create    app/models/dog.rb
      invoke    test_unit
      create      test/unit/dog_test.rb
      create      test/fixtures/dogs.yml
       route  resources :dogs
      invoke  scaffold_controller
      create    app/controllers/dogs_controller.rb
      invoke    haml
      create      app/views/dogs
      create      app/views/dogs/index.html.haml
      create      app/views/dogs/edit.html.haml
      create      app/views/dogs/show.html.haml
      create      app/views/dogs/new.html.haml
      create      app/views/dogs/_form.html.haml
      invoke    test_unit
      create      test/functional/dogs_controller_test.rb
      invoke    helper
      create      app/helpers/dogs_helper.rb
      invoke      test_unit
      create        test/unit/helpers/dogs_helper_test.rb
      invoke  assets
      create    app/assets/javascripts/dogs.js.coffee
      invoke    css
      create      app/assets/stylesheets/dogs.css
      invoke  css
   identical    app/assets/stylesheets/scaffold.css