为什么我在 运行 rake db:setup 时得到未定义的方法 `meta_keywords'?
Why I get undefined method `meta_keywords' when running rake db:setup?
我收到这个错误:
耙中止!
Page::Translation:0x0000000548d5f0
的未定义方法“meta_keywords”
当 运行 在炼油厂 cms 1.0.0 rails 3.0.7.
上耙 db:setup
并且不能完全调试它
编辑
架构的一部分:
create_table "page_part_translations", :force => true do |t|
t.integer "page_part_id"
t.string "locale"
t.text "body"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "page_part_translations", ["page_part_id"], :name => "index_page_part_translations_on_page_part_id"
create_table "page_parts", :force => true do |t|
t.integer "page_id"
t.string "title"
t.text "body"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "page_parts", ["id"], :name => "index_page_parts_on_id"
add_index "page_parts", ["page_id"], :name => "index_page_parts_on_page_id"
create_table "page_translations", :force => true do |t|
t.integer "page_id"
t.string "locale"
t.string "title"
t.string "custom_title"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "page_translations", ["page_id"], :name => "index_page_translations_on_page_id"
create_table "pages", :force => true do |t|
t.integer "parent_id"
t.integer "position"
t.string "path"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "show_in_menu", :default => true
t.string "link_url"
t.string "menu_match"
t.boolean "deletable", :default => true
t.string "custom_title_type", :default => "none"
t.boolean "draft", :default => false
t.boolean "skip_to_first_child", :default => false
t.integer "lft"
t.integer "rgt"
t.integer "depth"
end
add_index "pages", ["depth"], :name => "index_pages_on_depth"
add_index "pages", ["id"], :name => "index_pages_on_id"
add_index "pages", ["lft"], :name => "index_pages_on_lft"
add_index "pages", ["parent_id"], :name => "index_pages_on_parent_id"
add_index "pages", ["rgt"], :name => "index_pages_on_rgt"
pages.rb: https://gist.github.com/grzegorzhauska/dcca44f3e2091c21400a
pages_for_inqueries.rb: https://gist.github.com/grzegorzhauska/997c355c2ce09d1da624
你得到这个错误的原因是因为 meta_keywords 曾经存在,但现在不存在了。确保您使用的是最新版本的 seo_meta
库。
我收到这个错误: 耙中止! Page::Translation:0x0000000548d5f0
的未定义方法“meta_keywords”当 运行 在炼油厂 cms 1.0.0 rails 3.0.7.
上耙 db:setup并且不能完全调试它
编辑 架构的一部分:
create_table "page_part_translations", :force => true do |t|
t.integer "page_part_id"
t.string "locale"
t.text "body"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "page_part_translations", ["page_part_id"], :name => "index_page_part_translations_on_page_part_id"
create_table "page_parts", :force => true do |t|
t.integer "page_id"
t.string "title"
t.text "body"
t.integer "position"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "page_parts", ["id"], :name => "index_page_parts_on_id"
add_index "page_parts", ["page_id"], :name => "index_page_parts_on_page_id"
create_table "page_translations", :force => true do |t|
t.integer "page_id"
t.string "locale"
t.string "title"
t.string "custom_title"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "page_translations", ["page_id"], :name => "index_page_translations_on_page_id"
create_table "pages", :force => true do |t|
t.integer "parent_id"
t.integer "position"
t.string "path"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "show_in_menu", :default => true
t.string "link_url"
t.string "menu_match"
t.boolean "deletable", :default => true
t.string "custom_title_type", :default => "none"
t.boolean "draft", :default => false
t.boolean "skip_to_first_child", :default => false
t.integer "lft"
t.integer "rgt"
t.integer "depth"
end
add_index "pages", ["depth"], :name => "index_pages_on_depth"
add_index "pages", ["id"], :name => "index_pages_on_id"
add_index "pages", ["lft"], :name => "index_pages_on_lft"
add_index "pages", ["parent_id"], :name => "index_pages_on_parent_id"
add_index "pages", ["rgt"], :name => "index_pages_on_rgt"
pages.rb: https://gist.github.com/grzegorzhauska/dcca44f3e2091c21400a pages_for_inqueries.rb: https://gist.github.com/grzegorzhauska/997c355c2ce09d1da624
你得到这个错误的原因是因为 meta_keywords 曾经存在,但现在不存在了。确保您使用的是最新版本的 seo_meta
库。