Error: uninitialized constant Mysql::Protocol::UNIXSocket

S

Shahab Qadeer

/!\ FAILSAFE /!\ Wed Feb 03 23:02:50 +0500 2010
Status: 500 Internal Server Error
uninitialized constant Mysql::protocol::UNIXSocket
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:105:in
`const_missing'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:212:in
`initialize'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql/protocol.rb:209:in
`initialize'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql.rb:110:in
`new'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql.rb:110:in
`connect'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:585:in
`connect'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:199:in
`initialize'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:71:in
`new'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:71:in
`mysql_connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in
`new_connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in
`checkout_new_connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in
`checkout'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`loop'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in
`checkout'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/monitor.rb:242:in `mon_synchronize'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in
`checkout'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in
`connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in
`retrieve_connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in
`retrieve_connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in
`connection'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in
`cache'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/head.rb:9:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/reloader.rb:34:in
`run'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/static.rb:31:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:48:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
`each'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/rack/log_tailer.rb:17:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in
`call'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in
`service'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/httpserver.rb:104:in
`service'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:173:in
`start_thread'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:162:in `start'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:162:in
`start_thread'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:95:in `start'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:92:in `each'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:92:in `start'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:23:in `start'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/1.8/webrick/server.rb:82:in `start'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in
`run'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:111
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/commands/server.rb:31:in
`require'
C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
script\server:3
 
S

Shahab Qadeer

Can someone faced this error before. I have just configured the
application until now.

It seems to me like that something is wrong with MySQL connection. But I
am not sure. Please help
 
E

Eric Christopherson

Can someone faced this error before. I have just configured the
application until now.

It seems to me like that something is wrong with MySQL connection. But I
am not sure. Please help

It appears you're running on Windows, which doesn't have Unix sockets.
Sorry, I don't know how to fix your problem.
 
J

Jonathan Nielsen

It appears you're running on Windows, which doesn't have Unix sockets.
Sorry, I don't know how to fix your problem.
On Windows, tell MySQL to connect to '127.0.0.1' instead of
'localhost' to force the use of a TCP socket instead of unix sockets.

-Jonathan Nielsen
 
C

Charles Oliver Nutter

/!\ FAILSAFE /!\ =C2=A0Wed Feb 03 23:02:50 +0500 2010
=C2=A0Status: 500 Internal Server Error
=C2=A0uninitialized constant Mysql::protocol::UNIXSocket
=C2=A0 =C2=A0C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/acti= ve_support/dependencies.rb:105:in
`const_missing'
=C2=A0 =C2=A0C:/Program Files/NetBeans
6.8/ruby2/jruby-1.4.0/lib/ruby/gems/1.8/gems/ruby-mysql-2.9.2/lib/mysql/p= rotocol.rb:212:in
`initialize'

This looks like the ruby-mysql gem (which I assume is the pure-ruby
mysql driver) depends on UNIXSocket, which is obviously not available
on Windows.

Perhaps you're using the default Rails configuration that tries to use
unix sockets instead of a real socket? Try changing the config to
specify a host name instead of a UNIX socket file.

- Charlie
 
R

raronas

This looks like the ruby-mysql gem (which I assume is the pure-ruby
mysql driver) depends on UNIXSocket, which is obviously not available
on Windows.

Perhaps you're using the default Rails configuration that tries to use
unix sockets instead of a real socket? Try changing the config to
specify a host name instead of a UNIX socket file.

- Charlie

Hello,
How do I do this?
MySQL works for other languages in my PC, for PHP for example, how do
I confgiure this with ruby on rails? in which config file?
thanks!
 
L

Luis Lavena

Hello,
How do I do this?
MySQL works for other languages in my PC, for PHP for example, how do
I confgiure this with ruby on rails? in which config file?
thanks!

Please provide details about the ruby implementation and version
you're using.

Also, the operating system and the version of mysql you're trying to
connect with.

With that information, we can help you out figuring out which
component needs to be replaced and guide you on the right direction.
 
C

Charles Oliver Nutter

Hello,
How do I do this?
MySQL works for other languages in my PC, for PHP for example, how do
I confgiure this with ruby on rails? in which config file?
thanks!

It would be in your database.yml file.

- Charlie
 
R

raronas

Please provide details about the ruby implementation and version
you're using.

Also, the operating system and the version of mysql you're trying to
connect with.

With that information, we can help you out figuring out which
component needs to be replaced and guide you on the right direction.

Hello,
in database.yml I have this:

development:
adapter: mysql
encoding: utf8
database: dancemove_development
pool: 5
username: root
password: xxxxx
host: localhost

I'm using netbeans 6.8, I have Windows 7 Professional, Trying to use
MySQL 5.0,
have ruby 1.8.6 and rails 2.0.2.
Thanks!
 
R

raronas

Hello,
in database.yml I have this:

development:
  adapter: mysql
  encoding: utf8
  database: dancemove_development
  pool: 5
  username: root
  password: xxxxx
  host: localhost

I'm using netbeans 6.8, I have Windows 7 Professional, Trying to use
MySQL 5.0,
have ruby 1.8.6 and rails 2.0.2.
Thanks!

Hello fellas!
Does anybody know something about this error? It's really annoying I
can't set it up correctly on my PC.
Thanks!!!
 
J

Jonathan Nielsen

Hello fellas!
Does anybody know something about this error? It's really annoying I
can't set it up correctly on my PC.
Thanks!!!

Just a possibility, try changing 'host' from localhost to 127.0.0.1 so
it uses a TCPSocket instead of a UNIXSocket.

-Jonathan Nielsen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,717
Messages
2,569,382
Members
44,704
Latest member
FawnBernay

Latest Threads

Top