Hi!
On Sun, Dec 02, 2007 at 06:19:33AM +0100, Sam Giffney
wrote:> Jesse Grosjean wrote:
> > I''m trying to write a solaris SMF file to launch the ferret
drb server.
>
> Hmm, I think I''ve hit a similar problem. I''ve just
upgraded to the
> latest ferret trunk from an old aaf stable where the script/ferret_start
> and script/ferret_stop scripts were still in use.
>
> now if I call the old script...
>
> RAILS_ENV=production script/ferret_start
> script/ferret_start:25:in `load'': wrong number of arguments (0 for
1)
> (ArgumentError)
> from script/ferret_start:25
>
> but if I call the new script...
>
> ruby script/ferret_server -e production stop
> no such file to load -- /usr/bin/../config/environment
yeah, this happens because I use ENV[''_''] to determine the
location of
the Rails environment file. When calling the script as argument to the
ruby binary, ENV[''_''] points there and not to the script.
So if you make script/ferret_server executable and ensure the first line
points to your ruby binary it should work.
Or edit aaf''s server_manager.rb and use __FILE__ instead of
ENV[''_''] -
this will work as long as you have aaf installed in your project and
don''t use the acts_as_ferret gem.
I''ll happily apply a patch which will help get around these annoying
problems and make the script work under all circumstances (using aaf gem
or not, calling with explicit Ruby interpreter or not).
Cheers,
Jens
--
Jens Kr?mer
http://www.jkraemer.net/ - Blog
http://www.omdb.org/ - The new free film database