1

我在 session_store.rb 中有以下内容。我正在运行 Ruby 1.8.7 和 rails 3.1.0.rc4

require 'dm-rails/session_store'
ActionDispatch::Session::DataMapperStore = Rails::DataMapper::SessionStore
Contendable::Application.config.session_store :data_mapper_store

向服务器发出请求时,我得到以下输出:

[2011-10-19 22:07:14] INFO  WEBrick 1.3.1
[2011-10-19 22:07:14] INFO  ruby 1.8.7 (2011-06-30) [i686-darwin10.7.4]
[2011-10-19 22:07:14] INFO  WEBrick::HTTPServer#start: pid=24805 port=3000


Started GET "/" for 127.0.0.1 at Wed Oct 19 22:07:27 -0700 2011
  SQL (21.975ms)  SELECT "id", "session_id", "data", "updated_at" FROM "sessions" WHERE "session_id" = '7ecd5903df96a6d26cbbc69e6d397ce9' ORDER BY "id" LIMIT 1

ArgumentError (wrong number of arguments (4 for 3)):
4

1 回答 1

0

固定的:

https://github.com/datamapper/dm-rails/pull/28

你要么现在必须使用我的 git fork(在你的 Gemfile 中),要么添加一个猴子补丁来修复它。

于 2011-10-20T07:23:33.620 回答