

Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:406:in `up' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:406:in `new' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/migration.rb:459:in `initialize' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_specification.rb:95:in `connection' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_specification.rb:103:in `retrieve_connection' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:330:in `retrieve_connection' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:99:in `connection' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:185:in `checkout' System/Library/Frameworks/amework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'

Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `checkout' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:186:in `loop' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:190:in `checkout' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:248:in `checkout_new_connection' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:226:in `new_connection' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/abstract/connection_pool.rb:226:in `send' Users/ankit/.bundle/ruby/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/connection_adapters/mysql_adapter.rb:30:in `mysql_connection'

I'm trying to set up just a basic blog on my webhost so I can just get everything working before I do more but I keep getting this error when I go add tables to the database via command line:Īnkit-Desais-MacBook-Pro:mogo ankit$ rake db:migrate -trace

#RUBY UNDEFINED METHOD MAP CODE#
Now, understand how can we execute the code and understand the working of extend ClassMethods end private def hello puts ' world ' end end class MyService include Service endpoint_instance_exec :foo do hello end endpoint_block_call :bar do hello end endpoint_block_improper_call :foobar do hello end end call end end end def self.included ( klass ) klass. module Service module ClassMethods def endpoint_instance_exec ( name, & block ) define_method name do instance_exec (& block ) end end def endpoint_block_call ( name, & block ) define_method name, & block end def endpoint_block_improper_call ( name, & block ) define_method name do # In this case, we called the block without "instance_eval" that # means block was called in the context of class MyService.
#RUBY UNDEFINED METHOD MAP MOD#
Static VALUE rb_mod_define_method ( int argc, VALUE * argv, VALUE mod ) ĭefine_method with blocks works differentlyĪs it is already stated that block is evaluated using instance_exec/instance_eval, so let me
