「リスト」 (分類された広告を考えてください) を持つアプリがあり、各リストにはタグのリストがあります。
次のコードは、アプリケーションを本番モードで実行すると失敗しますが、開発モードでは正常に動作します
uninitialized constant ActiveRecord::Acts::Taggable::InstanceMethods::TagList
Extracted source (around line #45):
42:
43: <span class="listingIndexTags">
44: Location: [location] | Tags:
45: <% tag_list = listing.tag_list %>
46: <% if tag_list != nil %>
47: <% for tag in tag_list %>
48: <%= link_to tag.to_s, { :action => "filter_on",
このテスト ケースで mongrel インスタンスを起動するために使用しているコマンド ライン: ruby script/server mongrel -e production
デフォルトはポート 3000 です。「listing.tag_list」を呼び出さないアプリの他のビューにアクセスできます。
「.tag_list」は、このアプリで使用している「acts_as_taggable_on_steroids」から提供されています。gem としてインストールされます。
私の環境ファイルがおかしいのでしょうか?
これが私の development.rb ファイルです
config.cache_classes = false
config.whiny_nils = true
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
...took these settings out for this post...
}
そして私の production.rb ファイル...
config.cache_classes = true
config.threadsafe!
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.cache_store = :mem_cache_store
config.action_mailer.raise_delivery_errors = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
...took these settings out for this post...
}