Topic: migrations woes, syntax error somewhere can't see it :(

class CreateGroups < ActiveRecord::Migration
  def self.up
      drop_table 'groups'
     
      create_table 'groups' do |t|
          t.column 'groupname', :string, :default => "", :limit => 30, :null => false
          t.column 'acpaccess', :tinyint, :default => 0, :limit => 1
  end

  def self.down
      drop_table 'groups'
  end
end

Any ideas ?????

www.movieheretic.com - Reviews, Box Office, Chat from downunder. Now with added RoR goodness, beginner stuff.

www.skinbydragonfly.com - Invision skins, graphics, i-Tab revolution.

Re: migrations woes, syntax error somewhere can't see it :(

I pasted that into irb and it compiled just fine - I don't think the syntax error is in this file.

Can you past the full error message?  Go ahead and dump the whole darn thing into a post, it helps to be able to see as much as possible.

Re: migrations woes, syntax error somewhere can't see it :(

Here goes...

D:\rails\moviemania>rake migrate --trace
(in D:/rails/moviemania)
** Invoke migrate (first_time)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
./db/migrate//001_create_groups.rb:13: syntax error
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependenci
es.rb:140:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependenci
es.rb:140:in `load'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r
b:341:in `migration_classes'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_
adapters/mysql_adapter.rb:189:in `inject'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r
b:340:in `migration_classes'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r
b:328:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r
b:295:in `up'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/migration.r
b: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/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 `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:357:in `invoke'
c:/ruby/lib/ruby/1.8/thread.rb:135: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_prerequisit
es'
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_prerequisit
es'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/lib/rake.rb:356:in `invoke'
c:/ruby/lib/ruby/1.8/thread.rb:135: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 `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.1/bin/rake:7
c:/ruby/bin/rake.bat:25

www.movieheretic.com - Reviews, Box Office, Chat from downunder. Now with added RoR goodness, beginner stuff.

www.skinbydragonfly.com - Invision skins, graphics, i-Tab revolution.

Re: migrations woes, syntax error somewhere can't see it :(

oops don't have a webserver running ....

www.movieheretic.com - Reviews, Box Office, Chat from downunder. Now with added RoR goodness, beginner stuff.

www.skinbydragonfly.com - Invision skins, graphics, i-Tab revolution.

Re: migrations woes, syntax error somewhere can't see it :(

nope didn't make a difference...

www.movieheretic.com - Reviews, Box Office, Chat from downunder. Now with added RoR goodness, beginner stuff.

www.skinbydragonfly.com - Invision skins, graphics, i-Tab revolution.

Re: migrations woes, syntax error somewhere can't see it :(

Bum missed an "end" statement ... oops. Okay working now big_smile

www.movieheretic.com - Reviews, Box Office, Chat from downunder. Now with added RoR goodness, beginner stuff.

www.skinbydragonfly.com - Invision skins, graphics, i-Tab revolution.

Re: migrations woes, syntax error somewhere can't see it :(

wow, yeah, weird that that was so hard to spot.  Good luck with the rest of it!

Re: migrations woes, syntax error somewhere can't see it :(

danger spent about an hour before finally noticing it d'uh!!!!!!

Well at least we documented an error for future reference.

www.movieheretic.com - Reviews, Box Office, Chat from downunder. Now with added RoR goodness, beginner stuff.

www.skinbydragonfly.com - Invision skins, graphics, i-Tab revolution.