1

我怎样才能让 dm-rails 与 Rails 3.2 堆栈的其余部分一起使用?

4

2 回答 2

3

DM 1.3 测试版似乎可以与 3.2.1 一起使用,至少对于演示 dm_rails 应用程序而言。

我不得不在 config/environments/development.rb 中注释掉两个“active_record”行

为了更新到 1.3 beta,我删除了我的 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/environments/development.rb以继续以旧方式重新加载模型:

config.reload_classes_only_on_change = false
于 2012-05-16T21:59:07.200 回答