{"comment":{"created_at":"2011-10-22T05:07:04Z","body":"@mgartner: can you get your app (a simple hello world perhaps) without puffer to run first? Likely this error has been encountered by other Mongoid users.","updated_at":"2011-10-22T05:07:04Z","url":"https://api.github.com/repos/puffer/puffer/issues/comments/2488472","id":2488472,"user":{"gravatar_id":"bad65d3d7319025d73e065d7a29ee22a","avatar_url":"https://secure.gravatar.com/avatar/bad65d3d7319025d73e065d7a29ee22a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/gregwebs","id":1183,"login":"gregwebs"}},"action":"created","issue":{"number":12,"created_at":"2011-09-13T19:29:35Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I couldn't find any documentation on how to use mongoid.\r\n\r\nI added `require 'puffer/orm_adapter/mongoid'` and it started working (although I had to remove a bunch of my model fields). When I ran a search I got the following:\r\n\r\n```\r\n$where compile error\r\n\r\n2: <h1><%= @title %></h1>\r\n3: \r\n4: \r\n5: <% if records.present? %>\r\n6:   <div class=\"rui-paginator\" data-paginator=\"{total: <%= records.num_pages %>, current: <%= params[:page] || 1 %>, link: {href: '<%= resource.collection_path(:page => '%{page}') %>'}}\"></div>\r\n7: \r\n8:   <%= render :layout => 'table', :locals => {:table_fields => index_fields} do |record| %>\r\n\r\nmongo (1.3.1) lib/mongo/cursor.rb:101:in `next_document'\r\nmongo (1.3.1) lib/mongo/collection.rb:251:in `find_one'\r\nmongoid (2.2.0) lib/mongoid/collections/master.rb:25:in `block in find_one'\r\nmongoid (2.2.0) lib/mongoid/collections/retry.rb:29:in `retry_on_connection_failure'\r\nmongoid (2.2.0) lib/mongoid/collections/master.rb:24:in `find_one'\r\nmongoid (2.2.0) lib/mongoid/collection.rb:60:in `find_one'\r\nmongoid (2.2.0) lib/mongoid/contexts/mongo.rb:72:in `blank?'\r\nmongoid (2.2.0) lib/mongoid/criteria.rb:44:in `blank?'\r\nactivesupport (3.1.0) lib/active_support/core_ext/object/blank.rb:18:in `present?'\r\npuffer (0.0.29) app/views/puffer/base/index.html.erb:5:in `__home_gweber__rvm_gems_ruby_______p____gems_puffer________app_views_puffer_base_index_html_erb___2998686893773977758_47230160'\r\nactionpack (3.1.0) lib/action_view/template.rb:144:in `block in render'\r\n...\r\n```","comments":22,"title":"mongoid search error","updated_at":"2011-10-22T05:07:04Z","url":"https://api.github.com/repos/puffer/puffer/issues/12","id":1637167,"assignee":null,"milestone":null,"closed_at":"2011-10-11T22:52:56Z","user":{"gravatar_id":"bad65d3d7319025d73e065d7a29ee22a","avatar_url":"https://secure.gravatar.com/avatar/bad65d3d7319025d73e065d7a29ee22a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/gregwebs","id":1183,"login":"gregwebs"},"html_url":"https://github.com/puffer/puffer/issues/12","labels":[],"state":"closed"},"legacy":{"issue_id":1637167,"comment_id":2488472}}