padrino/padrino-recipes — pull request #35 by wokibe (2012-10-12 13:11:14+00:00)
Title: again will_paginate plugin corrections (issue #34)

No one is assigned
Sometimes I run into the situation, that my corrections for issue #33 generate at padrino start the error: "uninitialized constant WillPaginate::Sinatra".

I could not pin down the cause for this behavior, but some experiments (with the help of an old will_paginate issue mislav/will_paginate#149) delivered a solution:

I had to move the three will_paginate requires in boot.rb into the Padrion.before_load block.

I will submit an pull request with this change, plus the missing addition to the Gemfile:
inject_into_file destination_root('Gemfile'),
"gem 'will_paginate', '~>3.0'\n",
:after => "Component requirements\n"

best regards
Wolfkibe