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

Already on GitHub? Sign in to your account

Kaminari should not complain loudly when used with simple Sinatra apps #270

harryw opened this Issue Aug 17, 2012 · 4 comments


None yet
3 participants

harryw commented Aug 17, 2012

I want to use Kaminari for paging collections in a simple Sinatra app. If I require Kaminari while Sinatra is required, it gives me some 'useful advice' on $stderr to install Padrino gems.

I am not using Padrino; I don't want to have extra, irrelevant text written to my logs whenever the code is loaded; but I don't want to add a whole heap of Padrino framework code to my app just to avoid the extra text.

So I will redirect $stderr into the void while loading Kaminari, which is not a very elegant solution. It would be much better if the Kaminari did not presume I want to use Padrino just because I'm using Sinatra. All I really want is the .page and .per methods, because I'm using another gem that uses Kaminari for that purpose.

Personally, I don't really like the automatic inclusion of helpers for a particular framework just because that framework happens to be in use. I would not expect Sinatra helpers to be loaded unless the client code requires 'kaminari/sinatra' or similar. Similarly I would not expect Rails helpers to be loaded unless the client code requires 'kaminari/railties' or similar. The fact that the helpers are there is great, but as a client of this gem I would like to be in control of how much extra code I'm loading.



plribeiro3000 commented Aug 17, 2012

Which version are you using? Try to use the github version if is not the case.

harryw commented Aug 17, 2012

Ah, it's fixed in master! Thanks. So there is 6 months of work in master without a new gem version! That seems like a lot for a gem with a version < 1. I see master hasn't changed in 2 months either - how about releasing a new gem version - maybe even a v1.0 :o)

I will use the master branch for now, though. Thanks for the tip @plribeiro3000!


plribeiro3000 commented Aug 17, 2012

Just Bump it: #248



yuki24 commented Dec 19, 2012

Sorry for the late response and thank you guys for reporting/supporting! I'm closing this issue since this is alread solved.

@yuki24 yuki24 closed this Dec 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment