Receiving mail - "No such file to load -- pathname"

I’m using postfix in OS X to receive mail and forward it to my rails
app. When it tries to feed the email into rails, it fails with the
following error:

“/Users/jon/Developer/OneMod/script/runner ‘MailMan.receive
(STDIN.read)’”.
Command output: /Users/jon/Developer/OneMod/script/…/config/
boot.rb:7:in require': No such file to load -- pathname (LoadError) from /Users/jon/Developer/OneMod/script/../config/boot.rb:7 from /Users/jon/Developer/OneMod/script/runner:2:inrequire’ from
/Users/jon/Developer/OneMod/script/runner:2

If I manually enter the script/runner command, it works fine.

Any ideas?
Thanks
Jon

On 10 Jul 2006, at 20:48, Al Evans wrote:

 /Users/jon/Developer/OneMod/script/../config/boot.rb:7  from

/usr/bin/ruby, and /usr/lib/ruby/ doesn’t have pathname.rb?
Ah. Good point - it’s getting the ruby in /usr/bin rather than /usr/
local/bin. So how can I add /usr/local/bin to the path used by the
postfix process?

Jonathan del Strother wrote:

I’m using postfix in OS X to receive mail and forward it to my rails
app. When it tries to feed the email into rails, it fails with the
following error:

“/Users/jon/Developer/OneMod/script/runner ‘MailMan.receive
(STDIN.read)’”.
Command output: /Users/jon/Developer/OneMod/script/…/config/
boot.rb:7:in require': No such file to load -- pathname (LoadError) from /Users/jon/Developer/OneMod/script/../config/boot.rb:7 from /Users/jon/Developer/OneMod/script/runner:2:inrequire’ from
/Users/jon/Developer/OneMod/script/runner:2

If I manually enter the script/runner command, it works fine.

Any ideas?

Maybe you’re using /opt/local/bin/ruby and postfix is trying to use
/usr/bin/ruby, and /usr/lib/ruby/ doesn’t have pathname.rb?

–Al Evans

Jonathan del Strother wrote:

On 10 Jul 2006, at 20:48, Al Evans wrote:

 /Users/jon/Developer/OneMod/script/../config/boot.rb:7  from

/usr/bin/ruby, and /usr/lib/ruby/ doesn’t have pathname.rb?
Ah. Good point - it’s getting the ruby in /usr/bin rather than /usr/
local/bin. So how can I add /usr/local/bin to the path used by the
postfix process?

Postfix doesn’t seem to be very flexible there (according to a quick
search, anyway).

Your best bet might be
cd /usr/bin
sudo mv ruby oruby
sudo ln /usr/local/bin/ruby ruby
cd /usr/lib
sudo mv ruby oruby
sudo ln -s /usr/local/lib/ruby ruby

(I think I typed that right; anyway, you get the idea.)

–Al Evans

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs