none
2008-Oct-20 14:04 UTC
where is the difference between >system "script/myscript"< and >script/myscript< (via shell) ?
hallo everybody,
i''ve searched the web for quite some time now, but didn''t find
an
answer to this question (and thus no solution to my problem).
explanation:
i wrote a script to start a DRb-server on a rails-app. what i want to
achieve is to run this script from another application (on the same
machine). everything is working perfectly when i start myscript from a
shell and enter "script/myscript" (without quotes). but when i call it
from my other application like this: system "#{path}/script/myscript"
my tests are failing...
of course there is the obvious difference in ENV[''_''], but
even
changing this manually wouldn''t help. i''m looking for a way to
get a
"clean" call. (just like from shell)
any ideas?
thanks in advance
dominik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Oct-20 14:26 UTC
Re: where is the difference between >system "script/myscript"< and >script/myscript< (via shell) ?
On 20 Oct 2008, at 15:04, none wrote:> > hallo everybody, > > i''ve searched the web for quite some time now, but didn''t find an > answer to this question (and thus no solution to my problem). > > explanation: > i wrote a script to start a DRb-server on a rails-app. what i want to > achieve is to run this script from another application (on the same > machine). everything is working perfectly when i start myscript from a > shell and enter "script/myscript" (without quotes). but when i call it > from my other application like this: system "#{path}/script/myscript" > my tests are failing...current working directory is one obvious difference that does screw up some things. Fred> > > of course there is the obvious difference in ENV[''_''], but even > changing this manually wouldn''t help. i''m looking for a way to get a > "clean" call. (just like from shell) > > any ideas? > > thanks in advance > dominik > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---