Topic: Rails installed, ADO.rb installed

I still can't connect to a SQL 2000 Server. The application apparently keeps thinking it needs to connect to mySQL

First couple of error lines

c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/vendor/mysql.rb:111:in `real_connect'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:389:in `connect'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:152:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:82:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/mysql_adapter.rb:82:in `mysql_connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:262:in `connection_without_query_cache='
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/query_cache.rb:54:in `connection='
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:230:in `retrieve_connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in `connection'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/base.rb:763:in `columns'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:257:in `column_for'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:116:in `calculate'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/calculations.rb:45:in `count'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/pagination.rb:173:in `count_collection_for_pagination'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/pagination.rb:197:in `paginator_and_collection_for'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/pagination.rb:130:in `paginate'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:108:in `list'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/scaffolding.rb:96:in `index'

I used the rails wiki and this site:
http://justinram.wordpress.com/2006/04/ … ql-server/

but no luck, database.yml says use sqlserver..but I have no clue why it keeps trying to go to mysql

Re: Rails installed, ADO.rb installed

Nevermind, the error isnt gone, but I found another problem.

Re: Rails installed, ADO.rb installed

Hi, I get this same problem.  I'm very new to RoR. Infact just started to use scaffold today.  Please advice.

steps:
1. Created a appication with -database as mysql (it did not let me say sqlserver)
2. Modified the database.yml as per http://justinram.wordpress.com/2006/04/ … l-server/.
3. generated the scaffolds with correct modal name (singular name of the table 'deals').
4. Started the server.
5. browsed to see the error as in append 1.

Last edited by prassana (2007-06-06 07:55:08)

Re: Rails installed, ADO.rb installed

For me it was the spacing in the database.yml file in the config folder. Make sure you don't have any extra spaces or anything. It was that simple. I can connect to SQL2000, and SQL2005 easily now. Still don't have rake working but thats not a big deal.

Re: Rails installed, ADO.rb installed

I actually checked for any spaces. Its all correct and I have 0.1.1 which is latest. So my dev mode config is as below.
--
development:
  adapter: sqlserver
  database: database_name
  host: server_name
  username: user_name
  password: pass_word
--

No extra spaces or tabs.  Do you see anyother problem.

Re: Rails installed, ADO.rb installed

It seems okay, you do have it in the /config folder yea? Being a ruby noob myself I kept saving my file in the /db folder, but when I moved it to config it work, don't know if I am still doing something wrong, but it works.