will_paginate resulting in server 500 error...

7 views
Skip to first unread message

RubyonRails_newbie

unread,
Jan 1, 2010, 1:43:51 PM1/1/10
to Ruby on Rails: Talk
Hello there,

On my site I have a basic search form that uses find_by_ferret which
will return users within the site and render the data that matches the
search criteria

If multiple rows are returned, the rows are rendered, and then
paginated, if more that X are returned. Sounds simple, (and worked
fine in dev)

However, In Production, I get a server(500) error: (We're sorry, but
something went wrong.

We've been notified about this issue and we'll take a look at it
shortly.)

When I look in the production.log the following is returned:

ActionView::TemplateError (undefined method `will_paginate' for
#<ActionView::Base:0xb5c6dc24>) on line #26 of app/views/buddies/
_search_form.rhtml:
23:
24: Your search results are below: <br /> <br />
25:
26: <%= will_paginate @buddies %>
27: <% end %>
28: <%= render :partial=>"result_summary" %>
29: <% end %>


although I understand the error, I dont get how it worked in dev, and
not in prod...

Any ideas?

Many, many Thanks

Frederick Cheung

unread,
Jan 1, 2010, 5:48:14 PM1/1/10
to Ruby on Rails: Talk

On Jan 1, 6:43 pm, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:


> When I look in the production.log the following is returned:
>
> ActionView::TemplateError (undefined method `will_paginate' for
> #<ActionView::Base:0xb5c6dc24>) on line #26 of app/views/buddies/
> _search_form.rhtml:
> 23:
> 24: Your search results are below: <br /> <br />
> 25:
> 26: <%= will_paginate @buddies %>
> 27: <% end %>
> 28: <%= render :partial=>"result_summary" %>
> 29: <% end %>
>
> although I understand the error, I dont get how it worked in dev, and
> not in prod...
>

Sounds like you didn't install the will_paginate gem on your
production machine

Fred

RubyonRails_newbie

unread,
Jan 2, 2010, 6:15:02 AM1/2/10
to Ruby on Rails: Talk
I think will_paginate is installed.. should I be checking this in gem
list --remote ?

Presumably installed at root level too?

Id best take another peek...

Thanks for the response...

On Jan 1, 10:48 pm, Frederick Cheung <frederick.che...@gmail.com>
wrote:

Frederick Cheung

unread,
Jan 2, 2010, 8:16:46 AM1/2/10
to Ruby on Rails: Talk

On Jan 2, 11:15 am, RubyonRails_newbie <craigwest...@googlemail.com>
wrote:


> I think will_paginate is installed.. should I be checking this in gem
> list --remote ?

--remote means it searches for gems on the gem servers - not relevant
here.


>
> Presumably installed at root level too?

What do you mean by root?

Fred

RubyonRails_newbie

unread,
Jan 2, 2010, 10:53:12 AM1/2/10
to Ruby on Rails: Talk
> What do you mean by root?

When i log onto my vhost, there is a root folder.

Should it be installed here, or actually where my app resides?

May be a daft question - sorry! :-)

Peter De Berdt

unread,
Jan 2, 2010, 11:04:18 AM1/2/10
to rubyonra...@googlegroups.com

On 02 Jan 2010, at 16:53, RubyonRails_newbie wrote:

What do you mean by root?

When i log onto my vhost, there is a root folder.

Should it be installed here, or actually where my app resides?

May be a daft question - sorry! :-)

Instead of messing around, just freeze all the gems and even rails itself in the app and upload that to your host. It's quite obvious you are using shared hosting and you won't have root access (or even local folder ssh access) to the server.

rake gems:unpack:dependencies
rake rails:freeze:gems


Best regards


Peter De Berdt


Reply all
Reply to author
Forward
0 new messages