Giter VIP home page Giter VIP logo

ruby-mysql's People

Contributors

duerst avatar macks avatar tmtm 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ruby-mysql's Issues

issue when starting the app with ruby-mysql - protocol.rb:569

when i start the rails server (rails server command) i got this issue http://pastie.org/2208134

MySQL ver. 5.1.54-1ubuntu4

/home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:569:in `block in read': invalid packet: sequence number mismatch(3 != 1(expected)) (Mysql::ProtocolError)
    from /home/lndx/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:565:in `read'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:287:in `get_result'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:275:in `query_command'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/ruby-mysql-2.9.4/lib/mysql.rb:332:in `query'
    from /home/lndx/.rvm/gems/ruby-1.9.2-p180@esturistico/gems/activerecord-3.0.0/lib/active_record/connection_adapters/mysql_adapter.rb:287:in `execute'

the problem fixed when i changed the root password (this a dev machine) and instead of using OLD_PASSWORD() method i use the normal PASSWORD() method.. i don't know if this has something to do with the problem, but this solved it..

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('pass'); insted of 
SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('pass');

anyway, close this issue if this is irrelevant thanks :)

Protocol.authenticate expects @charset to be defined

If an error occurs during authentication (in my case the host I connect from is not permitted), the error message is attempted to be decoded.
However, at that time @charset is not yet defined:

Uncaught exception: undefined method `encoding' for nil:NilClass
	C:/Ruby/2.3.0/lib/ruby/gems/2.3.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:502:in `read'
	C:/Ruby/2.3.0/lib/ruby/gems/2.3.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:178:in `authenticate'
	C:/Ruby/2.3.0/lib/ruby/gems/2.3.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:116:in `connect'
	C:/Ruby/2.3.0/lib/ruby/gems/2.3.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:50:in `new'

message.force_encoding(@charset.encoding)

As you can see from the stacktrace the line in method authenticate is 178. However, @charset is not defined before line 185:

init_packet = InitialPacket.parse read
@server_info = init_packet.server_version
@server_version = init_packet.server_version.split(/\D/)[0,3].inject{|a,b|a.to_i*100+b.to_i}
@thread_id = init_packet.thread_id
client_flags = CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_TRANSACTIONS | CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION
client_flags |= CLIENT_CONNECT_WITH_DB if db
client_flags |= flag
@charset = charset
unless @charset
@charset = Charset.by_number(init_packet.server_charset)
@charset.encoding # raise error if unsupported charset
end

I was able to help myself by modifying line 502 to:

message.force_encoding(Mysql::Charset.by_number(33).encoding)

where 33 is the numeric representation of UTF-8:

[ 33, "utf8", "utf8_general_ci", true ],

possible timeout issues

/usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:569:in `block in read': invalid packet: sequence number mismatch(58 != 90(expected)) (Mysql::ProtocolError)
        from /usr/local/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:565:in `read'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:335:in `retr_all_records'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:745:in `initialize'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:366:in `new'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:366:in `store_result'
        from /usr/local/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:348:in `query'
.....output cut for irrelevance.....

OK, so whenever I am doing small queries, it outputs just fine, but the moment I try to query for more information, it fails with this message

Win7

Hallo,

does the library work also with Windows 7? I always get the error:

...Ruby/ruby192p180/lib/ruby/gems/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:212:in `block in initialize': uninitialized constant Mysql::Protocol::UNIXSocket (NameError)

Best regards,

Jean

Mysql#errno and ActiveRecord

I tried to use ruby-mysql with ActiveRecord (not the new version, but it seems the last one suffers from the same problem), and I got an error about Nil class doesn't respond to zero?.

The calling code in question looks like this:

def active?
  ...
  if @connection.respond_to?(:errno)
    @connection.errno.zero?
  else
    true
  end
end

Therefore, I suggest changing Mysql#errno to this:
def errno
@last_error && @last_error.errno || 0
end

Not working with Rails 3.1

Hi,

For your information, ruby-mysql working with Rails 3.0.x but not with 3.1. Failing with below error.

/home/anil/.rvm/gems/ruby-1.9.2-p290@maftool/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:71:in rescue in establish_connection': Please install the mysql adapter:gem install activerecord-mysql-adapter` (mysql is not part of the bundle. Add it to Gemfile.) (RuntimeError)

Not looked into the cause yet but will do later. Please let me know if you know the reason handy.

Thanks,
Anil.

Errno::EPIPE (Broken pipe)

Hi,

I have some problem with ruby-mysql 2.9.3
After restarting the server everything works fine for 5 minutes, then I got the same error again.

Errno::EPIPE (Broken pipe):
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:617:in `flush'
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:617:in `write'
  /usr/lib/ruby/1.8/timeout.rb:53:in `timeout'
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:616:in `write'
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:640:in `simple_command'
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:545:in `synchronize'
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:638:in `simple_command'
  ruby-mysql (2.9.3) lib/mysql/protocol.rb:413:in `statistics_command'
  ruby-mysql (2.9.3) lib/mysql.rb:502:in `stat'
  activerecord (3.0.1) lib/active_record/connection_adapters/mysql_adapter.rb:238:in `active?'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract_adapter.rb:148:in `verify!'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:250:in `checkout_and_verify'
  activesupport (3.0.1) lib/active_support/callbacks.rb:413:in `_run_checkout_callbacks'
  activesupport (3.0.1) lib/active_support/callbacks.rb:93:in `send'
  activesupport (3.0.1) lib/active_support/callbacks.rb:93:in `run_callbacks'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:249:in `checkout_and_verify'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_existing_connection'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:192:in `checkout'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `loop'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `checkout'
  /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:189:in `checkout'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in `connection'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:318:in `retrieve_connection'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in `retrieve_connection'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in `connection'
  activerecord (3.0.1) lib/active_record/query_cache.rb:12:in `cache'
  activerecord (3.0.1) lib/active_record/query_cache.rb:31:in `call'
  activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `call'
  actionpack (3.0.1) lib/action_dispatch/middleware/callbacks.rb:46:in `call'
  activesupport (3.0.1) lib/active_support/callbacks.rb:415:in `_run_call_callbacks'
  actionpack (3.0.1) lib/action_dispatch/middleware/callbacks.rb:44:in `call'
  rack (1.2.1) lib/rack/sendfile.rb:107:in `call'
  actionpack (3.0.1) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
  actionpack (3.0.1) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'
  railties (3.0.1) lib/rails/rack/logger.rb:13:in `call'
  rack (1.2.1) lib/rack/runtime.rb:17:in `call'
  rack (1.2.1) lib/rack/lock.rb:11:in `call'
  rack (1.2.1) lib/rack/lock.rb:11:in `synchronize'
  rack (1.2.1) lib/rack/lock.rb:11:in `call'
  actionpack (3.0.1) lib/action_dispatch/middleware/static.rb:30:in `call'
  railties (3.0.1) lib/rails/application.rb:168:in `call'
  railties (3.0.1) lib/rails/application.rb:77:in `send'
  railties (3.0.1) lib/rails/application.rb:77:in `method_missing'
  thin (1.2.7) lib/thin/connection.rb:76:in `pre_process'
  thin (1.2.7) lib/thin/connection.rb:74:in `catch'
  thin (1.2.7) lib/thin/connection.rb:74:in `pre_process'
  thin (1.2.7) lib/thin/connection.rb:57:in `process'
  thin (1.2.7) lib/thin/connection.rb:42:in `receive_data'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run_machine'
  eventmachine (0.12.10) lib/eventmachine.rb:256:in `run'
  thin (1.2.7) lib/thin/backends/base.rb:57:in `start'
  thin (1.2.7) lib/thin/server.rb:156:in `start'
  thin (1.2.7) lib/thin/controllers/controller.rb:80:in `start'
  thin (1.2.7) lib/thin/runner.rb:177:in `send'
  thin (1.2.7) lib/thin/runner.rb:177:in `run_command'
  thin (1.2.7) lib/thin/runner.rb:143:in `run!'
  thin (1.2.7) bin/thin:6
  /usr/bin/thin:19:in `load'
  /usr/bin/thin:19

My bundle

$ bundle list
Gems included by the bundle:
  * RedCloth (4.2.3)
  * aasm (2.2.0 5d71530)
  * abstract (1.0.0)
  * actionmailer (3.0.1)
  * actionpack (3.0.1)
  * activemodel (3.0.1)
  * activerecord (3.0.1)
  * activeresource (3.0.1)
  * activesupport (3.0.1)
  * acts-as-taggable-on (2.0.6)
  * acts_as_commentable (3.0.0 247df98)
  * ajaxful_rating (3.0.0.beta3 81b563e)
  * arel (1.0.1)
  * authlogic (2.1.3 a087ad0)
  * authlogic-oauth (1.0.8 5416269)
  * babosa (0.2.0)
  * builder (2.1.2)
  * bundler (1.0.0)
  * cancan (1.4.0)
  * daemons (1.0.10)
  * date_validator (0.5.9)
  * delayed_job (2.1.0.pre b52361d)
  * erubis (2.6.6)
  * exception_notification (1.0.0 192a49a)
  * friendly_id (3.1.7)
  * gem_plugin (0.2.3)
  * geokit (1.5.0)
  * i18n (0.4.1)
  * json (1.4.6)
  * mail (2.2.7)
  * mime-types (1.16)
  * mongrel (1.2.0.pre2)
  * newrelic_rpm (2.13.2)
  * nokogiri (1.4.3.1)
  * oauth (0.4.3)
  * paperclip (2.3.4 ef7233d)
  * polyglot (0.3.1)
  * rack (1.2.1)
  * rack-mount (0.6.13)
  * rack-test (0.5.6)
  * rails (3.0.1)
  * rails3-jquery-autocomplete (0.4.0)
  * railties (3.0.1)
  * rake (0.8.7)
  * riddle (1.1.0)
  * ruby-graphviz (0.9.18)
  * ruby-mysql (2.9.3)
  * thinking-sphinx (2.0.0.rc2 108a1fc)
  * thor (0.14.3)
  * treetop (1.4.8)
  * twitter_oauth (0.4.3)
  * tzinfo (0.3.23)
  * will_paginate (3.0.pre3 b1a5bee)

What's wrong ? :S

Thx

Invalid packet: sequence number mismatch

Sorry, I accidentally closed my issue. I am getting this error sometimes, but not on every query. The error seems to occur when the result includes more data; shorter results are OK. I am using MySQL 5.5.8, ruby-mysql 2.9.4. OS-X 10.6.5. Error message follows:

Mysql::ProtocolError: invalid packet: sequence number mismatch(32 != 11(expected)): SELECT * FROM templates WHERE (templates.site_id = 50)

ruby-mysql 2.9.2 betaをインストールしましたが、エラーが起こりました

エラーのログを添付します。
この後mysql-ruby2.8.1をインストールしたところ、エラーは発生せず正常に動きました。

loginname@db1% mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 94160
Server version: 5.1.42-community-log MySQL Community Server (GPL)


loginname@db1% ruby --version
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
loginname@db1% type ruby
ruby is /opt/ruby/bin/ruby
loginname@db1% irb
irb(main):001:0> require 'mysql'
=> true
irb(main):002:0> con = Mysql.connect('ndb', 'user', 'pass', 'migration')
=> #, @sqlstate="00000", @write_timeout=nil, @info=nil, @protocol=#, @charset=#, @sqlstate="00000", @server_version=50142, @write_timeout=nil, @authinfo=["user", "pass", "migration", 0, nil], @gc_stmt_queue=[], @state=:READY, @server_info="5.1.42-community-log", @read_timeout=nil>, @warning_count=0, @local_infile=nil, @read_timeout=nil, @host_info="ndb via TCP/IP", @fields=nil, @affected_rows=nil, @result_exist=false, @connect_timeout=nil>
irb(main):003:0> con.query('select 1')
Mysql::ProtocolError: invalid packet: sequence number mismatch(3 != 1(expected))
        from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/mysql/protocol.rb:569:in `read'
        from /opt/ruby-1.8.7-p72/lib/ruby/1.8/timeout.rb:53:in `timeout'
        from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/mysql/protocol.rb:565:in `read'
        from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/mysql/protocol.rb:287:in `get_result'
        from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/mysql/protocol.rb:275:in `query_command'
        from /opt/ruby-1.8.7-p72/lib/ruby/site_ruby/1.8/mysql.rb:319:in `query'
        from (irb):3
        from :0
irb(main):010:0> Mysql::VERSION
=> 20900

Works remotely but not locally

I can connect to MySQL from a different machine, but when I try to connect on the same one I get:

irb(main):006:0> my = Mysql.connect('localhost', 'mythbackdoor', 'notactuallymypassword')
Errno::ENOENT: No such file or directory - connect(2) for /tmp/mysql.sock
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:150:in `initialize'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:150:in `new'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:150:in `block in initialize'
        from /usr/local/lib/ruby/2.4.0/timeout.rb:76:in `timeout'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql/protocol.rb:147:in `initialize'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:115:in `new'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:115:in `connect'
        from /usr/local/lib/ruby/gems/2.4.0/gems/ruby-mysql-2.9.14/lib/mysql.rb:50:in `new'
        from (irb):6
        from /usr/local/bin/irb:11:in `<main>'

Errno::EPIPE in Mysql::Protocol.write

When I try to connect to a rails app after a while (no other users, using rails 2.3.5, unicorn, ruby-mysql, with mysql server version 5.1.41 using tcp sockets), the first heartbeat (active? call from ActiveRecord's mysql adapter) runs into a broken pipe error.

I haven't found yet why TCPSocket#flush returns EPIPE on FreeBSD, but nevertheless it would be great to have a graceful handling of this error too.

Here's the backtrace:

[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:617:in `flush'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:617:in `block in write'
/usr/local/lib/ruby/1.9/timeout.rb:44:in `timeout'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:616:in `write'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:640:in `block in simple_command'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:545:in `synchronize'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:638:in `simple_command'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:413:in `statistics_command'
[GEM_ROOT]/gems/ruby-mysql-2.9.2/lib/mysql.rb:502:in `stat'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/mysql_adapter.rb:277:in `active?'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract_adapter.rb:150:in `verify!'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:256:in `checkout_and_verify'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:252:in `checkout_existing_connection'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `block (2 levels) in checkout'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `block in checkout'
/usr/local/lib/ruby/1.9/monitor.rb:190:in `mon_synchronize'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call'
[GEM_ROOT]/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/static.rb:33:in `call'
[GEM_ROOT]/gems/rack-bug-0.2.1/lib/rack/bug/toolbar.rb:14:in `call'
[GEM_ROOT]/gems/rack-bug-0.2.1/lib/rack/bug/toolbar.rb:54:in `pass'
[GEM_ROOT]/gems/rack-bug-0.2.1/lib/rack/bug/toolbar.rb:49:in `call'
[GEM_ROOT]/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
[GEM_ROOT]/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call'
[GEM_ROOT]/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call'
[GEM_ROOT]/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/lock.rb:11:in `block in call'
:
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
[GEM_ROOT]/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:106:in `call'
[GEM_ROOT]/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `block in call'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
[GEM_ROOT]/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:634:in `process_client'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:707:in `block in worker_loop'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:705:in `each'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:705:in `worker_loop'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:596:in `block (2 levels) in spawn_missing_workers'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:593:in `fork'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:593:in `block in spawn_missing_workers'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:589:in `each'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:589:in `spawn_missing_workers'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:603:in `maintain_worker_count'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:270:in `start'
[GEM_ROOT]/gems/unicorn-0.97.0/lib/unicorn.rb:29:in `run'
[GEM_ROOT]/gems/unicorn-0.97.0/bin/unicorn_rails:204:in `'
/usr/local/bin/unicorn_rails:19:in `load'
/usr/local/bin/unicorn_rails:19:in `'

and this is my rake gems output (version names added by me):

  • [I] authlogic 2.1.3
    • [R] activesupport 2.3.5
  • [I] cancan 1.0.2
  • [I] workflow 0.3.0
  • [I] haml 2.2.22
  • [I] will_paginate 2.3.12
  • [I] formtastic 0.9.8
    • [R] activesupport 2.3.5
    • [R] actionpack 2.3.5
  • [I] tiny_mce 0.1.2
  • [I] sqlite3-ruby 1.2.5
  • [I] ruby-mysql 2.9.2
  • [I] hoptoad_notifier 2.2.2
    • [R] activesupport 2.3.5
  • [I] newrelic_rpm 2.10.6
  • [I] rack-bug 0.2.1
  • [I] inploy 1.4.1

I'm using unicorn 0.97.0 with ruby 1.9.1p376 built from FreeBSD ports tree.

MySQL server has gone away (Mysql::ClientError::ServerGoneError)

I just upgraded from ruby 2.6 to 3.1.2 and from a mySQL 5 DB to MariaDB 10.6.7

I now get this ServerGoneError when I do a query. I was originally connecting via the loopback interface, but for MariaDB, have switched to using the socket.

As a test, I installed the mysql2 gem, and it works fine with the same code. The only downside is that mysql2 doesn't expose the table names, so if I do switch gems, I will need to rewrite multi-table queries and the code that handles them.

NoMethodError: undefined method `unpack' for nil:NilClass after MySQL server is restarted

接続した後に MySQL サーバを再起動すると表題のエラーが発生します。再現手順と環境は以下の通りです。

% uname -a
Linux precision-debian 2.6.26-2-amd64 #1 SMP Sun Jun 20 20:16:30 UTC 2010 x86_64 GNU/Linux
% ruby -v          
ruby 1.9.3dev (2010-07-07 trunk 28561) [x86_64-linux]

まずirbで接続してそのままにします。

% irb               
ruby-head > require 'mysql'
 => true 
ruby-head > my = Mysql.connect("127.0.0.1", "root", "", "sessions", 3306)
 => #, authinfo["root", "", "sessions", 0, nil], seq3, sqlstate"00000", server_info"5.1.43-1~bpo50+1-log", server_version50143, thread_id628, charset#, charset#, connect_timeoutnil, read_timeoutnil, write_timeoutnil, init_commandnil, affected_rowsnil, warning_count0, sqlstate"00000", query_with_resulttrue, host_info"127.0.0.1 via TCP/IP", infonil, last_errornil, result_existfalse, local_infilenil 
ruby-head > my.stat
 => "Uptime: 355595  Threads: 2  Questions: 24843  Slow queries: 634  Opens: 2128  Flush tables: 1  Open tables: 63  Queries per second avg: 0.69" 

別のターミナルでMySQLサーバを再起動します。

% sudo invoke-rc.d mysql restart
[sudo] password for ogawa: 
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . ..
Checking for corrupt, not cleanly closed and upgrade needing tables..

再び irb で mysql.stat を実行するとエラーになります。

ruby-head > my.stat
NoMethodError: undefined method `unpack' for nil:NilClass
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb:567:in `block in read'
    from /home/ogawa/.rvm/rubies/ruby-head/lib/ruby/1.9.1/timeout.rb:44:in `timeout'
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb:565:in `read'
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb:641:in `block in simple_command'
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb:545:in `synchronize'
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb:638:in `simple_command'
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql/protocol.rb:413:in `statistics_command'
    from /home/ogawa/.rvm/gems/ruby-head/gems/ruby-mysql-2.9.3/lib/mysql.rb:502:in `stat'
    from (irb):5
    from /home/ogawa/.rvm/rubies/ruby-head/bin/irb:17:in `'

MySQL::Protocol#readの @sock.read(4) が nil になるのが原因のようです。
エラーはともかく、NoMethodErrorでは何が起こったのかわかりにくいので、nil なら Errno::EPIPE: Broken pipe になるなどの対策をお願いしたいところです。

Mysql.connect should raise an exception when a connection flag has CLIENT_COMPRESS

Ruby/MySQL is nice library, but it doesn't support compression protocol feature. If CLIENT_COMPRESS was passed to a connection flag, it will be handed over to MySQL server, and caused strange errors.

Here's example:

 $ bundle console
ruby-1.9.2-p136 :001 > require 'mysql'
 => true
ruby-1.9.2-p136 :002 > conn = Mysql.new('localhost', 'root', '', nil, nil, 'db/mysql/run/mysqld.sock', Mysql::CLIENT_COMPRESS)
 => #<Mysql:0x000000016686d0 @fields=nil, @protocol=#<Mysql::Protocol:0x0000000165eb80 @gc_stmt_queue=[], @state=:READY, @read_timeout=nil, @write_timeout=nil, @sock=#<UNIXSocket:fd 3>, @authinfo=["root", "", nil, 32, nil], @seq=3, @sqlstate="00000", @server_info="5.1.49-3-log", @server_version=50149, @thread_id=649, @charset=#<Mysql::Charset:0x00000000ce9b68 @csname="latin1_swedish_ci", @name="latin1", @number=8, @unsafe=false>>, @charset=#<Mysql::Charset:0x00000000ce9b68 @csname="latin1_swedish_ci", @name="latin1", @number=8, @unsafe=false>, @connect_timeout=nil, @read_timeout=nil, @write_timeout=nil, @init_command=nil, @affected_rows=nil, @warning_count=0, @sqlstate="00000", @query_with_result=true, @host_info="Localhost via UNIX socket", @info=nil, @last_error=nil, @result_exist=false, @local_infile=nil>
ruby-1.9.2-p136 :003 > conn.query('select 0')
 => nil
ruby-1.9.2-p136 :004 > conn.query('select 0')
Mysql::ClientError::ServerGoneError: The MySQL server has gone away
        from /home/macks/app/trunk/gems/ruby/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:623:in `rescue in write'
        from /home/macks/app/trunk/gems/ruby/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:601:in `write'
        from /home/macks/app/trunk/gems/ruby/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql/protocol.rb:275:in `query_command'
        from /home/macks/app/trunk/gems/ruby/1.9.1/gems/ruby-mysql-2.9.4/lib/mysql.rb:332:in `query'
        from (irb):4
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler/cli.rb:438:in `console'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/bin/bundle:19:in `load'
        from /home/macks/.rvm/gems/ruby-1.9.2-p136/bin/bundle:19:in `<main>'
ruby-1.9.2-p136 :005 >

Because the exception message doesn't indicate true reason of the problem, it is a bit difficult to solve. I had encountered this problem when I used Sequel, and it took few hours to find the reason.

So I propose that Mysql.connect raises an exception when CLIENT_COMPRESS is in the connection flag. I think it's useful for clarifying the problem.

Invalid packet: sequence number mismatch

Sorry, I am getting this error sometimes, but not on every query. The error seems to occur when the result includes more data; shorter results are OK. I am using MySQL 5.5.8, ruby-mysql 2.9.4. OS-X 10.6.5. Error message and stack trace follow:

Mysql::ProtocolError: invalid packet: sequence number mismatch(32 != 11(expected)): SELECT * FROM `templates` WHERE (`templates`.site_id = 50) 
====================================
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log_without_newrelic_instrumentation'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:319:in `execute'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:604:in `select'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:661:in `find_by_sql_without_trace_ActiveRecord___self_name__find_by_sql'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:1548:in `find_every'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:615:in `find'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:60:in `find'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:400:in `find_target'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:354:in `load_target'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:212:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/Users/markfrommer/Projects/cmss/app/views/pages/index.html.haml:22:in `_run_haml_app47views47pages47index46html46haml'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:490:in `fields_for'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:1033:in `fields_for_nested_model'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:1024:in `fields_for_with_nested_attributes'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `map'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:1023:in `fields_for_with_nested_attributes'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:964:in `fields_for'
/Users/markfrommer/Projects/cmss/app/views/pages/index.html.haml:16:in `_run_haml_app47views47pages47index46html46haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:229:in `call'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:229:in `form_for'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers.rb:588:in `call'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers.rb:588:in `haml_bind_proc'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:490:in `fields_for'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:282:in `form_for_without_haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:235:in `form_for'
/Users/markfrommer/Projects/cmss/app/views/pages/index.html.haml:8:in `_run_haml_app47views47pages47index46html46haml'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/renderable.rb:34:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/renderable.rb:34:in `render_without_trace_View___path__Rendering'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:301:in `with_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/renderable.rb:30:in `render_without_trace_View___path__Rendering'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/template.rb:199:in `render_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:260:in `render_without_haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:13:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:343:in `_render_with_layout'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:257:in `render_without_haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:13:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1250:in `render_for_file'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:945:in `render_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:51:in `render'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:51:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1326:in `default_render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1332:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action_without_newrelic_trace'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process_without_compass'
/Library/Ruby/Gems/1.8/gems/compass-0.10.6/lib/compass/app_integration/rails/actionpack2/action_controller.rb:7:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'

/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb:52:in `log'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb:50:in `log'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `find_by_sql'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `find_by_sql'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:138:in `perform_action'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:122:in `perform_action'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:38:in `trace_method_execution_no_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:117:in `perform_action'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:87:in `dispatch'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:121:in `_call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:34:in `run'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
script/server:3

/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log_without_newrelic_instrumentation'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb:52:in `log'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb:50:in `log'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:319:in `execute'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:604:in `select'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:661:in `find_by_sql_without_trace_ActiveRecord___self_name__find_by_sql'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `find_by_sql'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `find_by_sql'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:1548:in `find_every'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:615:in `find'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:60:in `find'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:400:in `find_target'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:354:in `load_target'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:212:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/Users/markfrommer/Projects/cmss/app/views/pages/index.html.haml:22:in `_run_haml_app47views47pages47index46html46haml'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:490:in `fields_for'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:1033:in `fields_for_nested_model'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:1024:in `fields_for_with_nested_attributes'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `map'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:219:in `method_missing'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:369:in `method_missing'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:1023:in `fields_for_with_nested_attributes'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:964:in `fields_for'
/Users/markfrommer/Projects/cmss/app/views/pages/index.html.haml:16:in `_run_haml_app47views47pages47index46html46haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:229:in `call'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:229:in `form_for'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers.rb:588:in `call'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers.rb:588:in `haml_bind_proc'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:490:in `fields_for'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/helpers/form_helper.rb:282:in `form_for_without_haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:235:in `form_for'
/Users/markfrommer/Projects/cmss/app/views/pages/index.html.haml:8:in `_run_haml_app47views47pages47index46html46haml'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/renderable.rb:34:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/renderable.rb:34:in `render_without_trace_View___path__Rendering'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:301:in `with_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/renderable.rb:30:in `render_without_trace_View___path__Rendering'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/template.rb:199:in `render_template'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:260:in `render_without_haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:13:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:343:in `_render_with_layout'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_view/base.rb:257:in `render_without_haml'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/haml/helpers/action_view_mods.rb:13:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1250:in `render_for_file'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:945:in `render_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:51:in `render'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:51:in `render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1326:in `default_render'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:1332:in `perform_action_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:617:in `call_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.4/lib/active_support/core_ext/benchmark.rb:17:in `ms'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/flash.rb:146:in `perform_action_without_newrelic_trace'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:138:in `perform_action'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:122:in `perform_action'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:38:in `trace_method_execution_no_scope'
/Users/markfrommer/Projects/cmss/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:117:in `perform_action'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `send'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:532:in `process_without_filters'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/filters.rb:606:in `process_without_compass'
/Library/Ruby/Gems/1.8/gems/compass-0.10.6/lib/compass/app_integration/rails/actionpack2/action_controller.rb:7:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:391:in `process'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/base.rb:386:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/routing/route_set.rb:437:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:87:in `dispatch'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:121:in `_call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:29:in `call'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
/Library/Ruby/Gems/1.8/gems/haml-edge-3.1.79/lib/sass/plugin/rack.rb:41:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in `call'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/reloader.rb:34:in `run'
/Library/Ruby/Gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in `call'
/Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call'
/Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:17:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/chunked.rb:15:in `call'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:64:in `process'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/mongrel.rb:34:in `run'
/Library/Ruby/Gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:29:in `require'
script/server:3

Invalid packet: f1="\x0F\...

I have ruby-mysql installed on OS X and I am trying to connect to my local mysql server, but I am getting the following packet error whenever I try to access a web page using my local server. Please help me with this - it has already stopped me for two days!

database.yml:
defaults: &defaults
adapter: mysql
socket: /tmp/mysql.sock
username: root
password: my_password
host: localhost
development:
<<: *defaults
database: project_dev
test:
<<: *defaults
database: project_test
production:
<<: *defaults
database: applyco_production

Mysql::ProtocolError
Invalid packet: f1="\x0F\x80\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
ruby-mysql (2.9.3) lib/mysql/protocol.rb:666:in 'parse'
ruby-mysql (2.9.3) lib/mysql/protocol.rb:238:in 'authenticate'
ruby-mysql (2.9.3) lib/mysql.rb:111:in 'connect'
activerecord (3.0.1) lib/active_record/connection_adapters/mysql_adapter.rb:600:in 'connect'
activerecord (3.0.1) lib/active_record/connection_adapters/mysql_adapter.rb:164:in 'initialize'
activerecord (3.0.1) lib/active_record/connection_adapters/mysql_adapter.rb:36:in 'new'
activerecord (3.0.1) lib/active_record/connection_adapters/mysql_adapter.rb:36:in 'mysql_connection'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:230:in 'new_connection'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:238:in 'checkout_new_connection'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:194:in 'block (2 levels) in checkout'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in 'loop'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in 'block in checkout'
/Users/sscirrus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/monitor.rb:201:in 'mon_synchronize'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:189:in 'checkout'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:96:in 'connection'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:318:in 'retrieve_connection'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:97:in 'retrieve_connection'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_specification.rb:89:in 'connection'
activerecord (3.0.1) lib/active_record/query_cache.rb:12:in 'cache'
activerecord (3.0.1) lib/active_record/query_cache.rb:31:in 'call'
activerecord (3.0.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in 'call'
actionpack (3.0.1) lib/action_dispatch/middleware/callbacks.rb:46:in 'block in call'
activesupport (3.0.1) lib/active_support/callbacks.rb:415:in '_run_call_callbacks'
actionpack (3.0.1) lib/action_dispatch/middleware/callbacks.rb:44:in 'call'
rack (1.2.1) lib/rack/sendfile.rb:107:in 'call'
actionpack (3.0.1) lib/action_dispatch/middleware/remote_ip.rb:48:in 'call'
actionpack (3.0.1) lib/action_dispatch/middleware/show_exceptions.rb:46:in 'call'
railties (3.0.1) lib/rails/rack/logger.rb:13:in 'call'
rack (1.2.1) lib/rack/runtime.rb:17:in 'call'
activesupport (3.0.1) lib/active_support/cache/strategy/local_cache.rb:72:in 'call'
rack (1.2.1) lib/rack/lock.rb:11:in 'block in call'
internal:prelude:10:in 'synchronize'
rack (1.2.1) lib/rack/lock.rb:11:in 'call'
actionpack (3.0.1) lib/action_dispatch/middleware/static.rb:30:in 'call'
railties (3.0.1) lib/rails/application.rb:168:in 'call'
railties (3.0.1) lib/rails/application.rb:77:in 'method_missing'
railties (3.0.1) lib/rails/rack/log_tailer.rb:14:in 'call'
rack (1.2.1) lib/rack/content_length.rb:13:in 'call'
rack (1.2.1) lib/rack/handler/webrick.rb:52:in 'service'
/Users/sscirrus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:111:in 'service'
/Users/sscirrus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/httpserver.rb:70:in 'run'
/Users/sscirrus/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/webrick/server.rb:183:in 'block in start_thread'

Faithfully,
SSCirrus

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.