Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

undefined method `paginate' for #<Class:0x007fd706a76040> #327

Closed
lajlev opened this Issue · 4 comments

3 participants

@lajlev

Getting this error http://i.laj.lv/image/25081q1O1q3C

Here is my code snippets

# GEMFILE
gem 'will_paginate', '~> 3.0'

# user_controller.rb
def index
  @users = User.paginate(:page => params[:page])
end

# index.html.erb
<%= will_paginate @users %>
@mislav
Owner

I presume User is an Active Record model? This indicates that will_paginate hasn't properly loaded in the app. Have you restarted the Rails server since you've added will_paginate to the Gemfile? Does your config/application.rb contain something similar to this line:

Bundler.require(:default)
@lajlev lajlev closed this
@mislav
Owner

It was probably an issue of forgetting to restart the app after Gemfile change.

@lajlev

Yes sorry noob mistake :smile:

I forgot something it's nessesary to do touch tmp/restart.txt when using pow.cx.

@hunghuuchinh

closed your server ,and turn on again .good luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.