Welcome Guest | Login

will_paginate gem

Could you please install the will paginate gem
http://rock.errtheblog.com/will_paginate

Thanks!

2008-03-29 04:26 PM

Hi - I have installed the gem on the server. Please verify.

2008-03-29 04:40 PM

HostingRails Support
Its up, thanks you are very fast!

2008-03-29 04:58 PM

I'm a gem/plugin newb. And I'm trying to update to rails 2.0.2.

I've got my app running locally on 2.0.2 in InstantRails. I installed will_paginate by downloading/extracting the tarball into vendors/plugins and adding

   require 'will_paginate'

to the end of my environment.rb file.

Note that I don't have svn locally, or on the hostingrails server.

The problem is that I can't start Mongrel on hostingrails a) when I add the require statement to my environment file, or b) when I upload my own will_paginate files to vendor/plugins. I also can't start Mongrel when I update my environment file to point to

 RAILS_GEM_VERSION = '2.0.2'

My understanding is that rails 2.0.2 and will_paginate are already on the server. What's the easiest way for me to make use of them?

Thanks!

2008-04-03 02:05 PM

Hi-
Could you tell us the exact error you are getting when you try to start your Mongrel server.

2008-04-03 04:14 PM

I didn't get an error on the console. Mongrel apparently started, then crashed.

In ~/my_app/log/mongrel.log, the errors vary depending on what I do.

* If I require will_paginate, it is not found.

* If I require will_paginate with my files uploaded to vendor/plugins, my rails version (1.1.6) is found to be obsolete.

* If I then change the rails version in my environment.rb file to 2.0.2, it says it can't find the gem for Rails =2.0.2. It then tells me to run
 gem install -v=2.0.2 rails

* When I run
  gem install -v=2.0.2 rails
I get a segmentation fault in
  /user/local/lib/ruby/1.8/yaml.rb:133: [BUG} Segmentation fault.

Thanks in advance...

2008-04-03 06:31 PM

Hi Colcrush,
We have received your ticket regarding this issue. We will get back to you soon via ticket.

2008-04-03 08:17 PM

For those of you following this, the problem is now solved. Rails 2.0.2 had not been previously installed on my host machine. Once the administrators installed it, everything worked as planned.

To summarize:
* I ftp'd the contents of will_paginate to ~/my_app/vendor/plugins/will_paginate (I assume that you could also have the admins install it as a gem.)
* I added "require 'will_paginate'" to the end of my environment.rb file
* I modified the environment.rb file to specify rails 2.0.2.
* I copied my upgraded (2.0.2 compatible) app to the server
* I restarted Mongrel

With Rails 2.0.2 installed on the server, it works like a champ!

Now, to see if everything (including ActionMailer) still works...

2008-04-03 08:49 PM

I'm struggling a bit with this.  I'm on rails 2.1.0.  When I run gem list, it shows will_paginate 2.1.0 installed.  I have this line in my environment.rb file, in the Initializer block:

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

But when I try to use paginate, I get "undefined method `paginate'"

What am I missing?

2008-10-23 04:23 PM

If all men were just, there would be no need of valor.
-- Agesilaus, 440 BC
Have you frozen the gem in your RAILS_ROOT/vendor folder?  That should take care of it.  You don't need to point the source from github - just grab it here and stick it in a folder in plugins
http://github.com/mislav/will_paginate/tree/master

2008-10-24 01:49 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.