I can't help notice that while development.log always updates,
production.log is completely empty. There's no runtime errors currently
locally or on server. But in both cases, production.log is empty.
I tried solutions found on google, including the following:
• add config.log_level = :info to config/environments/production.rb
• uncomment config.log_level = :debug in
config/environments/production.rb
But that didn't do anything.
Also, speaking of production and development, why should you use both a
production and development database (e.g. database_development,
database_production) when both will contain the same fields? It seems
like duplicate work.
You don't mention what platform you're running on, but if it's *nix, I
would be inclined to check permissions. Does the account running the
application have rights to write to the log folder and production.log
file.
Try deleting the file that's there and restarting the application to
see if it gets recreated.
I can't help notice that while development.log always updates,
production.log is completely empty. There's no runtime errors currently
locally or on server. But in both cases, production.log is empty.
Are you sure your server is actually running in the production
environment (RAILS_ENV=production)?
Also, speaking of production and development, why should you use both a
production and development database (e.g. database_development,
database_production) when both will contain the same fields? It seems
like duplicate work.
There should be three databases at least. Development, test &
production. It's not duplicate work migrations take care of moving the
schema forward (at least for ActiveRecord).
Having separate development and production database allow you to
experiment in the development database without affecting production
data. The test database is there solely to support automated unit
testing. This database should be emptied between each test case. You
wouldn't want that to happen to the development or certainly not the
production database.
When you believe that you are running in production mode is
development.log still getting written to? Each entry has a time stamp
so it is easy to tell. If so then either you are actually running in
development mode for some reason or the wrong log is getting written
to.
Another thing you can do to check is in one of your views display the
value of ENV['RAILS_ENV'].
You don't mention what platform you're running on, but if it's *nix, I
would be inclined to check permissions. Does the account running the
application have rights to write to the log folder and production.log
file.
Using macbook pro, and users do have permission to read and write to the
file. So I don't think that could be problem.
There should be three databases at least. Development, test &
production. It's not duplicate work migrations take care of moving the
schema forward (at least for ActiveRecord).
I tried the migration with it:
MacBook-Pro:MARKT jmerlino$ rake db:migrate RAILS_ENV=production
(in /Users/jmerlino/MARKT )
rake aborted!
Access denied for user 'root'@'localhost' (using password: YES)
This happens despite having a real simple password of only letters.
mysql -u root website_development --password=mymysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 581
Server version: 5.1.40 MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
Please remember to quote the previous message so that your reply has
some sort of context. Insert your reply into previous email. Thanks.
When I try ENV['RAILS_ENV'], it correctly says "production". But the
production log is still not written to.
Inserting your reply inline also makes it more likely that all issues
in previous post will be addressed. You have said that the production
log is not written to but you have not answered my previous question:
When you believe that you are running in production mode is
development.log still getting written to?
Or any other log for that matter.
Inserting your reply inline also makes it more likely that all issues
in previous post will be addressed. You have said that the production
log is not written to but you have not answered my previous question:
When you believe that you are running in production mode is
development.log still getting written to?
Or any other log for that matter.
Colin
No other log is getting written to. The only time a log is written to is
the development log when I am running the app locally:
Processing DashboardsController#index (for 127.0.0.1 at 2010-12-06
09:30:04) [GET]
[4;36;1mDashboard Load (87.7ms)[0m [0;1mSELECT * FROM `dashboards`
[0m
Rendering template within layouts/application
Rendering dashboards/index
[4;35;1mDashboard Columns (28.2ms)[0m [0mSHOW FIELDS FROM
`dashboards`[0m
[4;36;1mUser Columns (3.9ms)[0m [0;1mSHOW FIELDS FROM `users`[0m
Completed in 781ms (View: 631, DB: 121) | 200 OK [http://localhost/\]