Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't install with rails 3.0.4 #5

Open
brodock opened this issue Feb 23, 2011 · 3 comments
Open

Doesn't install with rails 3.0.4 #5

brodock opened this issue Feb 23, 2011 · 3 comments

Comments

@brodock
Copy link

brodock commented Feb 23, 2011

Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
rails (= 3.0.4) depends on
activesupport (= 3.0.4)

pox_paginate (~> 0.2.1) depends on
  activesupport (3.0.3)
@kaiwren
Copy link
Member

kaiwren commented Feb 23, 2011

Could you try that with
gem 'pox_paginate', '> 0.2.2'
instead of
gem 'pox_paginate', '
> 0.2.1'

0.2.2 is set up to work with all Rails 3.0.x. Let me know if that fixes it for you.

@brodock
Copy link
Author

brodock commented Feb 23, 2011

This seens to work... but pox looks like not working correctly.

I've started to debug it and it looks likes total_pages is not retrived correctly

While trying to see a normal "index crud" page, that has a <%= will_paginate @noticias %> I get:

undefined method `<' for nil:NilClass

Looking at the stacktrace I get:

activesupport (3.0.4) lib/active_support/whiny_nil.rb:48:in `method_missing'
/Users/brodock/.rvm/gems/ruby-1.9.2-p0/bundler/gems/will_paginate-b1a5beeec9f5/lib/will_paginate/view_helpers/base.rb:110:in `page_entries_info'
/Users/brodock/.rvm/gems/ruby-1.9.2-p0/bundler/gems/will_paginate-b1a5beeec9f5/lib/will_paginate/view_helpers/action_view.rb:40:in `page_entries_info'
app/views/noticias/index.html.erb:26:in `_app_views_noticias_index_html_erb___634210951152283626_2162848200__128685990689779746'
...

Which leads to the total_pages from will_paginate collection being returned as a NilClass

Any idea?

I tried with Will_Paginate 3.0pre2, 3.0beta and git version using rails3 branch. None of them worked.

I'm also using InheritedResource, and adapted the instructions to work fine with it:

class NoticiasController < InheritedResources::Base
  protected
    def collection
      @noticias ||= end_of_association_chain.paginate(:page => params[:page], :per_page => params[:per_page])
    end
end

@preethiramdev
Copy link

I created a sample application and on looking at the "index crud page" I find that the "total entries" returned matches up with the total number of entities created . So it would seem that pox is working fine. You can look at my sample app at
git://gist.github.com/858431.git and perhaps give me more details so I can understand if I have replicated the bug correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants