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

**URL:** <https://www.ruby-forum.com/t/receiving-mail-no-such-file-to-load-pathname/97829>\
**Category:** Rails\
**Created:** [July 10, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/receiving-mail-no-such-file-to-load-pathname/97829 "2006-07-10T21:00:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 10, 2006, 9:00pm UTC](https://www.ruby-forum.com/t/receiving-mail-no-such-file-to-load-pathname/97829/1 "2006-07-10T21:00:22Z")

</div>

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:in`require’ from  
/Users/jon/Developer/OneMod/script/runner:2

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

Any ideas?  
Thanks  
Jon

---

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 10, 2006, 11:41pm UTC](https://www.ruby-forum.com/t/receiving-mail-no-such-file-to-load-pathname/97829/2 "2006-07-10T23:41:07Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 10, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/receiving-mail-no-such-file-to-load-pathname/97829/3 "2006-07-10T21:48:36Z")

</div>

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:in`require’ 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

---

<div class="post-metadata">

**Author:** ![Jonathan\_del\_Stroth](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@Jonathan\_del\_Stroth](https://www.ruby-forum.com/u/Jonathan_del_Stroth)\
**Post date:** [July 11, 2006, 12:07am UTC](https://www.ruby-forum.com/t/receiving-mail-no-such-file-to-load-pathname/97829/4 "2006-07-11T00:07:45Z")

</div>

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
