Forum: Ruby on Rails What happened to mysql connection?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
segabor (Guest)
on 2005-11-16 10:46
(Received via mailing list)
I've been using Rails for more than six months and until today I had
no problem with mysql connection.
It's a Mac OS X 10.4 box having rails installed and updated by gem. I
use a remote mysql server no local instance installed.
Here's my config:

development:
   adapter: mysql
   database: hdchat
   host: 10.0.0.1
   username: webuser
   password:

test:
   adapter: mysql
   database: rails_test
   host: 10.0.0.1
   username: webuser
   password:

production:
   adapter: mysql
   database: hdchat
   host: 10.0.0.1
   username: webuser
   password:

Until today rails with this config ran fine. Today morning I wanted
to continue my work. After starting my app I got the following error:


Errno::ENOENT in <controller not set>#<action not set>

No such file or directory - /tmp/mysql.sock
RAILS_ROOT: ./script/../config/../

Application Trace | Framework Trace | Full Trace
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/vendor/mysql411.rb:43:in `initialize'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/vendor/mysql411.rb:43:in `new'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/vendor/mysql411.rb:43:in `real_connect'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/mysql_adapter.rb:42:in
`mysql_connection'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/abstract/
connection_specification.rb:121:in `send'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/abstract/
connection_specification.rb:121:in `connection_without_query_cache='
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/query_cache.rb:54:in `connection='
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/connection_adapters/abstract/
connection_specification.rb:83:in `retrieve_connection'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:253:in `connection'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:937:in `add_limit!'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:930:in `construct_finder_sql'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:411:in `find'
/opt/local/lib/ruby/gems/1.8/gems/activerecord-1.13.0/lib/
active_record/base.rb:409:in `find'
#{RAILS_ROOT}app/controllers/customer_controller.rb:13:in `pre_check'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:354:in `send'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:354:in `call_filters'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:350:in `each'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:350:in `call_filters'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:339:in `before_action'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/filters.rb:331:in `perform_action_without_benchmark'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/benchmarking.rb:69:in `measure'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/rescue.rb:82:in `perform_action'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/base.rb:365:in `send'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/base.rb:365:in
`process_without_session_management_support'
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/
action_controller/session_management.rb:116:in `process'
/opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:
38:in `dispatch'
/opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:
117:in `handle_dispatch'
/opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:
83:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:144:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:94:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:89:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:89:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:79:in `start'
/opt/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:
69:in `dispatch'
script/server:50
Request

Parameters: None

Show session dump

Response

Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"}


So what the heck is this? The only thing I did prior this that I
downloaded the latest Java 1.5 update to Mac OS X but guess it
wouldn't affect rails setup.
Please help me.
Thanks!

Gábor



"Put your message in a modem and throw it in the Cyber Sea." - N. Peart
Nshbrown N. (Guest)
on 2005-11-16 11:23
(Received via mailing list)
I had this same problem when I had used an IP address instead of using
"localhost" as the hostname on my fedora box, where my IP xx.xx.xx.xx
was
the same as the local server.

Also, you might want to specify a valid test database as well, not sure
if
that would help this specifically, but it very well may :)

Warmest regards,
Nathan.

--------------------------------------------------------------
Nathaniel S. H. Brown                 Toll Free 1.877.4.INIMIT
Inimit Innovations                        Phone   604.724.6624
www.inimit.com                              Fax   604.444.9942
segabor (Guest)
on 2005-11-16 11:41
(Received via mailing list)
On 2005.11.16., at 10:20, Nathaniel S. H. Brown wrote:

> I had this same problem when I had used an IP address instead of using
> "localhost" as the hostname on my fedora box, where my IP
> xx.xx.xx.xx was
> the same as the local server.
>
As I mentioned I don't use local mysql and I don't have it installed
to my machine. The working one is running on a FreeBSD server. Last
night connection had no problem today it does.

"Earth is a beta site."
segabor (Guest)
on 2005-11-16 23:25
(Received via mailing list)
On 2005.11.16., at 9:45, Gábor SEBESTYÉN wrote:

> Until today rails with this config ran fine. Today morning I wanted
> to continue my work. ...:
>
My mistake, sorry.

	Gábor

"Kinek nem inge, ne vegye gatyára ..."
jeremy (Guest)
on 2005-11-16 23:40
(Received via mailing list)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Nov 16, 2005, at 1:22 PM, Gábor SEBESTYÉN wrote:
> On 2005.11.16., at 9:45, Gábor SEBESTYÉN wrote:
>
>> Until today rails with this config ran fine. Today morning I
>> wanted to continue my work. ...:
>>
> My mistake, sorry.

What was the mistake?

jeremy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDe6a3AQHALep9HFYRArj5AKDOusR3ZB7dsuX1boztEMMh3ZMSgQCgzi1M
YN42Y0h/D8+HFWZxqD04miI=
=VvJd
-----END PGP SIGNATURE-----
This topic is locked and can not be replied to.