我在development.rb中设置了以下行:
config.log_level = :debug
服务器正常启动,但它仍然没有记录查询,我希望在日志中看到SELECT CREATE等,但什么都没有出现。我前段时间安装了异常,它可能会困扰常规日志?如果是,如何解决问题?
编辑1以获得答案要求:
ls -la log/ :
totale 26416
drwx------ 2 marco marco 4096 18 giu 13.14 .
drwx------ 15 marco marco 4096 5 lug 10.48 ..
-rw-r--r-- 1 marco marco 27027849 18 lug 12.07 development.log
-rw-r--r-- 1 marco marco 1578 18 giu 13.14 exceptional.log
-rw-r--r-- 1 marco marco 2676 18 giu 13.14 production.log
-rw-r--r-- 1 marco marco 0 18 giu 13.14 test.log
cat ./Gemfile :
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'exceptional' #Logging system in production
group :development, :test do
gem 'railroady'
end
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3-ruby', :require => 'sqlite3'
gem 'paperclip', '~> 2.3'
gem 'aws-s3'
gem 'rails3-jquery-autocomplete'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
# gem 'ruby-debug'
# gem 'ruby-debug19'
# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
# gem 'webrat'
# end
答案 0 :(得分:0)
Ciao Giuseppe, 也许你正在使用一个不记录这种东西的网络服务器,只是
tail -f log/development.log
在一个单独的控制台中。
答案 1 :(得分:0)
尝试将具体的 RAILS_ENV 设置如下:
RAILS_ENV =开发rails服务器