Forum: Ferret Ferret problems with Rails 1.2.1

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.
83b5c9943dd360dc52ea71a593f9b584?d=identicon&s=25 donut donut (donut)
on 2007-01-24 20:19
Hi, I've just updated rails from 1.1.6 to 1.2.1 and I'm getting the
following errors whenever I load a page that uses a class that uses
ferret.  I have ferret 0.10.13 and acts_as_ferret.  They were working
fine before the upgrade.

#<NameError: cannot remove Object::WildcardQuery>
["/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in
`remove_const'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in
`remove_constant'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in
`remove_unloadable_constants!'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in
`remove_unloadable_constants!'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:73:in
`clear'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:60:in
`reset_application!'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:116:in
`reset_after_dispatch'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:51:in
`dispatch'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:113:in
`handle_dispatch'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:79:in
`service'", "/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in
`service'", "/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'",
"/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'",
"/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'",
"/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'",
"/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'",
"/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'",
"/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/webrick_server.rb:63:in
`dispatch'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/servers/webrick.rb:59",
"/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in
`new_constants_in'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/commands/server.rb:39",
"/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:343:in
`new_constants_in'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:496:in
`require'", "script/server:3"]
[2007-01-23 11:50:29] ERROR `/market/list' not found.
192.168.1.102 - - [23/Jan/2007:11:50:29 PST] "GET /market/list HTTP/1.1"
404 283
- -> /market/list

Have you seen this?  Thanks.
28c237c0c414b644082bfcde4e42b309?d=identicon&s=25 John Leach (Guest)
on 2007-01-25 01:14
(Received via mailing list)
Hi,

In case it's any use, I moved a Rails 1.1.6 site to 1.2.1 the other day
with Ferret 0.10.14 and it's working fine, though it doesn't use
acts_as_ferret.

The dependencies system has changed in Rails 1.2, perhaps acts_as_ferret
is tickled by this.  You might want to try including the Ferret
libraries manually, in config/environment.rb.

http://weblog.rubyonrails.org/2006/8/11/reloading-revamped

John.
--
http://johnleach.co.uk
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-01-26 14:26
(Received via mailing list)
On Wed, Jan 24, 2007 at 11:39:45PM +0000, John Leach wrote:
> http://weblog.rubyonrails.org/2006/8/11/reloading-revamped
I have a live application here running aaf trunk, Rails 1.2.1 and Ferret
0.10.14 without problems. I'm not running Mongrel, though.

But it really looks like some dependencies issue. can you make sure
there is no other version of ferret lying around? It'd be also
interesting to know where ferret is installed (systemwide or frozen to
your app).

Jens


--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
83b5c9943dd360dc52ea71a593f9b584?d=identicon&s=25 donut donut (donut)
on 2007-01-30 20:24
Jens Kraemer wrote:
> On Wed, Jan 24, 2007 at 11:39:45PM +0000, John Leach wrote:
>> http://weblog.rubyonrails.org/2006/8/11/reloading-revamped
> I have a live application here running aaf trunk, Rails 1.2.1 and Ferret
> 0.10.14 without problems. I'm not running Mongrel, though.
>
> But it really looks like some dependencies issue. can you make sure
> there is no other version of ferret lying around? It'd be also
> interesting to know where ferret is installed (systemwide or frozen to
> your app).
>
> Jens
>

Well I finally got around to testing this again after finishing a work
item today.  I upgraded my ferret gem from 0.10.13 to 0.10.14.  I also
installed acts_as_ferret 0.3.1 as a gem today(it wasn't available as a
gem before).  I added

   require 'acts_as_ferret'

in my environment.rb and my project ran in rails 1.1.6 fine.  Next I
switched to rails 1.2.1(changed RAILS_GEM_VERSION = '1.2.1' in
environment.rb) and did a rake rails:update (which didn't do anything
related to my problem, I think).  Ferret now seems to be working.
However, I'm getting another error:

#<NameError: cannot remove Object::HWBColorspace>
["/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in
`remove_const'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:423:in
`remove_constant'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in
`remove_unloadable_constants!'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:274:in
`remove_unloadable_constants!'",
"/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.0/lib/active_support/dependencies.rb:73:in
`clear'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:60:in
`reset_application!'",
"/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.1/lib/dispatcher.rb:116:in
`reset_after_dispatch'",
blah blah blah

HWBColorspace is part of the Rmagick gem.  I think rails 1.2.1 breaks a
lot of backward compatibility.  Now I need to decide if I want to
upgrade my Rmagick gem and hope that I won't run into another
compatibility problem.  May be I should stay with 1.1.6 as 1.2.1 is at
least 50% slower than 1.1.6.

Thanks.
F0bf457915a11e25d6744d02362511aa?d=identicon&s=25 Julio Cesar Ody (Guest)
on 2007-01-30 23:27
(Received via mailing list)
I bit OT I know, but let me ask

On 1/31/07, donut donut <chitam@gmail.com> wrote:
> ... May be I should stay with 1.1.6 as 1.2.1 is at
> least 50% slower than 1.1.6.

Are you sure? The exact figure isn't what concerns me, but what did
you notice in terms of performance, and how?

Thanks
83b5c9943dd360dc52ea71a593f9b584?d=identicon&s=25 donut donut (donut)
on 2007-01-31 01:33
> Are you sure? The exact figure isn't what concerns me, but what did
> you notice in terms of performance, and how?
>
> Thanks

"Slower" is vague as there are many ways such as memory, rps, response
time etc to measure perf.  Anyway, I came across this:

http://www.ruby-forum.com/topic/95947#new
C9dd93aa135988cabf9183d3210665ca?d=identicon&s=25 Jens Kraemer (Guest)
on 2007-01-31 09:54
(Received via mailing list)
On Tue, Jan 30, 2007 at 08:24:45PM +0100, donut donut wrote:
[..]
> related to my problem, I think).  Ferret now seems to be working.
> However, I'm getting another error:
>
> #<NameError: cannot remove Object::HWBColorspace>
[..]
>
> HWBColorspace is part of the Rmagick gem.  I think rails 1.2.1 breaks a
> lot of backward compatibility.  Now I need to decide if I want to
> upgrade my Rmagick gem and hope that I won't run into another
> compatibility problem.

I doubt that updating the gem will solve your problem. Rails 1.2 just
has a different way of how it deals with dependencies - afair the main
difference is that it does not try as hard as older versions to resolve
missing classes - so maybe you are missing a require somewhere?


Jens

--
webit! Gesellschaft für neue Medien mbH          www.webit.de
Dipl.-Wirtschaftsingenieur Jens Krämer       kraemer@webit.de
Schnorrstraße 76                         Tel +49 351 46766  0
D-01069 Dresden                          Fax +49 351 46766 66
92b8de7d25674c749e0c62eff41ac17e?d=identicon&s=25 helper (Guest)
on 2007-02-04 03:46
It doesn't seem to be common knowledge yet but are you running the
engines plugin?  If so it needs to be updated to use rails 1.2+.  And,
if you're using login_engine and/or user_engine they will need to be
removed.  In other words, you can't use login_engine or user_engine and
rails 1.2+.  And the engined plugin is what caused similar errors for
me.
This topic is locked and can not be replied to.