Ruby on Rails Sunday, May 30, 2010

Ahmet Kilic wrote:
> Steve Ross wrote:
>> Ahmet Kilic wrote:
>>>> DocumentRoot /var/www/site/public
>>>> </VirtualHost>
>>>>
>>>> and its running fine in development.
>>>> Check /log dir, and look for development.log file,.
>>>
>>> it is Ok for me also.
>>> But why it is not working with RailsEnv production???
>>> Is it not a bit strange!?:(
>>
>> So, if I understand correctly, the exact stuff from httpd.conf that
>> you've shown above works, but it fails if you change to RailsEnv
>> production?
>>
>> Have you looked at your Apache error_log and/or
>> /path/to/app/log/production.log? Maybe there's a clue there. It seems an
>> exception is being raised and you are seeing the default error page. If
>> that's the case, then there should be a log entry.
>
> nothing different than others people logs.
> That reason I told it is a bit strange.
> and What is the difference between development and production env.?
> If I can find it I can solve my problem.

The differences are numerous, but primarily they revolve around
ActiveRecord optimizations, exceptions are gobbled up, files are not
reloaded between requests when they change, and of course the logging
level is lower.

My configuration looks like this:

<VirtualHost *:80>
ServerName foosball.local
DocumentRoot "/Users/foos/Developer/Rails/foosball/public"
RailsEnv production
<Directory "/Users/foos/Developer/Rails/foosball/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

As I recall, you are using <VirtualHost somename:80>

That shouldn't matter, though.

Try setting your production log level to (production.rb)

ActiveRecord::Base.logger.level = :debug
config.whiny_nils = true

See:
http://guides.rubyonrails.org/debugging_rails_applications.html#log-levels

This is also grasping at straws, because what it seems is happening is
that something is raising an exception in your app and it's being
rescued in public (default in production, not development).

Remind me ... what OS?

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

No comments:

Post a Comment