Hi Paul,

I'm running a test server in production environment with nginx as
front-end, ruby-1.9.1-p378 and one mongrel in the backend.
The script I'm currently using to start the application is as
following:

#!/bin/sh

export RAILS_ENV=production

# kill old server if running
if [ -f /home/csb/apps/ric/current/log/rackup.pid ]; then
  echo "Stopping old server instance..."
  kill `cat /home/csb/apps/ric/current/log/rackup.pid`
  sleep 2;
fi

# startup new server
echo "Starting new server instance..."
cd /home/csb/apps/ric/current
rackup -D -E production -p 8010 -P /home/csb/apps/ric/current/log/
rackup.pid /home/csb/apps/ric/current/config.ru

echo "DONE"

the export RAILS_ENV is needed because rackup seems to ignore the -E
option also I had to modify the server.rb file in the rack gem to keep
the application running in the background
I had to change the code to:

      if options[:daemonize]
        app.inspect
        daemonize_app
      end

where it used to be:

      daemonize_app if [:daemonize]

otherwise the process will just terminate if you call rackup -D I
opened an entry on the rack google group but never got any feedback.
You can find it here: 
http://groups.google.com/group/rack-devel/browse_thread/thread/db945afbffe5a0fc/29ca4400c6389a11

Best, Daniel



On Apr 25, 5:45 pm, Paul Jonathan Thompson <rails...@gmail.com> wrote:
> Has anybody succeed in getting Rails 3 to work in production? I am
> trying with Apache 2.2 and Passenger 2.2.12 but no luck. If you have
> got Rails three to work in production on any server with any set up
> could you please post the details (howto?) or a link to where such
> information can be found.
>
> All input gratefully received.
>
> Paul Thompson
>
> --
> 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-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to