Error message after upgrading ruby

hi
first off all a happy new year to you all.
I’m using netbeans 6 and ruby 2.02.
at this point I get my index page in my view in this format
index.html.erb and not like before index.rhtml
when I enter localhost:3000/lijsten/index I get the following error
message

Errno::EBADF in LijstenController#index

Bad file descriptor - connect(2)

RAILS_ROOT: D:/Documenten/NetBeansProjects/RailsApplication1
Application Trace | Framework Trace | Full Trace

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:111:in initialize' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ vendor/mysql.rb:111:innew’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:111:in real_connect' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/mysql_adapter.rb:471:inconnect’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:165:in initialize' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/mysql_adapter.rb:88:innew’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in mysql_connection' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:insend’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
connection=' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:inretrieve_connection’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
connection' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:incache’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:677:in perform_action' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:524:insend’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in process_without_filters' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ filters.rb:685:inprocess_without_session_management_support’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
session_management.rb:123:in process' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:388:inprocess’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:171:in handle_request' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:115:indispatch’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:126:in dispatch_cgi' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:9:indispatch’
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in handle_dispatch' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:inservice’
C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:instart’
C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:instart’
C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in each' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:instart’
C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in start' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:instart’
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:in
dispatch' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ webrick.rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:496:inrequire’
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in new_constants_in' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:496:inrequire’
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:111:in initialize' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ vendor/mysql.rb:111:innew’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:111:in real_connect' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/mysql_adapter.rb:471:inconnect’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:165:in initialize' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/mysql_adapter.rb:88:innew’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/mysql_adapter.rb:88:in mysql_connection' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:291:insend’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:291:in
connection=' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:259:inretrieve_connection’
C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:78:in
connection' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/ query_cache.rb:8:incache’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
caching.rb:677:in perform_action' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:524:insend’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
base.rb:524:in process_without_filters' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ filters.rb:685:inprocess_without_session_management_support’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
session_management.rb:123:in process' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ base.rb:388:inprocess’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:171:in handle_request' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:115:indispatch’
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/
dispatcher.rb:126:in dispatch_cgi' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/ dispatcher.rb:9:indispatch’
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:
112:in handle_dispatch' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:78:inservice’
C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in service' C:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:inrun’
C:/ruby/lib/ruby/1.8/webrick/server.rb:173:in start_thread' C:/ruby/lib/ruby/1.8/webrick/server.rb:162:instart’
C:/ruby/lib/ruby/1.8/webrick/server.rb:162:in start_thread' C:/ruby/lib/ruby/1.8/webrick/server.rb:95:instart’
C:/ruby/lib/ruby/1.8/webrick/server.rb:92:in each' C:/ruby/lib/ruby/1.8/webrick/server.rb:92:instart’
C:/ruby/lib/ruby/1.8/webrick/server.rb:23:in start' C:/ruby/lib/ruby/1.8/webrick/server.rb:82:instart’
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/webrick_server.rb:62:in
dispatch' C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/servers/ webrick.rb:66 C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:ingem_original_require’
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:496:inrequire’
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/
dependencies.rb:342:in new_constants_in' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/ dependencies.rb:496:inrequire’
C:/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require' C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire’
script/server:3

Request

Parameters:

None

Show session dump


flash: !map:ActionController::Flash::FlashHash {}

Response

Headers:

{“cookie”=>[],
“Cache-Control”=>“no-cache”}

do you know how I can solve this issue
thanks for your feedback
kind regards

Paul

There is not ruby 2.0.2, you mean Rails 2.0.2. What version of Ruby
are you using. What os? What plugins? Most people use the new mongrel
for development, it comes up automatically. Do you have a reason for
using Webbrick? If it is coming up automatically without you
specifying it then there may be a bug in your configuration.

f

I use Rails 2.02 ruby 1.86 with netbeans on windows vista business and
netbeans uses webbrick automaticly.
Paul

fredistic wrote:


View this message in context:
http://www.nabble.com/error-message-after-upgrading-ruby-tp14594898p14595332.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.

I don’t have Vista or netbeans so I cannot try to reproduce. Best of
luck.
Would it be hard for you to try running script/server from the command
line and seeing what comes up and how it works, or would netbeans
interfere with that? I have no idea.

f

Netbeans won’t interfere. and I have the same error message

You’d usually get this error if your mysql server was down. Can you show
us
your database.yml file? We don’t need to see your password, just the
adapter, host and socket will do.

The stack trace gives you lots of useful information. The first line
tells you where to look:

C:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/
vendor/mysql.rb:111:in `initialize’

Go to line 111 in that file, and you’ll see:

  sock = TCPSocket::new(host,

port||ENV[“MYSQL_TCP_PORT”]||(Socket::getservbyname(“mysql”,“tcp”)
rescue MYSQL_PORT))

Looks like you’re not connecting to your mysql server.


James M. | [email protected]
Ruby and Ruby on Rails consulting
blog.restphone.com

I use Rails 2.0.2 and ruby 1.8.6 with netbeans on windows vista business and netbeans uses webbrick automatically.

NetBeans uses Rails’ defaults, which is to use Mongrel if it’s
available, and otherwise Webrick. Thus, if you’ve gem intalled
mongrel, NetBeans should be using it.