Discussion:
Action Mailer, Locomotive and the Environemnt
Tony Lembke
2007-09-11 05:04:04 UTC
Permalink
I would value the advice of the list about a problem I am having with
processing emails via Postfix and Actionmailer, as per
<http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer>

runner.rb fails, as boot.rb can't find the path to 'rubygems' (message below)

I guess this is because the script is called outside the locomotive
environment and therefore uses the pre-installed-mac ruby, rather than
the locomotive bundle ruby.

This solution -> Using Locomotive as your default Ruby
<http://aralbalkan.com/758>
didn't work either, as I think it will only be active within a terminal window.

Any suggestions as to how to change the environment so that
script/runner.rb (and other ruby scripts) will default to the
Locomotive bundle rather than the pre-installed bundle?

Thanks,

Tony Lembke

Error message -

Command died with status 1:
"/Users/cathy/Projects/wedgetail/rails/wedgetail/script/runner -e
'IncomingNarrativeHandler.receive(STDIN.read)'". Command output:
/Users/cathy/Projects/wedgetail/rails/wedgetail/script/../config/boot.rb:18:in
`require': No such file to load -- rubygems (LoadError) from
/Users/cathy/Projects/wedgetail/rails/wedgetail/script/../config/boot.rb:18
Ryan Raaum
2007-09-11 11:46:13 UTC
Permalink
Post by Tony Lembke
I would value the advice of the list about a problem I am having with
processing emails via Postfix and Actionmailer, as per
<http://wiki.rubyonrails.org/rails/pages/HowToReceiveEmailsWithActionMailer>
runner.rb fails, as boot.rb can't find the path to 'rubygems' (message below)
I guess this is because the script is called outside the locomotive
environment and therefore uses the pre-installed-mac ruby, rather than
the locomotive bundle ruby.
This solution -> Using Locomotive as your default Ruby
<http://aralbalkan.com/758>
didn't work either, as I think it will only be active within a terminal window.
Any suggestions as to how to change the environment so that
script/runner.rb (and other ruby scripts) will default to the
Locomotive bundle rather than the pre-installed bundle?
Try:

- changing all the full ruby paths shown in the wiki page from
/usr/bin/ruby to the path of the bundled ruby ( type `which ruby` in a
Locomotive-opened Terminal to see what that path is)

- changing the shebang line of the runner script (the first line that
probably currently looks like `#!/usr/bin/env ruby`) to the path of
the bundled ruby

-r
Post by Tony Lembke
Thanks,
Tony Lembke
Error message -
"/Users/cathy/Projects/wedgetail/rails/wedgetail/script/runner -e
/Users/cathy/Projects/wedgetail/rails/wedgetail/script/../config/boot.rb:18:in
`require': No such file to load -- rubygems (LoadError) from
/Users/cathy/Projects/wedgetail/rails/wedgetail/script/../config/boot.rb:18
_______________________________________________
Locomotive-users mailing list
http://lists.raaum.org/mailman/listinfo/locomotive-users
Tony Lembke
2007-09-11 13:28:12 UTC
Permalink
Post by Ryan Raaum
- changing the shebang line of the runner script (the first line that
probably currently looks like `#!/usr/bin/env ruby`) to the path of
the bundled ruby
Thanks Ryan,
Changing the shebang line in runner to (in my case)
Post by Ryan Raaum
#!/Applications/Locomotive2/Bundles/standardRailsMar2007.locobundle/
i386/bin/ruby
did the trick.

Cheers,

Tony Lembke

Loading...