views:

192

answers:

1

I'm trying to install will paginate.

I installed the gem, as detailed on the github page. The gem installed OK, but when I tried a line like

@user = User.paginate

I just got an error message about the paginate method not existing.

So, I uninstalled the gem and tried using the plugin method:

script/plugin install svn://errtheblog.com/svn/plugins/will_paginate

But the above command gives no feedback whatsoever (is that normal?) and

script/plugin list

shows it hasn't installed.

+3  A: 

Did you add a config.gem line to environment.rb to load the gem?

config.gem 'mislav-will_paginate',
  :version => '~> 2.3.11',
  :lib => 'will_paginate',
  :source => 'http://gems.github.com'

And run rake gems:install?

Works for me.

Jeff Paquette
Thanks. (How did i not see the install instructions? Doh).
Mike Sutton
Side note: if you are sharing the codebase with anyone else, it might be helpful to also run `rake gems:unpack`. This will drop the code into your *vendors* directory and let you commit it.
jerhinesmith
That also helps quite a bit with deployment issues on shared hosts. However, I don't think this handles gems with platform-specific binary components as of yet (think mysql gem, rmagick et al)
Jeff Paquette