amatsuda/kaminari — Issue #211: undefined method 'page'  for #<ActiveRecord::Relation> by using "kaminari" as dependency.
Author: ktkaushik
Created: 2012-02-27 06:46:11+00:00
State: open

Hi, i am building a gem with some interface and i using kaminari as a dependency gem.
In my ***gemfile.gemspec***, i have (minus the author , version and summary)::

```
Gem::Specification.new do |s|

#s.required_rubygems_version = "> 1.3.6"

s.add_dependency "rails" , ">=3.1.0"
s.add_dependency "kaminari" , ">0.12.4"

s.files = Dir["{app,lib,config,vendor,public}/**/*"] + ["Rakefile", "Gemfile", "README.rdoc"]
s.require_path = 'lib'
```

Now, whenever i use `.page(params[:page])` in the controller inside the gem, i get the above error.

If i run `bundle show kaminari` in the gem project and the app(where i am trying out the gem) i can see kaminari is being installed. That means `kaminari` is getting loaded but not working on an active record relation ::

```
@products = Product.order('created_at DESC').page(params[:page])
```