Ruby on rails Rails不记录数据库查询
我在development.rb中设置了以下行:Ruby on rails Rails不记录数据库查询,ruby-on-rails,debugging,logging,Ruby On Rails,Debugging,Logging,我在development.rb中设置了以下行: config.log_level = :debug 服务器正常启动,但仍然没有记录查询,我希望在日志中看到SELECT CREATE etc,但没有显示任何内容。我前一段时间安装了Exception,有没有可能会干扰常规日志?如果是,如何解决问题 根据答案的要求编辑1: ls -la log/ : totale 26416 drwx------ 2 marco marco 4096 18 giu 13.14 . drwx------
config.log_level = :debug
服务器正常启动,但仍然没有记录查询,我希望在日志中看到SELECT CREATE etc,但没有显示任何内容。我前一段时间安装了Exception,有没有可能会干扰常规日志?如果是,如何解决问题
根据答案的要求编辑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
再见,朱塞佩,
也许您使用的web服务器不记录此类内容,只是
tail -f log/development.log
在单独的控制台中。尝试设置特定的RAILS\u ENV,如下所示:
RAILS\u ENV=开发RAILS服务器
但是不幸的是development.log没有记录我在environment.rb中设置的查询。什么都没有改变:如何在开发模式下运行rails应用程序?你能做一些事情吗:1。ls-la log/2。cat./gemfile一切正常,development.log已就位,容量为27Mb。似乎异常的gem从日志中捕获SQL查询。尝试将gem“Exception”转移到生产组