[Ironruby-core] Getting up and running with ActiveRecord + Sqlserver

Ivan Porto Carrero ivan at whiterabbitconsulting.eu
Fri Feb 19 15:24:27 EST 2010


could I see your database.yml file?
---
Met vriendelijke groeten - Best regards - Salutations
Ivan Porto Carrero
Blog: http://flanders.co.nz
Twitter: http://twitter.com/casualjim
Author of IronRuby in Action (http://manning.com/carrero)



On Fri, Feb 19, 2010 at 12:24 PM, Scott Holden <sholde4 at gmail.com> wrote:

> I'm trying to follow the example given at
> http://ironruby.net/Documentation/Real_Ruby_Applications/Rails for getting
> ActiveRecord up and running.  Whenever I try to run a migration, I'm getting
> this error.  Could anyone point me in the right direction?  I'm trying to
> get a simple rails app up and running, then I want to start trying to get
> Redmine working on IronRuby.  Redmine is my company's only internal Rails
> app at the  moment, but I'd like to use it as a way to get people started
> using IronRuby.  It would be a great way to integrate a Rails application
> with our internal ORM and create a Redmine plugin to tie into our deployment
> system.
>
> Here's my trace from rake db:migrate
>
> C:\Documents and Settings\sholden\My
> Documents\NetBeansProjects\redmine>irake db:migrate --trace
> (in C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine)
> ** Invoke db:migrate (first_time)
> ** Invoke environment (first_time)
> ** Execute environment
> rake aborted!
> undefined method `columns' for :ado:Symbol
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:862:in`raw_select'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:827:in`select'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in`select_all'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/query_cache.rb:62:in`select_all_with_query_cache'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:13:in`select_one'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:19:in`select_value'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1448:in`silence'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:847:in`info_schema_query'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:215:in`database_version'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:219:in
> `database_year'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-sqlserver-adapter-2.3.4/lib/active_record/connection_adapters/sqlserver_adapter.rb:191:in`initialize'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/ironruby-sqlserver-0.1.0/lib/activerecord-sqlserver-adapter/adonet_patch.rb:36:in`sqlserver_connection'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in`new_connection'
> :0:in `__send__'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in`checkout_new_connection'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in`checkout'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in`checkout'
> :0:in `loop'
> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/monitor.rb:242:in`mon_synchronize'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in`checkout'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in`connection'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in`retrieve_connection'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in`retrieve_connection'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in`connection'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:217:in
> `quoted_left_column_name'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb:93:in
> `acts_as_nested_set'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/app/models/project.rb:54
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:
> in `load_file'
> :0:in `load'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:
> in `load_file'
> dependencies.rb:490:in `new_constants_in'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:
> in `require_or_load'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in
> `require_or_load_with_engine_additions'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> dependencies.rb:398:in `load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:98:in`const_missing'
> :0:in `__send__'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/app/models/attachment.rb:31
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file'
> :0:in `load'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379
> :in `load_file'
> dependencies.rb:490:in `new_constants_in'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in
> `require_or_load_with_engine_additions'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:437:in`load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/vendor/plugins/acts_as_attachable/lib/acts_as_attachable.rb:32:in
> `acts_as_attachable'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/app/models/message.rb:22
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:380:in`load_file'
> :0:in `load'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:379:in`load_file'
> dependencies.rb:490:in `new_constants_in'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:259:in`require_or_load'
> C:/Documents and Settings/sholden/My
> Documents/NetBeansProjects/redmine/vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb:132:in
> `require_or_load_with_engine_additions'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:425:in`load_missing_constant'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in`const_missing_with_dependencies'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:92:in`const_missing'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:157:in`observed_class'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:183:in`observed_classes'
> inflector.rb:360:in `constantize'
> :0:in `each'
> inflector.rb:355:in `constantize'
> inflections.rb:161:in `constantize'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:166:in`initialize'
> C:/Program Files/IronRuby 0.9.4.0/lib/ruby/1.8/singleton.rb:94
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:38:in`instantiate_observers'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/observer.rb:36:in`instantiate_observers'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in`define_dispatcher_callbacks<http://0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:15:in%60define_dispatcher_callbacks>
> '
> :0:in `each'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in`evaluate_method<http://0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:182:in%60evaluate_method>
> '
> :0:in `[]'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in`call<http://0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in%60call>
> '
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run'
> :0:in `each'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:90:in`run'
> :0:in `send'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in`run_callbacks<http://0.9.4.0/lib/ironruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in%60run_callbacks>
> '
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in`run_prepare_callbacks<http://0.9.4.0/lib/ironruby/gems/1.8/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:51:in%60run_prepare_callbacks>
> '
> :0:in `__send__'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:631:in`prepare_dispatcher'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:185:in`process'
> :0:in `send'
> C:/Program Files/IronRuby
> 0.9.4.0/lib/ironruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in`run'
>
> Thanks for any advice,
>
> -Scott
>
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20100219/2cdd426b/attachment-0001.html>


More information about the Ironruby-core mailing list