开发者

How do I install will_paginate in ruby?

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 whatso开发者_开发百科ever (is that normal?) and

script/plugin list

shows it hasn't installed.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜