2013-02-18 54 views
3

定義的錯誤出於某種原因,我的部署Rails應用程序現在給我:過濾器「咖啡不HAML 4

Haml的::錯誤在探索#指數

過濾器‘咖啡’是沒有定義。

...更新到最新版本軌和最新HAML 4.

本地後,我沒有得到這個錯誤。Haml的版本4應該支持咖啡過濾器。所有其他過濾器似乎工作正常。

這裏的部署服務器上捆綁列表:

actionmailer (3.2.12) 
actionpack (3.2.12) 
activemodel (3.2.12) 
activerecord (3.2.12) 
activeresource (3.2.12) 
activesupport (3.2.12) 
addressable (2.3.2) 
anjlab-bootstrap-rails (2.3.0.0) 
arel (3.0.2) 
aws-sdk (1.3.9) 
bcrypt-ruby (3.0.1) 
builder (3.0.4) 
bundler (1.2.1) 
capistrano (2.14.2) 
cocaine (0.4.2) 
coffee-rails (3.2.2) 
coffee-script (2.2.0) 
coffee-script-source (1.4.0) 
devise (2.2.3) 
erubis (2.7.0) 
execjs (1.4.0) 
faraday (0.8.5) 
font-awesome-sass-rails (3.0.2.1) 
haml (4.0.0) 
haml-rails (0.4) 
hashie (1.2.0) 
highline (1.6.15) 
hike (1.2.1) 
httparty (0.10.2) 
httpauth (0.2.0) 
i18n (0.6.1) 
journey (1.0.4) 
jquery-fileupload-rails (0.4.0) 
jquery-rails (2.2.1) 
json (1.7.7) 
jwt (0.1.5) 
kgio (2.8.0) 
koala (1.6.0) 
mail (2.4.4) 
mime-types (1.21) 
multi_json (1.6.1) 
multi_xml (0.5.3) 
multipart-post (1.1.5) 
mysql2 (0.3.11) 
net-scp (1.1.0) 
net-sftp (2.1.1) 
net-ssh (2.6.5) 
net-ssh-gateway (1.2.0) 
nokogiri (1.5.6) 
oauth2 (0.8.0) 
omniauth (1.1.3) 
omniauth-facebook (1.4.1) 
omniauth-oauth2 (1.1.1) 
orm_adapter (0.4.0) 
paperclip (3.4.0) 
paperclip-remote (0.5.0) 
polyamorous (0.5.0) 
polyglot (0.3.3) 
rabl (0.8.0) 
rack (1.4.5) 
rack-cache (1.2) 
rack-ssl (1.3.3) 
rack-test (0.6.2) 
rails (3.2.12) 
railties (3.2.12) 
raindrops (0.10.0) 
rake (10.0.3) 
rdoc (3.12.1) 
right_aws (3.0.4) 
right_http_connection (1.3.0) 
rmagick (2.13.2) 
rocket_tag (0.5.6) 
sass (3.2.5) 
sass-rails (3.2.6) 
sprockets (2.2.2) 
squeel (1.0.16) 
sugar-rails (1.3.7) 
thor (0.17.0) 
tilt (1.3.3) 
treetop (1.4.12) 
twitter-text (1.5.0) 
tzinfo (0.3.35) 
uglifier (1.3.0) 
unicorn (4.6.0) 
uuidtools (2.1.3) 
warden (1.2.1) 
will_paginate (3.0.4) 

簡單的咖啡過濾器:

%html 
... 
:coffee 
    alert "hello" 
+0

您的生產實例中是否具有與execjs兼容的JavaScript運行時? – 2013-11-20 02:14:03

回答

0

首先,確保你在生產中使用的execjs兼容運行。如果您正在部署到Window或Mac OS,或者您在生產中安裝了node.js,則應該沒問題。

然後,確保在添加任何寶石後重新啓動應用程序。咖啡過濾器似乎只有在生產中重新啓動服務器後才能加載(請參閱https://github.com/paulnicholson/coffee-filter/issues/6)。