tamouse m. wrote in post #1119977:
> On Aug 29, 2013, at 5:33 AM, Shawn h. <lists@ruby-forum.com> wrote:
>
> Using launchd is much like using cron on linux: there is no (or barely
> any) predefined environment like you have in Terminal. Thus you have to
> provide all the information that will be needed to make sure your script
> runs correctly. This is includes running whatever is needed to set the
> right version and source of ruby for that launcher.
>
> Since OS/X ships with 1.8.7 as the system ruby, that is the one used by
> launchd. If you require a different version (and you do if you want to
> use any gems you've installed for that different version), you have to
> wrap your ruby script in something that will initialize the environment.
> I haven't tried this, but it might just be enough to add init-file
> /Users/youruser/.bash_profile to the argument list above, depending on
> how you have things configured.
Thanks! I think this is the right direction and I am gonna give it a
try. I just test adding ruby path to both /etc/launchd.conf and
/etc/paths. After rebooting, I thought it would work but not. Launchd
still does not recognize the correct ruby version. I will report once it
works.
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/4ff6d7e4a42cd98e7e9bcccb51f6d3e0%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment