Hi, So I''m using @post_pages, @posts = paginate :posts, :per_page => 10 to paginate. But I have rails 2.0.2 on my VPS. Now this version of paginate throws an error. What happened to classic pagination and what is done now? Thanks, Ron --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ron wrote:> Hi, > > So I''m using @post_pages, @posts = paginate :posts, :per_page => 10 > to paginate. > > But I have rails 2.0.2 on my VPS. Now this version of paginate throws > an error. What happened to classic pagination and what is done now?Became a plugin called: classic_pagination -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi James, Thanks...but I tried that. I did: sudo ruby plugin install svn://errtheblog.com/svn/plugins/ Now I''m getting: /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:478:in `const_missing'': uninitialized constant Rails::Plugin::Err (NameError) from /home/ron/ic/vendor/plugins/plugins/acts_as_cached/init.rb:2:in `evaluate_init_rb'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb: 79:in `evaluate_init_rb'' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb: 75:in `evaluate_init_rb'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb: 39:in `load'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/ loader.rb:33:in `load_plugins'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/ loader.rb:32:in `load_plugins'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb: 189:in `load_plugins'' ... 22 levels... from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ active_support/dependencies.rb:496:in `require'' from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb: 39 from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'' from script/server:3 Now that I look at it, maybe I didn''t specify the whole path. It seems to have installed 3 or 4 plugins. Not sure how I would uninstall them and just install the classic_pagination plugin. One of them must be incompatible with 2.0.2 Ron On Mar 30, 7:57 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Ron wrote: > > Hi, > > > So I''m using @post_pages, @posts = paginate :posts, :per_page => 10 > > to paginate. > > > But I have rails 2.0.2 on my VPS. Now this version of paginate throws > > an error. What happened to classic pagination and what is done now? > > Became a plugin called: classic_pagination > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Why don''t you use will_paginate plugin. On Mar 31, 8:20 am, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi James, > > Thanks...but I tried that. I did: > sudo ruby plugin install svn://errtheblog.com/svn/plugins/ > > Now I''m getting: > > /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ > dependencies.rb:478:in `const_missing'': uninitialized constant > Rails::Plugin::Err (NameError) > from /home/ron/ic/vendor/plugins/plugins/acts_as_cached/init.rb:2:in > `evaluate_init_rb'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb: > 79:in `evaluate_init_rb'' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb: > 75:in `evaluate_init_rb'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin.rb: > 39:in `load'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/ > loader.rb:33:in `load_plugins'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/rails/plugin/ > loader.rb:32:in `load_plugins'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb: > 189:in `load_plugins'' > ... 22 levels... > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:496:in `require'' > from /usr/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb: > 39 > from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require'' > from script/server:3 > > Now that I look at it, maybe I didn''t specify the whole path. It > seems to have installed 3 or 4 plugins. Not sure how I would > uninstall them and just install the classic_pagination plugin. One of > them must be incompatible with 2.0.2 > > Ron > > On Mar 30, 7:57 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > Ron wrote: > > > Hi, > > > > So I''m using @post_pages, @posts = paginate :posts, :per_page => 10 > > > to paginate. > > > > But I have rails 2.0.2 on my VPS. Now this version of paginate throws > > > an error. What happened to classic pagination and what is done now? > > > Became a plugin called: classic_pagination > > > -- > > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
will_peginate is cool. but if you are converting ur app to rails 2.x you may need to look classic_pegination. On Mar 31, 7:52 am, Ron <stecklyena...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > So I''m using @post_pages, @posts = paginate :posts, :per_page => 10 > to paginate. > > But I have rails 2.0.2 on my VPS. Now this version of paginate throws > an error. What happened to classic pagination and what is done now? > > Thanks, > > Ron--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I found that converting to will_paginate to be so easy it confused me. I was looking for more work to do and didn''t realize I was done. There''s a railscast on it somewhere. F --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
will_paginate rocks. As for removing the plugin, just remove the plugin from the vendor/plugins directory. That should do the trick. I''ve used both and they work well. Serge On Mar 31, 9:07 am, fredistic <fredis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I found that converting to will_paginate to be so easy it confused > me. I was looking for more work to do and didn''t realize I was done. > There''s a railscast on it somewhere. > > F--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I have, I think, gotten the gem. The files "will_paginate" and "will_paginate.rb" exist in my vendor/plugins/will_paginate directory. I still get the "undefined method ''paginate''" message when I try to load the page that''s supposed to use it. Another posting somewhere else said I needed to add "require ''will_paginate''" to my environment.rb, and I did that, with no change in the result. I''m not sure if it should be necessary, but I am restarting the server every time I make a change. All I''m really trying to do is use AWDWR to learn about Rails, and I wasn''t bright enough to install the downrev Rails (the previous layer of the onion was "scaffold"). If uninstalling 2.0.2, and installing 1.something (what a pain) really is the only way to use AWDWR, I guess I can, but this makes the whole business look pretty fragile, which I thought was one of the main things RoR was *not* supposed to be. On Mar 31, 8:07 am, fredistic <fredis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I found that converting to will_paginate to be so easy it confused > me. I was looking for more work to do and didn''t realize I was done. > There''s a railscast on it somewhere. > > F--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Another vote for will_paginate... get_order and get_filter are application helpers in my app, and I keep a short list of user preferences (like their current filter, and current sort preferences) in the session... def index order = get_order(''projectview'', ''proj_name'') cond = get_filter(''project'', ''scenario'') # retrieve the data @projectviews = Projectview.paginate :page => params[:page], :per_page => session[:userpref].page_len, :order => order, :conditions => cond respond_to do |format| format.html format.xml { render :xml => @projectviews } end end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 9 Apr 2008, at 00:49, Fingal wrote:> > I have, I think, gotten the gem. The files "will_paginate" and > "will_paginate.rb" exist in my vendor/plugins/will_paginate > directory. I still get the "undefined method ''paginate''" message when > I try to load the page that''s supposed to use it. Another posting > somewhere else said I needed to add "require ''will_paginate''" to my > environment.rb, and I did that, with no change in the result. I''m not > sure if it should be necessary, but I am restarting the server every > time I make a change.will_paginate is great but is not a drop-in replacement for what was in rails 1.2 (classic_pagination does that)> > All I''m really trying to do is use AWDWR to learn about Rails, and I > wasn''t bright enough to install the downrev Rails (the previous layer > of the onion was "scaffold"). If uninstalling 2.0.2, and installing > 1.something (what a pain) really is the only way to use AWDWR, I guess > I can, but this makes the whole business look pretty fragile, which I > thought was one of the main things RoR was *not* supposed to be. >Trying to follow instructions written for a previous version of a framework/application is never going to be fun :-) Fred> On Mar 31, 8:07 am, fredistic <fredis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> I found that converting to will_paginate to be so easy it confused >> me. I was looking for more work to do and didn''t realize I was done. >> There''s a railscast on it somewhere. >> >> F > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you''re just wanting to follow AWDWR, just don''t use any pagination. You only add 4 items... Instead of @post_pages, @posts = paginate :posts, :per_page => 10, just do @posts = Post.find(:all) If you need pagination, learn will_paginate (it works almost exactly like ''find''). If you''re just getting your feet wet, focus on more important things. You can paginate when you have stuff that''s worth paginating. :) -Kyle On Apr 9, 1:24 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 9 Apr 2008, at 00:49, Fingal wrote: > > > > > I have, I think, gotten the gem. The files "will_paginate" and > > "will_paginate.rb" exist in my vendor/plugins/will_paginate > > directory. I still get the "undefined method ''paginate''" message when > > I try to load the page that''s supposed to use it. Another posting > > somewhere else said I needed to add "require ''will_paginate''" to my > > environment.rb, and I did that, with no change in the result. I''m not > > sure if it should be necessary, but I am restarting the server every > > time I make a change. > > will_paginate is great but is not a drop-in replacement for what was > in rails 1.2 (classic_pagination does that) > > > > > All I''m really trying to do is use AWDWR to learn about Rails, and I > > wasn''t bright enough to install the downrev Rails (the previous layer > > of the onion was "scaffold"). If uninstalling 2.0.2, and installing > > 1.something (what a pain) really is the only way to use AWDWR, I guess > > I can, but this makes the whole business look pretty fragile, which I > > thought was one of the main things RoR was *not* supposed to be. > > Trying to follow instructions written for a previous version of a > framework/application is never going to be fun :-) > > Fred > > > On Mar 31, 8:07 am, fredistic <fredis...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I found that converting to will_paginate to be so easy it confused > >> me. I was looking for more work to do and didn''t realize I was done. > >> There''s a railscast on it somewhere. > > >> F--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---