#181 new
Ivan Kuznetsov

Remote configuration doesn't work - ferret_server.yml is never read

Reported by Ivan Kuznetsov | September 30th, 2011 @ 06:41 AM

Because of Rails bug #4016: https://rails.lighthouseapp.com/projects/8994/tickets/4016-railsroo... which turned out to be a feature, acts_as_ferret always initialises local index, even if remote one is specified in config/ferret_server.yml

The root cause is here: acts_as_ferret-0.5.3/lib/acts_as_ferret/server/config.rb

      DEFAULTS = {
        'cf'        => "config/ferret_server.yml",

      def initialize(file = DEFAULTS['cf'])
        @everything = YAML.load(ERB.new(IO.read(abs_config_file_path(file))).result)

      def abs_config_file_path(path)
        if path =~ /^\//

Rails.root is nil during initialization phase, when bundler loads acts_as_ferret gem. As a result configuration file is not found and remote index is never used.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket