Trying to follow along with:
http://wiki.rubyonrails.com/rails/show/HowtoUseMultipleDatabases
specifically this code (with my connection specs) in my controller:
ActiveRecord::Base.establish_connection(
:adapter => "mysql",
:host => "localhost",
:username => "mr_roboto",
:password => "secret_secret_i_got_a_secret",
:database => db_name
)
gives the following in the WEBrick console:
#<RuntimeError: bad header ''"adapter_method :
mysql_connection\n"''.>
["c:/ruby/lib/ruby/1.8/webrick/httputils.rb:143:in
''parse_header''",
[ rest of stack trace ]
It looks like the call to establish_connection is stepping on the request
headers?? Why would there be an error parsing http headers trying to make a
database connection?
Or does this method not work with WEBrick?