0
我收到此錯誤: rake中止! 未定義的方法`meta_keywords'頁面::翻譯:0x0000000548d5f0爲什麼在運行rake db:setup時會出現未定義的方法'meta_keywords'?
當運行rake db:精煉廠安裝cms 1.0.0 rails 3.0.7。
,並不能十分調試它架構
編輯 部分:
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
發佈您的schema.rb和seeds.rb(只是包含字符串'meta_keywords。「的相關部分。其中一個文件可能有像'page.meta_keywords'這樣的排印錯誤。 – MarsAtomic
好吧,等一下 – user1167937
我不'你認爲你完全理解你在找什麼......我根據這個錯誤告訴你某個meta_keywords方法在一個頁面對象上被調用,並且要求這些文件的相關部分。頁面沒有meta_keywords方法 - 它可能被稱爲打印錯誤的結果。爲字符串'meta_keywords'查找文件(它可能不在這些文件中,因爲錯誤可能是由驗證或過濾器或其他內容生成的) – MarsAtomic