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.
A3ae9f39c4b2fd0fa048bfa43ca2a495?d=identicon&s=25 Thiti Panya (plemazako)
on 2009-04-02 09: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
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-04-02 09:35
(Received via mailing list)
On Thu, Apr 2, 2009 at 12:23 AM, plebaba@gmail.com
<plebaba@gmail.com>wrote:

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

gem install mislav-will_paginate

-Conrad
A3ae9f39c4b2fd0fa048bfa43ca2a495?d=identicon&s=25 Thiti Panya (plemazako)
on 2009-04-02 09: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 Taylor <conradwt@gmail.com>
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-04-02 09:57
(Received via mailing list)
Please run the following commands and post the output.

gem -v
ruby -v

-Conrad
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-04-02 10:01
(Received via mailing list)
2009/4/2 thitima panyayai <plebaba@gmail.com>

> 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).
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-04-02 10:04
(Received via mailing list)
On Thu, Apr 2, 2009 at 1:00 AM, Colin Law <clanlaw@googlemail.com>
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
A3ae9f39c4b2fd0fa048bfa43ca2a495?d=identicon&s=25 Thiti Panya (plemazako)
on 2009-04-02 10: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 Taylor <conradwt@gmail.com>
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-04-02 10: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
A3ae9f39c4b2fd0fa048bfa43ca2a495?d=identicon&s=25 Thiti Panya (plemazako)
on 2009-04-02 10:21
(Received via mailing list)
thank you very much
it's wok .............. -___-

2009/4/2 Conrad Taylor <conradwt@gmail.com>
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-04-02 10:29
(Received via mailing list)
Great.
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-04-02 10: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 Taylor <conradwt@gmail.com>
This topic is locked and can not be replied to.