Forum: Ruby on Rails error about will_paginate plug in

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Thiti P. (Guest)
on 2009-04-02 11:24
(Received via mailing list)
Hello ,
i stall will_paginate plug in by using
>>mkdir vendor/plugins/will_paginate
>> wget -nv http://github.com/mislav/will_paginate/tarball/master -O- | \tar xzv -C 
vendor/plugins/will_paginate --strip 1
>>i get this
>>
mislav-
will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/.gitignore
mislav-
will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/.manifest
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/
CHANGELOG.rdoc
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/LICENSE
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/
README.rdoc
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/Rakefile
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/
examples/
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/examples/
apple-circle.gif
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/examples/
index.haml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/examples/
index.html
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/examples/
pagination.css
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/examples/
pagination.sass
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/init.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/array.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/collection.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/core_ext.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/finder.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/named_scope.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/named_scope_patch.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/version.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/lib/
will_paginate/view_helpers.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
boot.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
collection_test.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
console
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
database.yml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
finder_test.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/admin.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/developer.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/developers_projects.yml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/project.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/projects.yml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/replies.yml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/reply.rb
2009-04-02 13:11:00 URL:http://download.github.com/mislav-
will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556.tar.gz
[36217/36217] -> "-" [1]
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/schema.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/topic.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/topics.yml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/user.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
fixtures/users.yml
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
helper.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
lib/
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/lib/
activerecord_test_case.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/lib/
activerecord_test_connector.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/lib/
load_fixtures.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/lib/
view_test_process.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
tasks.rake
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/test/
view_test.rb
mislav-will_paginate-8888651be8d6656bdf2378731d91a8badbaa2556/
will_paginate.gemspec
 >>>>>>>>>>>>>>>>>>>
after that i go to config/environments.rb
add the require "will_paginate" at the bottom
>>>and try the script
>>s = Seq.paginate(:page => 1, :per_page => 5)
NameError: uninitialized constant Seq::Post
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:105:in `const_missing'
  from /home/apple/www/rcc_eri/app/models/seq.rb:7
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:380:in
`load_without_new_constant_marking'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:380:in `load_file'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:379:in `load_file'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:259:in `require_or_load'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:425:in `load_missing_constant'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:80:in `const_missing'
  from /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:92:in `const_missing'
  from (irb):2
>>>pls ,tell me what i missing?
thank you
Conrad T. (Guest)
on 2009-04-02 11:35
(Received via mailing list)
On Thu, Apr 2, 2009 at 12:23 AM, removed_email_address@domain.invalid
<removed_email_address@domain.invalid>wrote:

> thank you
Hi, did you try installing it as a gem?  For example,

gem install mislav-will_paginate

-Conrad
Thiti P. (Guest)
on 2009-04-02 11:41
(Received via mailing list)
i try gem install mislav-will_paginate
i get this
>>>WARNING:  Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
      /usr/bin aren't both writable.
>>>WARNING:  You don't have /home/apple/.gem/ruby/1.8/bin in your PATH,
      gem executables will not run.
Successfully installed mislav-will_paginate-2.3.8
1 gem installed
Installing ri documentation for mislav-will_paginate-2.3.8...
Installing RDoc documentation for mislav-will_paginate-2.3.8...


2009/4/2 Conrad T. <removed_email_address@domain.invalid>
Conrad T. (Guest)
on 2009-04-02 11:57
(Received via mailing list)
Please run the following commands and post the output.

gem -v
ruby -v

-Conrad
Colin L. (Guest)
on 2009-04-02 12:01
(Received via mailing list)
2009/4/2 thitima panyayai <removed_email_address@domain.invalid>

> i try gem install mislav-will_paginate
> i get this
> >>>WARNING:  Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and
>       /usr/bin aren't both writable.
> >>>WARNING:  You don't have /home/apple/.gem/ruby/1.8/bin in your PATH,
>       gem executables will not run.


This may have happened because you should have used sudo gem install
......
Without the sudo you could not write to the relevant folders.  The
result is
that it has installed it to ~/.gem instead of the the correct place.  I
fell
over this myself and was not sure how to get out of it.  Can anyone
advise
the correct solution? I tried gem uninstalling but that would not work.
If I
remember correctly I ended up deleting ~/.gem (or renaming actually just
in
case) and re-installing the gem (with sudo this time).
Conrad T. (Guest)
on 2009-04-02 12:04
(Received via mailing list)
On Thu, Apr 2, 2009 at 1:00 AM, Colin L. <removed_email_address@domain.invalid>
wrote:

> This may have happened because you should have used sudo gem install ......
>> Successfully installed mislav-will_paginate-2.3.8
>>>> Hello ,
>>>
>>
>>
>
Removing .gem directory and re-installing works.

-Conrad
Thiti P. (Guest)
on 2009-04-02 12:05
(Received via mailing list)
apple@inspiron1420:~/www/rcc_eri$ gem -v
1.3.1
apple@inspiron1420:~/www/rcc_eri$ ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]


2009/4/2 Conrad T. <removed_email_address@domain.invalid>
Conrad T. (Guest)
on 2009-04-02 12:09
(Received via mailing list)
Now, please try the following:
a)  Remove the .gem directory in your home directory

     rm -rf ~/.gem

b)  Reinstall will_paginate

     sudo gem install mislav-will_paginate

-Conrad
Thiti P. (Guest)
on 2009-04-02 12:21
(Received via mailing list)
thank you very much
it's wok .............. -___-

2009/4/2 Conrad T. <removed_email_address@domain.invalid>
Conrad T. (Guest)
on 2009-04-02 12:29
(Received via mailing list)
Great.
Colin L. (Guest)
on 2009-04-02 12:33
(Received via mailing list)
Is there a good reason why gem install installs to ~/.gem rather than
bombing out if it cannot write to where should?

2009/4/2 Conrad T. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.