1
我已經將我的應用程序從Rails 2.3.5升級到了Rails 3.1.3。我有acts_as_commentable_with_threading和awesome_nested_set作爲插件。現在我在Gemfile中添加爲Rails 3.1.3如下acts_as_commentable_with_threading未初始化的常量Post :: Comment Rails 3.1.3
gem 'awesome_nested_set'
gem 'acts_as_commentable_with_threading'
我在型號代碼如下
class Post < ActiveRecord::Base
acts_as_commentable
end
的遷移acts_as_commentable_with_threading在數據庫中已經應用。
我在視圖語句
<%= pluralize(post.root_comments.size, "comment") %> on this post
當我嘗試在該行加載這個觀點,我得到錯誤的
uninitialized constant Post::Comment
可以採取什麼問題。請幫幫我。
在此先感謝!
還有第一個步驟是不是一個解決方案這個?我剛開始出現這個錯誤。 – jab 2013-01-08 08:47:58
@jab沒有人。我沒有進一步檢查,因爲我放棄了該項目的工作。 – 2013-07-11 07:31:38