[rt-users] Cannot locate RT/FM.pm

Ruslan Zakirov ruslan.zakirov at gmail.com
Sun May 24 07:52:44 EDT 2009


On Sat, May 23, 2009 at 6:04 PM, Woody - Wild Things
<woody at wildthingsafaris.com> wrote:
> Ruslan Zakirov wrote:
>> That leading double slash (//var/...) causes your problems. I think
>> it's in lib/RT.pm, you can fix it by hand.
>
> Thanks Ruslan,
>
> The offending // was found in webmux.pl, but didn't solve the issue.
> However your pointer to RT.pm did allow me to hack a fix:
>
> sub InitPluginPaths {
>     my $self = shift || __PACKAGE__;
>
>     my @lib_dirs = $self->PluginDirs('lib');
>
>     my @tmp_inc;
>     for (@INC) {
>         if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
>             push @tmp_inc, $_, @lib_dirs;
>         } else {
>             push @tmp_inc, $_;
>         }
>     }
>     push @tmp_inc, @lib_dirs; # <------------- added
>     my %seen;
>     @INC = grep !$seen{$_}++, @tmp_inc;
> }
>
> I added the push as the @lib_dirs was not being added to @INC, but now
> its not in the correct place i assume - its right at the end.
>
> It works, but I'm sure it would be better to fix the
> if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
> properly, but that seems so far to be beyond me.....

Could you please add something like that to that code, before "for" loop:

use Data::Dumper;
warn "INC: ". Dumper \@INC;
warn "local lib path: ". $RT::LocalLibPath;

Then stop/start server. In apache's error log you should see this
entries. This can help us debug issue.

FYI, with your change files in local/lib wouldn't override matching
libraries of plugins.

>
> Thanks very much. Now on to configure RTFM :)
>
> w.
>
> --
> -----------------------
> Richard Wood (Woody)
> Managing Director
> Wild Thing Safaris Ltd.
> PO BOX 34514 DSM
> Office: +255 (0) 222 617 166
> Mobile: +255 (0) 773 503 502
>
> http://www.wildthingsafaris.com
> http://www.wildthingsafaris.com/pub/woody.html
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list