Rails App, Going Live

I built my rails app locally, and just today put it all online.

Getting a “Application error (Rails)” when trying to submit some form
parameters to the db.

What needs to be done with going from local development to live?

I’m not sure if/where I need to set my app to “production” status.

Also, is there any way to debug “Application error (Rails)”??

Thanks,
stirman

Jason S. wrote:

I built my rails app locally, and just today put it all online.

Getting a “Application error (Rails)” when trying to submit some form
parameters to the db.

What needs to be done with going from local development to live?

I’m not sure if/where I need to set my app to “production” status.

Also, is there any way to debug “Application error (Rails)”??

Thanks,
stirman

Look in the log files. It should tell you what the error is. If you
are seeing that messge you are in production mode, so look in
log/production.log. The environment is set via variable passed from the
webserver config, or from config/evironment.rb. You should see a
commented few lines in there:

Uncomment below to force Rails into production mode when

you don’t control web/app server and can’t set it the proper way

ENV[‘RAILS_ENV’] ||= ‘production’

That will set it to production mode, although it should ideally be set
by the web server.

3 possible reasons:

  1. Rights Issue. The webserver is unable to write to tmp or log. To
    test this you can type in from the rails root the command “chmod -R
    777 log/ tmp/”. A dirty way to do things but it will at least tell you
    if that was the problem,
  2. public/.htaccess points to dispatch.cgi instead of distpatch.fcgi.
  3. ruby is in non standard location. Type in the command “which
    ruby”. Compare the ruby location to the one in dispatch.fcgi.
  4. rinse and repeat.

On 6/8/06, Jason S. [email protected] wrote:

Thanks,
stirman


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Great suggestions, going to try them right now.

Many thanks for the help!!!

-stirman