Have you got at the bottom of your environment.rb file the line:
require ‘will_paginate’
I think this is needed because you’re using the gem version, when I believe the screencast is for the old plugin version (I’ll have to double check that, but its sounds like thats the case).
I have installed version 2.3 following the tutorial and I still face
the same issue
I had exactly the same problem, but I resolved by putting “require will_paginate” on the last line of the of the environment.rb. Before I had it in the beginning of the file, and I received the same error you did. Not sure why it has to be on the bottom of the file, maybe someone can explain.
I have been usisng will_paginate and it seems to work fine. In the
railscast episode 51 I believe the
code for the pagination was put in the model - moved from the
controller. Have you tried this?
Also I notice that on your previous post it said
that your undifined method was in your list action on line 12.
perhaps you could show more of your code and also paste your question
on the will_paginate
google group where the author of the code often helps. I am a newb so
I don't know if this will help
Best of sucess. - Owen
I found an easy solution to this problem...
Stop the WEbrick server and start it again...
Seems dumb I know, but I was using the method where you modify config/
environment.rb to include this line:
<code> config.gem 'mislav-will_paginate', :version => '~>
2.3.4', :lib => 'will_paginate', :source => 'http://gems.github.com'</
it should go right after the: <code>Rails::Initializer.run do |config|
</code> line
then you perform <code>sudo rake gems:install</code> and it installs
the gem for you. But it was giving me this error message unti I
stopped the WEbrick server and started it again.
I have installed version 2.3 following the tutorial and I still face
the same issue
I had exactly the same problem, but I resolved by putting "require
will_paginate" on the _last_ line of the of the environment.rb. Before
I
had it in the beginning of the file, and I received the same error you
did.
Not sure why it has to be on the bottom of the file, maybe someone can
explain.
Cheers,
Aaron
WoW!
Don't know why, but it works here too on mislav-will_paginate (2.3.11)