simonszu
simonszu

Reputation: 376

Sinatra with Kaminari: cannot load such file -- kaminari/sinatra

I want to realize pagination in Sinatra with kaminari. My Gemfile looks like this:

source "https://rubygems.org"
gem "sinatra"
gem "activerecord", :require => "active_record"
gem "mysql2"
gem "padrino-helpers"
gem "kaminari", :require => "kaminari/sinatra"

my Sinatra config.ru has a Bundler.require.

However, Passenger displays the following error: cannot load such file -- kaminari/sinatra

I don't know what's wrong. There is not much documentation about kaminari with Sinatra, and the only bit i found was: "You need padrino-helpers and require kaminari/sinatra". And that's what i did.

Upvotes: 1

Views: 1054

Answers (1)

Zachary Friedman
Zachary Friedman

Reputation: 109

Sinatra (~> 1.4.0) depends on rack (1.5.2), while kaminari (~> 0.13.0) depends on rack (~> 1.2.1). And since kaminari only began experimental support for Sinatra since version 0.13.0, there appears to be an impasse.

Upvotes: 0

Related Questions