1

dm-railsを残りのRails3.2スタックとうまく連携させるにはどうすればよいですか?

4

2 に答える 2

3

DM 1.3ベータ版は、少なくともデモdm_railsアプリでは3.2.1で動作するようです。

config / environment/development.rbの2つの「active_record」行をコメントアウトする必要がありました

1.3ベータ版に更新するために、Gemfile.lockファイルを削除し、各dm gemのgitリポジトリを指定して(以下)、バンドルインストールを実行しました。

gem 'dm-core', git: 'https://github.com/datamapper/dm-core'
gem 'dm-active_model', git: 'https://github.com/datamapper/dm-active_model.git'
gem 'dm-validations', git: 'https://github.com/datamapper/dm-validations.git'
gem 'dm-rails', git: 'https://github.com/datamapper/dm-rails.git'
gem 'dm-migrations', git: 'https://github.com/datamapper/dm-migrations'
gem 'dm-types', git: 'https://github.com/datamapper/dm-types'
gem 'dm-constraints', git: 'https://github.com/datamapper/dm-constraints'
gem 'dm-transactions', git: 'https://github.com/datamapper/dm-transactions'
gem 'dm-aggregates', git: 'https://github.com/datamapper/dm-aggregates'
gem 'dm-timestamps', git: 'https://github.com/datamapper/dm-timestamps'
gem 'dm-observer', git: 'https://github.com/datamapper/dm-observer'


gem 'dm-do-adapter', git: 'https://github.com/datamapper/dm-do-adapter'
gem 'dm-sqlite-adapter', git: 'https://github.com/datamapper/dm-sqlite-adapter'

その後、サンプルプロジェクトは正常に機能しました。

于 2012-02-02T13:36:51.753 に答える
0

DataMapper 1.3がActiveReloadをサポートする準備ができるまで、config / environment / development.rbに以下を追加して、古い方法でモデルをリロードし続けることができます。

config.reload_classes_only_on_change = false
于 2012-05-16T21:59:07.200 に答える