我正在使用 sinatra + mongoid 对 REST 服务进行原型设计。在寻找身份验证模块时,看起来 sinatra-authentication 正在满足我的要求。我的问题是我不能让所有这些东西一起工作。我可能一起使用了错误的版本集。
我在用着:
- ruby 1.9.3(mongoid 3 需要)
- mongoid 3.0.13
- 西纳特拉 1.3.3
- 来自 git master 的 sinatra-authentication 0.4.2(因为 0.4.1 不适用于 mongoid > 3 并且 0.4.2 不能用作 gem)
- 蒙戈 1.7.1
mongoid 配置正确,因为我可以查询 mongo 并获得结果,但是当我插入 sinatra-authentication 时,我得到了错误。
有谁知道哪些版本足够新并且恰好可以一起工作?