Hey all, 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. Thanks for response. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On 3 December 2010 16:45, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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: > > But that didn''t do anything.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. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
John Merlino wrote in post #965993:> 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. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Are you sure your server is actually running in the production > environment (RAILS_ENV=production)?I am not sure. But on server, in: /etc/httpd/conf/rails.conf file I have: <VirtualHost *:80> DocumentRoot /var/www/apps/human/public <Directory /var/www/apps/human/public> allow from all Options +Indexes </Directory> ServerName www.humandiet.net RailsEnv production </VirtualHost> So this appears to be default by passenger. In config/environment.rb I have this: ENV[''RAILS_ENV''] ||= ''production'' And my server has been restarted hundreds of times since those changes were made. Thanks for response. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 3 December 2010 18:34, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> Are you sure your server is actually running in the production >> environment (RAILS_ENV=production)? > > > I am not sure. > > But on server, in: > /etc/httpd/conf/rails.conf file > > I have: > > <VirtualHost *:80> > DocumentRoot /var/www/apps/human/public > <Directory /var/www/apps/human/public> > allow from all > Options +Indexes > </Directory> > ServerName www.humandiet.net > RailsEnv production > </VirtualHost> > > So this appears to be default by passenger. > > In config/environment.rb I have this: > ENV[''RAILS_ENV''] ||= ''production'' > > And my server has been restarted hundreds of times since those changes > were made.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'']. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
When I try ENV[''RAILS_ENV''], it correctly says "production". But the production log is still not written to. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> 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. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Dec 3, 2010 at 5:50 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> When I try ENV[''RAILS_ENV''], it correctly says "production". But the > production log is still not written to.Open a console in production mode and>> RAILS_DEFAULT_LOGGER.info("what the hey")=> "2010-12-03-18:00:00 INFO what the hey\n">>and then check the log file(s). Does that show up anywhere? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Open a console in production mode and >>> RAILS_DEFAULT_LOGGER.info("what the hey") > => "2010-12-03-18:00:00 INFO what the hey\n" >>> > > and then check the log file(s). Does that show up anywhere?I try it and still the production.log is empty: [root@Proxima MARKT]# script/console production Loading production environment (Rails 2.3.8)>> RAILS_DEFAULT_LOGGER.info("what the hey")=> "what the hey\n">> exit[root@Proxima MARKT]# ls app config db doc IDENTIFIED lib log public Rakefile README script test tmp vendor [root@Proxima MARKT]# cd log [root@Proxima log]# ls development.log production.log server.log test.log [root@Proxima log]# nano production.log -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> 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. My database.yml file has this for production: production: adapter: mysql encoding: utf8 database: website_production host: localhost username: root password: mymysql Also, I can access mysql via command line: 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. So I''m not sure why I get rake aborted error. Thanks for response. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Dec 3, 2010 at 6:29 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:>> and then check the log file(s). Does that show up anywhere? > > I try it and still the production.log is empty:Not the question -- did it show up *anywhere*? In another log?> [root@Proxima log]# lsI find it useful to alias newest=''ls -alFGht | head -10'' Just a suggestion. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Fri, Dec 3, 2010 at 7:27 PM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I tried the migration with it: > > MacBook-Pro:MARKT jmerlino$ rake db:migrate RAILS_ENV=productionWait, what? You previously said: [root@Proxima MARKT]# script/console production You''re definitely making this more complicated by switching back and forth between yourself and root -- an unnecessary variable. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 4 December 2010 01:58, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Using macbook pro, and users do have permission to read and write to the > file. So I don''t think that could be problem.Did you delete the production.log? Did it get recreated when you started the application? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 4 December 2010 01:50, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: 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. Colin -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> 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. > > ColinNo 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/] -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> Did you delete the production.log? Did it get recreated when you > started the application?I''m not sure exactly what you mean, but this is what I tried. In textmate: • I deleted production.log • Then restarted server locally No file was recreated. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Actually after deleting it, it is recreated with this: # Logfile created on Mon Dec 06 10:19:07 -0500 2010 But nothing else. -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Dec 6, 2010 at 7:43 AM, John Merlino <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Actually after deleting it, it is recreated with this: > > # Logfile created on Mon Dec 06 10:19:07 -0500 2010 > > But nothing else.OK, instead of my original suggestion using logger: Open a console in production mode and>> RAILS_DEFAULT_LOGGER.info("what the hey")instead try a simple `puts "-- hey, I''m talking to you"` and see if that shows up (again, anywhere, not just in the production log). Also, what''s the console output of RAILS_DEFAULT_LOGGER -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.