bootstrap-ruby / will_paginate-bootstrap

Integrates the Twitter Bootstrap pagination component with will_paginate
MIT License
388 stars 160 forks source link

only require sinatra if actionview isn't defined #19

Closed barelyknown closed 11 years ago

barelyknown commented 11 years ago

I'm not sure if others have had this problem, but the gem was failing to load in a rails 4 project because the constant Sinatra was defined (I didn't look where). I don't know if there's ever a case where you'd want to require both the action_view and sinatra files, so I just switched it to require sinatra only if ActionView isn't defined.

JanStevens commented 11 years ago

How did you fix this issue?

EDIT: ha nvm, using your forked repository now, thanks!

nickpad commented 11 years ago

Could you let me know the exact error and backtrace you’re getting? In theory the Rails and Sinatra pagination components should be able to co-exist. And I’m unable to re-create the problem with a fresh Rails 4 app.

Thanks!

barelyknown commented 11 years ago

I just switched back to your master branch to get the backtrace but I can't reproduce it now. This was long enough ago that I'm not really sure why the error happened. I'll run with your repo now and report an issue if I see it again.