Giter VIP home page Giter VIP logo

sql-logging's People

Contributors

airhorns avatar ar31an avatar hiroprot avatar jjuliano avatar mcordell avatar mtyeh411 avatar rafaelfranca avatar sjmadsen avatar tjoyal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sql-logging's Issues

Syntax error?

sql-logging-3.0.2/lib/sql-logging/logged_query.rb:23: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' (SyntaxError)
when :sql: @Sql

Using ruby 1.9.2 and rails 3.0.3

Out of box error

I installed the gem and put gem 'sql-logging' in my gem file. When I booted up the server I get the following error:

/home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging/statistics.rb:5:in <class:Helper>': uninitialized constant SqlLogging::Helper::Singleton (NameError) from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging/statistics.rb:4:inmodule:SqlLogging'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging/statistics.rb:3:in <top (required)>' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging/railtie.rb:1:inrequire'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging/railtie.rb:1:in <top (required)>' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging.rb:1:inrequire'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/sql-logging-3.0.3/lib/sql-logging.rb:1:in <top (required)>' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:inrequire'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in block (2 levels) in require' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:ineach'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in block in require' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:ineach'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in require' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler.rb:120:inrequire'
from /home/jthullbery/Documents/teladoc/netsoft/business/config/application.rb:7:in <top (required)>' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:28:inrequire'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:28:in block in <top (required)>' from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:intap'
from /home/jthullbery/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'

Rails 5.1 - undefined method `alias_method_chain'

alias_method_chain is now deprecated and no longer works in Rails 5.1; therefore the gem is incompatible with Rails 5.1. There is at least one place where it is using the deprecated method, and it needs to be refactored to use an alternative. For reference this is the error when trying to use sql-logging with rails 5.1:

/Users/fabiano/.rvm/gems/ruby-2.3.1@clouddentistry/gems/sql-logging-3.0.10/lib/sql-logging/adapters/cache_extension.rb:20:in `<module:QueryCache>': undefined method `alias_method_chain' for ActiveRecord::ConnectionAdapters::QueryCache:Module (NoMethodError)
Did you mean?  alias_method

I'm taking a look at the code and maybe I can create a PR to fix it. Is this gem still maintained?

There are no automated tests

The gem has no automated tests to ensure that it works properly with the various versions of Rails it claims to support.

No backtraces for Rails 5

Hi there!

First of all thanks for this gem, it's been my trusty tool for some 3 years!

Lately I started using it for Rails 5 and I noticed it doesn't backtrace the origin code path for a given query, anymore

What could have changed with Rails 5?

backtrace doesn't show the line of code executing the query

I run it 'out of the box' and got this:

2.1.1-railsexpress :004 > job.save
   (28.9ms)  BEGIN
    7 rows, 258 Bytes

  Jail Load (31.6ms)  SELECT  "jails".* FROM "jails" WHERE "jails"."email" = $1 LIMIT 1  [["email", "[email protected]"]]
    0 rows, 0 Bytes

    5 rows, 178 Bytes

    1 row, 2 Bytes

  Skill Load (30.8ms)  SELECT "skills".* FROM "skills" INNER JOIN "job_skills" ON "skills"."id" = "job_skills"."skill_id" WHERE "job_skills"."job_id" = $1  [["job_id", 27]]
    1 row, 74 Bytes

    6 rows, 227 Bytes

   (28.3ms)  ROLLBACK
 => false
2.1.1-railsexpress :005 >

On Rails 4.2.0 with PostgreSQL.

Am I doing something wrong?

Conflicting info on Rails versions supported

The README states that

This gem is for Rails 4+ only. It supports MySQL (including the mysql2 gem), PostgreSQL and SQLite.

but the repo's tagline states

Adds SQL analysis and debugging information to Rails 3.x, 4.x apps.

I suspect the README is correct and the tagline is false, but

  1. I would like to know for sure (as would other users, I'm sure), and
  2. Most users are not likely to ever read the README after seeing the tagline, and reading that it only supports ancient versions of Rails.

Rails 3.2 and/or Postgresql compatibility issue

I'm running Ruby 1.9.2 on Rails 3.2.0 against Postgresql.

After adding this Gem to my Gemfile, and bundle install, bundle exec rails server, I am greeted with the wonderful message:

  /Users/me/.rvm/gems/ruby-1.9.2-p290@name/gems/sql-logging-3.0.6/lib/sql-logging/adapters/postgresql.rb:7:in `block in   execute_with_sql_logging': undefined local variable or method `name' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x007faac69e44b8> (NameError)

And then my application crashes.

Nice idea, but not compatible with 3.1

Of at leas 3.1.3 gives me this error:

ArgumentError in OwnersController#show

wrong number of arguments (3 for 2)

Rails.root: /var/web/kub.cz/ucet/sites/ucet-test
Application Trace | Framework Trace | Full Trace

activerecord (3.1.3) lib/active_record/connection_adapters/abstract/database_statements.rb:18:in select' activerecord (3.1.3) lib/active_record/connection_adapters/abstract/database_statements.rb:18:inselect_all'
activerecord (3.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in select_all' activerecord (3.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:75:incache_sql'
activerecord (3.1.3) lib/active_record/connection_adapters/abstract/query_cache.rb:61:in `select_all'

any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.