运行gem install mongo3
后运行mongo3。我遇到了以下问题
F, [2013-05-08T20:35:18.376873 #8487] FATAL -- : undefined method `helpers' for CollectionHelper:Module (NoMethodError)
/Users/shuxuan/.rvm/gems/ruby-1.9.3-p392@rails3tutorial2ndEd/gems/mongo3-0.1.5/lib/helpers/collection_helper.rb:15:in `<module:CollectionHelper>'
/Users/shuxuan/.rvm/gems/ruby-1.9.3-p392@rails3tutorial2ndEd/gems/mongo3-0.1.5/lib/helpers/collection_helper.rb:14:in `<top (required)>'
/Users/shuxuan/.rvm/gems/ruby-1.9.3-p392@rails3tutorial2ndEd/gems/mongo3-0.1.5/lib/mongo3.rb:49:in `load'
答案 0 :(得分:0)
现在的解决方法(来自github讨论)是使用较旧的sinatra。
gem uninstall sinatra
gem install sinatra -v 1.3.3