我在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)):
答案 0 :(得分:0)
修正:
https://github.com/datamapper/dm-rails/pull/28
你现在要么必须使用git(在你的Gemfile中)使用我的fork,要么添加一个猴子补丁来修复它。