Pessoal estou iniciando meus estudos com Ruby on Rails, e ao executar o comando do rake: db:migrate, esta gerando o erro abaixo.
(in C:/Documents and Settings/Henrique/Meus documentos/NetBeansProjects/RailsApplication1)
rake aborted!
uninitialized constant Generate
rake aborted!
invalid meta-code syntax: /C:\Documents and Settings\Henrique\Meus documentos\NetBeansProjects\RailsApplication1\Rakefile/
C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `standard_exception_handling': invalid meta-code syntax: /C:\Documents and Settings\Henrique\Meus documentos\NetBeansProjects\RailsApplication1\Rakefile/ (RegexpError)
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `each'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `find'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `standard_exception_handling'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:19:in `load'
from C:\Arquivos de programas\NetBeans 6.5 RC2\ruby2\jruby-1.1.4\bin\rake:19
class CreateContexts < ActiveRecord::Migration
def self.up
create_table :contexts do
|t|t.column :name, :string
end
end
def self.down
drop_table :contexts
end
end
class CreateContexts < ActiveRecord::Migration
def self.up
create_table :contexts do
|t|t.column :name, :string
end
end
def self.down
drop_table :contexts
end
end
[/quote]
class CreateContexts < ActiveRecord::Migration
def self.up
create_table :contexts do
|t|t.column :name, :string
end
end
def self.down
drop_table :contexts
end
end
[/quote]
Cara… teste assim
create_table :contexts do |t|
t.string :name
end
[/quote]
Cara valeu, mas o erro continua…
(in C:/Documents and Settings/Henrique/Meus documentos/NetBeansProjects/RailsApplication1)
rake aborted!
uninitialized constant Generate
rake aborted!
invalid meta-code syntax: /C:\Documents and Settings\Henrique\Meus documentos\NetBeansProjects\RailsApplication1\Rakefile/
C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `standard_exception_handling': invalid meta-code syntax: /C:\Documents and Settings\Henrique\Meus documentos\NetBeansProjects\RailsApplication1\Rakefile/ (RegexpError)
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `each'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `find'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2050:in `standard_exception_handling'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
from C:/Arquivos de programas/NetBeans 6.5 RC2/ruby2/jruby-1.1.4/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:19:in `load'
from C:\Arquivos de programas\NetBeans 6.5 RC2\ruby2\jruby-1.1.4\bin\rake:19