Hello ! I''m trying to create a rails project from scratch using migrations on SQL Server 2005. Its failing saying : DBI::DatabaseError: Execute OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server Invalid object name ''schema_info''. HRESULT error code:0x80020009 Exception occurred.: SELECT TOP 1 version FROM schema_info My very uneducated guess is that ActiveRecord is trying to access the schema when it hasn''t created it yet. This : http://wiki.rubyonrails.org/rails/pages/UnderstandingMigrations says a schema will be created if it doesn''t exist. Any assistance would be much appreciated. magpie http://jesq.blogspot.com I have a batch file like this : set RAILS_ENV=development rmdir /S /Q adtcentral call rails adtcentral copy /Y build\database.yml adtcentral\config\ osql -E -S localhost\SQLEXPRESS -i build\create.sql -n -e ruby adtcentral\script\generate migration CreateNew ruby utilities.rb GenFirstMig --database=ADTServer --destpath="adtcentral\db\migrate\\" cd adtcentral rake migrate --trace which creates a migrations file like this : class CreateNew < ActiveRecord::Migration def self.up create_table :camera_types, :force => true do |tbl| tbl.column :id, :string tbl.column :make, :string tbl.column :model, :string tbl.column :tv_lines, :string tbl.column :pixels_x, :string tbl.column :pixels_y, :string tbl.column :ccd_size_mm, :string tbl.column :lens_size_mm, :string tbl.column :colour_type, :string tbl.column :iris_type, :string tbl.column :ir_illumination, :string tbl.column :lux_minimum, :string end end def self.down drop_table :camera_types end end database.yml : development: adapter: sqlserver database: adtcentral_dev username: devuser password: devuser34 host: .\SQLEXPRESS mode: DBI:ADO provider: SQLNCLI Here goes : R:\projects\ADT\ADTCentral>actions /build create create app/controllers create app/helpers create app/models create app/views/layouts create config/environments create components create db create doc create lib create lib/tasks create log create public/images create public/javascripts create public/stylesheets create script/performance create script/process create test/fixtures create test/functional create test/integration create test/mocks/development create test/mocks/test create test/unit create vendor create vendor/plugins create tmp/sessions create tmp/sockets create tmp/cache create Rakefile create README create app/controllers/application.rb create app/helpers/application_helper.rb create test/test_helper.rb create config/database.yml create config/routes.rb create public/.htaccess create config/boot.rb create config/environment.rb create config/environments/production.rb create config/environments/development.rb create config/environments/test.rb create script/about create script/breakpointer create script/console create script/destroy create script/generate create script/performance/benchmarker create script/performance/profiler create script/process/reaper create script/process/spawner create script/runner create script/server create script/plugin create public/dispatch.rb create public/dispatch.cgi create public/dispatch.fcgi create public/404.html create public/500.html create public/index.html create public/favicon.ico create public/robots.txt create public/images/rails.png create public/javascripts/prototype.js create public/javascripts/effects.js create public/javascripts/dragdrop.js create public/javascripts/controls.js create public/javascripts/application.js create doc/README_FOR_APP create log/server.log create log/production.log create log/development.log create log/test.log 1 file(s) copied. use master exec sp_password @old = null, @new = ''adt'', @loginame = ''sa'' IF EXISTS(SELECT * FROM sysdatabases WHERE name=''adtcentral_dev'') DROP DATABASE adtcentral_dev; IF EXISTS(SELECT * FROM syslogins WHERE name=''devuser'') EXEC sp_droplogin ''devuser'' CREATE LOGIN devuser WITH PASSWORD = ''devuser34''; CREATE DATABASE adtcentral_dev use adtcentral_dev CREATE USER devuser FOR LOGIN devuser; create db/migrate create db/migrate/001_create_new.rb DBI:ODBC:ADTServer (in R:/projects/ADT/ADTCentral/adtcentral) ** Invoke migrate (first_time) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate rake aborted! DBI::DatabaseError: Execute OLE error code:80040E37 in Microsoft OLE DB Provider for SQL Server Invalid object name ''schema_info''. HRESULT error code:0x80020009 Exception occurred.: SELECT TOP 1 version FROM schema_info c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/abstract_adapter.rb:120:in `log'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:485:in `select'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:238:in `select_one'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:307:in `current_version'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:324:in `current_version'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:388:in `irrelevant_migration?'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:330:in `migrate'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:328:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:328:in `migrate'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:295:in `up'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.rb:286:in `migrate'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/databases.rake:4 c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/tasks/databases.rake:3:in `call'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:387:in `execute'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:364:in `invoke_prerequisites'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:999:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:363:in `invoke_prerequisites'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:350:in `invoke'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `each'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:1906:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7 c:/ruby/bin/rake:18:in `load'' c:/ruby/bin/rake:18 R:\projects\ADT\ADTCentral> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---