Newbie: rake aborted! no block given

Hi everyone…newbie here trying to get started from the Java and
Microsoft world!

I am trying to run db:migrate and am getting…

rake aborted!
no block given

All the file does is create a table…nothing else.

Here is the stack trace…any help is appreciated…

C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/connection_adapters/abstract/
schema_statements.rb:94:in create_table' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/connection_adapters/ mysql_adapter.rb:353:increate_table’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:275:in send' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/migration.rb:275:inmethod_missing’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:259:in
say_with_time' C:/InstantRails-1.7-win/ruby/lib/ruby/1.8/benchmark.rb:293:inmeasure’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:259:in
say_with_time' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/migration.rb:273:inmethod_missing’
./db/migrate//001_create_resources.rb:3:in real_up' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/migration.rb:212:insend’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:212:in migrate' C:/InstantRails-1.7-win/ruby/lib/ruby/1.8/benchmark.rb:293:inmeasure’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:212:in migrate' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/migration.rb:335:inmigrate’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:330:in each' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/migration.rb:330:inmigrate’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/
activerecord-1.15.3/lib/active_record/migration.rb:297:in up' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/ activerecord-1.15.3/lib/active_record/migration.rb:288:inmigrate’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/
tasks/databases.rake:4
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/
rake.rb:399:in call' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/ rake.rb:399:inexecute’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/
rake.rb:399:in each' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/ rake.rb:399:inexecute’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/
rake.rb:369:in invoke' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/ rake.rb:362:insynchronize’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/
rake.rb:362:in invoke' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/ rake.rb:1935:inrun’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/
rake.rb:1935:in each' C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/ rake.rb:1935:inrun’
C:/InstantRails-1.7-win/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/bin/
rake:7
C:\InstantRails-1.7-win\ruby\bin\rake:16:in load' C:\InstantRails-1.7-win\ruby\bin\rake:16 -e:3:inload’
-e:3

On Aug 2, 3:12 am, Tim [email protected] wrote:

Hi everyone…newbie here trying to get started from the Java and
Microsoft world!

I am trying to run db:migrate and am getting…

rake aborted!
no block given

All the file does is create a table…nothing else.

What does your migration look like? If it’s just

create_table :foos

then that’s your problem. the create table is expecting a block
telling it what columns to add, eg
create_table :foos do |t|
t.string :name

end

Fred

Aaaaah, that is it! Thanks.

On Aug 2, 5:55 am, Frederick C. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs