Missing mislav-will_paginate

When I try to start the test server (ruby script/server), I get the
following error:

 => Booting WEBrick...
 Missing these required gems:
   mislav-will_paginate  ~> 2.3.2

Not a problem, I thought, so I entered the following

 gem install mislav-will_paginate

and get an error message telling me that there is no such gem. Can
anyone tell me how to get around this error?

Thanks in advance

Try:

gem install will_paginate --remote

Hi, what platform are you on? I’m Mac OS X and you’ll need to do
something
like this:
sudo gem install mislav-will_paginate --source http://gems.github.com

Good luck,

-Conrad

Here’s something you might want to consider.

Create a gem configuration named: ~/.gemrc

Here’s the contents of mine (NOTE: the “—” line is part of the
file):


:update_sources: true
:sources:

Once you have that file in place, you can simply type:
gem install mislav-will_paginate

Check out http://www.rubygems.org/read/chapter/1 for details on what’s
going on here.

Make sure you have gems.github.com set as a source

list all current sources (http://gems.rubyforge.org/ is the only one

set by default)
$ gem sources

if you don’t see gems.github.com, add it

$ gem sources -a http://gems.github.com

Then you should be able to install mislav-will_paginate

These are all great suggestions which may be what you’re looking for.
I had a similar problem where mislav-will_paginate installs and adds
this to environment.rb file:

config.gem ‘mislav-will_paginate’, :version => ‘~> x.x.x’, :lib =>
‘will_paginate’, :source => ‘http://gems.github.com

I just removed the version hash key – :version => ‘~> x.x.x’ – and
used this instead:

config.gem ‘mislav-will_paginate’, :lib => ‘will_paginate’, :source =>
http://gems.github.com

Obviously, this won’t work if you need to stick to a particular
version (I’m using 2.2.3), but it does prevent me from getting the
missing gem errors. As always, your mileage may vary. :slight_smile:

On Aug 1, 7:23 pm, Michael S. <rails-mailing-l…@andreas-

Check out http://www.rubygems.org/read/chapter/1 for details on what’s
going on here.

It’s working now. Thanks to all who helped. I especially appreciate the
reference. While the help is great - and go me going - knowledge is
going to help me not have to ask dumb questions.

Thanks again

On Sun, Aug 2, 2009 at 8:31 AM, Billee D. [email protected]
wrote:

When I try to start the test server (ruby script/server), I get the
and get an error message telling me that there is no such gem. Can
anyone tell me how to get around this error?

Thanks in advance

The installation and simple use of this gem is covered on page 518 of
AWDwR
3rd Edtion.

-Conrad

On Aug 2, 10:22 am, Michael S. <rails-mailing-l…@andreas-
s.net> wrote:

Check outhttp://www.rubygems.org/read/chapter/1for details on what’s
going on here.

It’s working now. Thanks to all who helped. I especially appreciate the
reference. While the help is great - and go me going - knowledge is
going to help me not have to ask dumb questions.

Thanks again

Posted viahttp://www.ruby-forum.com/.

Just to be clear, your “:version => ‘~> x.x.x’” clause that you
removed had an actual version number and not x’s, right?

Yes, that is correct. In my environment.rb file it is listed
as :version => ‘~> 2.2.3’ but I removed that hash key so there is no
reference to a version number.

HTH!

William

On Aug 2, 2009, at 2:20 PM, Eric wrote:

Thanks again

Posted viahttp://www.ruby-forum.com/.

Just to be clear, your “:version => ‘~> x.x.x’” clause that you
removed had an actual version number and not x’s, right?

Here’s the line from an old app. (It would be a config.gem line for
Rails 2.x and include the :source and :lib keys like Billie D. and
others have noted.)

will_paginate: 3.0 will not be backward-compatible, 2.3.2 made a

break with the past

2.3.6 works, 2.3.11 does NOT due to a change related to an

ActionView::Base.respond_to?() that incorrectly selects behavior

for

this Rails 1.2.2 app. It probably makes it safe for all 2.x

versions.
gem ‘mislav-will_paginate’, ‘~>2.1’, ‘>2.3.2’, ‘=2.3.6’

Particularly if you user will_paginate on an older Rails application,
you might run into this problem. It is also a good example of how to
use version specifications. Initially, only the first two were
present with the first comment line to explain. When 2.3.11 broke the
app, the version was pinned to the one that was known to work, but the
first two specs deserve a bit of explanation:

~>2.1 means, roughly, “compatible with 2.1” and is equivalent
to “>=2.1,<3”. This covers the “3.0 will not be
backward-compatible” part

2.3.2 means just what you’d think, past 2.3.2 and covers
the “2.3.2 made a break with the past” part of the
explanation.
So 2.3.2.w, 2.3.x, 2.4.y or 3.z would do
fine (where x>2, w,y,z are anything)

-Rob

Rob B. http://agileconsultingllc.com
[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs