Logs (both development and product) and server output not working rails 3

假如想象 提交于 2021-01-27 22:54:20

问题


the development.log in my application has never worked since the beginning of creating the application. I pull other projects from github, run them and the logs work perfectly fine. the SQL queries don't get logged to the server console either. I usually just see something like

Started GET "/admins/queued_users/3" for 127.0.0.1 at 2011-07-29 15:16:46 -0700
Processing by Admins::QueuedUsersController#show as HTML
Parameters: {"id"=>"3"}
Rendered admins/queued_users/show.html.erb within layouts/admin (18.5ms)
Completed 200 OK in 120ms (Views: 53.2ms | ActiveRecord: 19.9ms)

even though there is an sql query involved

If you have any idea, or want me to post any code please let me know. I've looked for a LONG time everywhere online for a solution. I've deleted and recreated the log/development.log file, the whole log folder, reset permissions to be 777 on the file/ folder and everything. Help!

Below is my gemfile lock

    GEM
    remote: http://rubygems.org/
    specs:
    abstract (1.0.0)
    actionmailer (3.0.7)
    actionpack (= 3.0.7)
    mail (~> 2.2.15)
    actionpack (3.0.7)
    activemodel (= 3.0.7)
    activesupport (= 3.0.7)
    builder (~> 2.1.2)
    erubis (~> 2.6.6)
    i18n (~> 0.5.0)
    rack (~> 1.2.1)
    rack-mount (~> 0.6.14)
    rack-test (~> 0.5.7)
    tzinfo (~> 0.3.23)
    activemodel (3.0.7)
    activesupport (= 3.0.7)
    builder (~> 2.1.2)
    i18n (~> 0.5.0)
    activerecord (3.0.7)
    activemodel (= 3.0.7)
    activesupport (= 3.0.7)
    arel (~> 2.0.2)
    tzinfo (~> 0.3.23)
    activeresource (3.0.7)
    activemodel (= 3.0.7)
    activesupport (= 3.0.7)
    activesupport (3.0.7)
    admin_data (1.1.13)
    will_paginate (= 3.0.pre2)
    analytical (2.11.0)
    annotate (2.4.0)
    arel (2.0.10)
    aws-s3 (0.6.2)
    builder
    mime-types
    xml-simple
    babosa (0.3.5)
    bcrypt-ruby (2.1.4)
    braintree (2.10.1)
    builder (>= 2.0.0)
    builder (2.1.2)
    cocaine (0.1.0)
    configuration (1.3.1)
    css_parser (1.1.9)
    devise (1.4.2)
    bcrypt-ruby (~> 2.1.2)
    orm_adapter (~> 0.0.3)
    warden (~> 1.0.3)
    devise_invitable (0.5.2)
    devise (~> 1.4.1)
    rails (>= 3.0.0, < 3.2)
    enumerate_it (0.7.8)
    activesupport (>= 2.3.2)
    erubis (2.6.6)
    abstract (>= 1.0.0)
    escape (0.0.4)
    exception_notification (2.4.1)
    fastercsv (1.5.4)
    formtastic (1.1.0)
    actionpack (>= 2.3.0)
    activesupport (>= 2.3.0)
    i18n (>= 0.4.0)
    friendly_id (3.2.1.1)
    babosa (~> 0.3.0)
    heroku (2.3.6)
    launchy (>= 0.3.2)
    rest-client (~> 1.6.1)
    term-ansicolor (~> 1.0.5)
    heroku_backup_task (0.0.5.1)
    heroku (>= 1.13.7)
    rake
    heroku_san (1.2.2)
    heroku (>= 2)
    rails (>= 2)
    hominid (3.0.2)
    i18n (0.5.0)
    jquery-rails (1.0.12)
    railties (~> 3.0)
    thor (~> 0.14)
    json (1.5.3)
    launchy (0.4.0)
    configuration (>= 0.0.5)
    rake (>= 0.8.1)
    mail (2.2.19)
    activesupport (>= 2.3.6)
    i18n (>= 0.4.0)
    mime-types (~> 1.16)
    treetop (~> 1.4.8)
    mime-types (1.16)
    mixpanel (0.9.0)
    escape
    json
    rack
    mysql2 (0.2.11)
    nokogiri (1.5.0)
    orm_adapter (0.0.5)
    paperclip (2.3.15)
    activerecord (>= 2.3.0)
    activesupport (>= 2.3.2)
    cocaine (>= 0.0.2)
    mime-types
    polyglot (0.3.1)
    poundpay (0.2.8)
    activeresource (>= 3.0)
    rack (1.2.3)
    rack-mount (0.6.14)
    rack (>= 1.0.0)
    rack-test (0.5.7)
    rack (>= 1.0)
    rails (3.0.7)
    actionmailer (= 3.0.7)
    actionpack (= 3.0.7)
    activerecord (= 3.0.7)
    activeresource (= 3.0.7)
    activesupport (= 3.0.7)
    bundler (~> 1.0)
    railties (= 3.0.7)
    rails-footnotes (3.7.4)
    rails (>= 3.0.0)
    rails3-jquery-autocomplete (0.9.0)
    rails (~> 3.0)
    railties (3.0.7)
    actionpack (= 3.0.7)
    activesupport (= 3.0.7)
    rake (>= 0.8.7)
    thor (~> 0.14.4)
    rake (0.9.2)
    rest-client (1.6.3)
    mime-types (>= 1.16)
    right_aws (2.1.0)
    right_http_connection (>= 1.2.5)
    right_http_connection (1.3.0)
    rmagick (2.13.1)
    roadie (1.1.0)
    actionmailer (~> 3.0.0)
    css_parser
    nokogiri (>= 1.4.4)
    sequel (3.25.0)
    term-ansicolor (1.0.5)
    thor (0.14.6)
    tiny_mce (0.1.4)
    treetop (1.4.9)
    polyglot (>= 0.3.1)
    tzinfo (0.3.29)
    warden (1.0.4)
    rack (>= 1.0)
    web-app-theme (0.6.3)
    will_paginate (3.0.pre2)
    xml-simple (1.1.0)

    PLATFORMS
    ruby

    DEPENDENCIES
    admin_data
    analytical
    annotate
    aws-s3
    braintree
    devise
    devise_invitable
    enumerate_it
    exception_notification
    fastercsv
    formtastic (~> 1.1.0)
    friendly_id (~> 3.2.1)
    heroku_backup_task
    heroku_san
    hominid
    jquery-rails
    mixpanel
    mysql2 (~> 0.2.7)
    paperclip
    poundpay
    rails (= 3.0.7)
    rails-footnotes (>= 3.7)
    rails3-jquery-autocomplete
    right_aws
    rmagick
    roadie
    sequel
    tiny_mce
    web-app-theme (>= 0.6.2)
    will_paginate (~> 3.0.pre2)

回答1:


Search your application for any assignments to this config:

config.log_level

If you can't find any, check your current log level from console:

Rails.logger.level

This value should be 0 or 1, on development environment. If it is not, set the config.log_level property to :debug

config.log_level = :debug

At your development.rb file (don't do this at the environment.rb or application.rb file.



来源:https://stackoverflow.com/questions/6879629/logs-both-development-and-product-and-server-output-not-working-rails-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!