在SqlLite3“未初始化不断ActiveRecord的”关于迁移
我一直在使用脚手架生成创建了这个迁移创建我的新表有关的问题:
class CreateTimes < ActiveRecord::Migration
def self.up
create_table :times do |t|
t.integer :regsite
t.integer :user_id
t.timestamp :added
t.integer :time
t.text :note
t.timestamps
end
end
def self.down
drop_table :times
end
end
文件的名称是20091011203652_create_times.rb
试图迁移时出现此错误:
>rake db:migrate (in C:/...) rake aborted! uninitialized constant ActiveRecord C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2359:in `raw_load_rakefile' (See full trace by running task with --trace)
昨天我开始从PHP适应RoR,所以很抱歉,如果这是一个明显的答案,但已经尝试了我所知道的一切,但没有任何解决办法。
你能告诉我们你的config/environment.rb吗?我想你可能已经删除了activerecord框架。 –
“宝石列表 - 本地”的输出是什么? – Caffeine
这里是enviroment.rb http://pastie.org/650760和“gem list --local”http://pastie.org/650759 – ThoKra