Re: [haml] Error after upgrading

163 views
Skip to first unread message

Matt Wildig

unread,
Mar 21, 2013, 12:18:11 PM3/21/13
to ha...@googlegroups.com
Your logs look all out of order. Are you using Heroku? If so try adding

$stdout.sync = true

to your config.ru; I think that will give you better output so we can see what's going on.


Matt


On 21 Mar 2013, at 15:49, Ismael Gimenez wrote:

> Code:
>
> !!! 5
> %html{ :lang=> I18n.locale }
> %head
> %meta(charset="utf-8")
> %meta(name="viewport" content="width=device-width, initial-scale=1.0")
> %title Scanndash
> = csrf_meta_tags
> = stylesheet_link_tag "application", :media => "all"
> = javascript_include_tag "vendor"
> = javascript_include_tag "application" if user_signed_in?
> = javascript_include_tag
> "https://maps.googleapis.com/maps/api/js?sensor=false"
> = javascript_include_tag "markerclusterer"
> %script{:type=>'text/javascript'}= yield :dynamic_js
>
> %body= yield
>
> Error:
>
> 2013-03-20T16:23:07+00:00 app[web.1]: Started GET "/" for 200.40.110.106 at
> 2013-03-20 16:23:07 +0000
> 2013-03-20T16:23:08+00:00 heroku[router]: at=info method=GET path=/
> host=scanndash.herokuapp.com fwd="200.40.110.106" dyno=web.1 queue=0
> wait=0ms connect=4ms service=237ms status=500 bytes=421
> 2013-03-20T16:23:08+00:00 app[web.1]: 8: = stylesheet_link_tag
> "application", :media => "all"
> 2013-03-20T16:23:08+00:00 app[web.1]: (in
> /app/app/assets/javascripts/app.coffee)):
> 2013-03-20T16:23:08+00:00 app[web.1]: 11: = javascript_include_tag
> "https://maps.googleapis.com/maps/api/js?sensor=false"
> 2013-03-20T16:23:08+00:00 app[web.1]: 12: = javascript_include_tag
> "markerclusterer"
> 2013-03-20T16:23:08+00:00 app[web.1]:
> 2013-03-20T16:23:08+00:00 app[web.1]: ActionView::Template::Error
> (SyntaxError: unexpected INDENT
> 2013-03-20T16:23:08+00:00 app[web.1]: 7: = csrf_meta_tags
> 2013-03-20T16:23:08+00:00 app[web.1]:
> app/views/layouts/application.html.haml:10:in
> `_app_views_layouts_application_html_haml___1841377898848519774_61227540'
> 2013-03-20T16:23:08+00:00 app[web.1]: 9: = javascript_include_tag
> "vendor"
> 2013-03-20T16:23:08+00:00 app[web.1]: Completed 500 Internal Server Error
> in 226ms
> 2013-03-20T16:23:08+00:00 app[web.1]: 13:
> %script{:type=>'text/javascript'}= yield :dynamic_js
>
> --
> You received this message because you are subscribed to the Google Groups "Haml" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to haml+uns...@googlegroups.com.
> To post to this group, send email to ha...@googlegroups.com.
> Visit this group at http://groups.google.com/group/haml?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Ismael Gimenez

unread,
Mar 21, 2013, 2:50:41 PM3/21/13
to ha...@googlegroups.com
Yes the problem is only while deploying on heroku.

The error (after adding your line)

2013-03-21T18:42:32+00:00 app[web.1]: Started GET "/" for 200.40.110.106 at 2013-03-21 18:42:32 +0000
2013-03-21T18:42:32+00:00 app[web.1]:
2013-03-21T18:42:32+00:00 app[web.1]: ActionView::Template::Error (SyntaxError: unexpected INDENT
2013-03-21T18:42:32+00:00 app[web.1]:   (in /app/app/assets/javascripts/app.coffee)):
2013-03-21T18:42:32+00:00 app[web.1]:     7:     = csrf_meta_tags
2013-03-21T18:42:32+00:00 app[web.1]:     8:     = stylesheet_link_tag "application", :media => "all"
2013-03-21T18:42:32+00:00 app[web.1]:     9:     = javascript_include_tag "vendor"
2013-03-21T18:42:32+00:00 app[web.1]:     10:     = javascript_include_tag "application" if user_signed_in?
2013-03-21T18:42:32+00:00 app[web.1]:     11:     = javascript_include_tag "https://maps.googleapis.com/maps/api/js?sensor=false"
2013-03-21T18:42:32+00:00 app[web.1]:     12:     = javascript_include_tag "markerclusterer"
2013-03-21T18:42:32+00:00 app[web.1]:     13:     %script{:type=>'text/javascript'}= yield :dynamic_js
2013-03-21T18:42:32+00:00 app[web.1]:   app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml__4435557158513798731_47437700'
2013-03-21T18:42:32+00:00 app[web.1]:
2013-03-21T18:42:32+00:00 app[web.1]:
2013-03-21T18:42:32+00:00 app[web.1]: cache: [GET /] miss
2013-03-21T18:42:32+00:00 app[web.1]: Processing by HomeController#index as HTML
2013-03-21T18:42:32+00:00 app[web.1]:   Rendered home/index.html.erb within layouts/application (0.5ms)
2013-03-21T18:42:32+00:00 app[web.1]: Completed 500 Internal Server Error in 304ms

I, by mistake open two post about the issue, thinking that this was not send to the group.

I donno how to fix that. Anyway! Need help about this. I read all the changes made to haml 4 and above and did not find anything related to this.

Next is the whole deployment:

ismael@Gollum:~/Development/scanntech_dash$ git push production master --force
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (14/14), 1.24 KiB, done.
Total 14 (delta 10), reused 0 (delta 0)

-----> Deleting 3 files matching .slugignore patterns.
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-1.9.3
-----> WARNING: Removing `Gemfile.lock` because it was generated on Windows.
       Bundler will do a full resolve so native gems are handled properly.
       This may result in unexpected gem versions being used in your app.
-----> Installing dependencies using Bundler version 1.3.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin
       Updating git://github.com/aew/roo.git
       Updating git://github.com/tchak/barber.git
       Updating git://github.com/emberjs/ember-rails.git
       Fetching gem metadata from https://rubygems.org/.......
       Fetching gem metadata from https://rubygems.org/..
       Resolving dependencies...
       Using rake (10.0.3)
       Using i18n (0.6.4)
       Using multi_json (1.7.1)
       Using activesupport (3.2.11)
       Using builder (3.0.4)
       Using activemodel (3.2.11)
       Using erubis (2.7.0)
       Using journey (1.0.4)
       Using rack (1.4.5)
       Using rack-cache (1.2)
       Using rack-test (0.6.2)
       Using hike (1.2.1)
       Using tilt (1.3.6)
       Using sprockets (2.2.2)
       Using actionpack (3.2.11)
       Using mime-types (1.21)
       Using polyglot (0.3.3)
       Using treetop (1.4.12)
       Using mail (2.4.4)
       Using actionmailer (3.2.11)
       Using active_model_serializers (0.7.0)
       Using arel (3.0.2)
       Using tzinfo (0.3.37)
       Using activerecord (3.2.11)
       Using activeresource (3.2.11)
       Using json (1.7.7)
       Installing nokogiri (1.5.9)
       Using uuidtools (2.1.3)
       Using aws-sdk (1.8.5)
       Using handlebars-source (1.0.0.rc3)
       Using ember-source (0.0.3)
       Using execjs (1.4.0)
       Using barber (0.4.1) from git://github.com/tchak/barber.git (at master)
       Using bcrypt-ruby (3.0.1)
       Using sass (3.2.7)
       Using bootstrap-sass (2.2.2.0)
       Using bundler (1.3.2)
       Using facter (1.6.18)
       Using timers (1.1.0)
       Using celluloid (0.12.4)
       Using climate_control (0.0.3)
       Using clockwork (0.5.0)
       Using cocaine (0.5.1)
       Using coffee-script-source (1.6.2)
       Using coffee-script (2.2.0)
       Using rack-ssl (1.3.3)
       Using rdoc (3.12.2)
       Using thor (0.17.0)
       Using railties (3.2.11)
       Using coffee-rails (3.2.2)
       Using connection_pool (1.0.0)
       Using orm_adapter (0.4.0)
       Using warden (1.2.1)
       Using devise (2.2.3)
       Using ember-data-source (0.0.5)
       Using ember-rails (0.11.1) from git://github.com/emberjs/ember-rails.git (at master)
       Using sass-rails (3.2.6)
       Using font-awesome-sass-rails (3.0.0.1)
       Installing haml (4.0.1)
       Using haml-rails (0.4)
       Using i18n-js (2.1.2)
       Using jquery-rails (2.2.1)
       Using newrelic_rpm (3.5.5.38)
       Using oj (2.0.10)
       Using paperclip (3.4.1)
       Using pg (0.14.1)
       Using puma (1.6.3)
       Using rack-protection (1.5.0)
       Using rails (3.2.11)
       Using redis (3.0.3)
       Using redis-store (1.1.3)
       Using redis-rack (1.4.2)
       Using redis-actionpack (3.2.3)
       Using redis-activesupport (3.2.3)
       Using redis-namespace (1.2.1)
       Using redis-rack-cache (1.2.1)
       Using redis-rails (3.2.3)
       Using rubyzip (0.9.9)
       Using ruby-ole (1.2.11.6)
       Using spreadsheet (0.8.3)
       Using roo (1.10.2) from git://github.com/aew/roo.git (at master)
       Using routing-filter (0.3.1)
       Using sidekiq (2.8.0)
       Using simple_form (2.1.0)
       Using sinatra (1.3.6)
       Using temple (0.5.5)
       Using slim (1.3.6)
       Using sugarcrm (0.9.18)
       Using tlsmail (0.0.1)
       Using uglifier (1.3.0)
       Your bundle is complete! It was installed into ./vendor/bundle
       Post-install message from haml:
       HEADS UP! Haml 4.0 has many improvements, but also has changes that may break
       your application:
       * Support for Ruby 1.8.6 dropped
       * Support for Rails 2 dropped
       * Sass filter now always outputs <style> tags
       * Data attributes are now hyphenated, not underscored
       * html2haml utility moved to the html2haml gem
       * Textile and Maruku filters moved to the haml-contrib gem
       For more info see:
       http://rubydoc.info/github/haml/haml/file/CHANGELOG.md
       Cleaning up the bundler cache.
       Removing nokogiri (1.5.8)
       Removing haml (4.0.0)
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tlsmail-0.0.1/lib/net/smtp.rb:806: warning: already initialized constant SMTPSession
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tlsmail-0.0.1/lib/net/pop.rb:687: warning: already initialized constant POP
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tlsmail-0.0.1/lib/net/pop.rb:688: warning: already initialized constant POPSession
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tlsmail-0.0.1/lib/net/pop.rb:689: warning: already initialized constant POP3Session
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tlsmail-0.0.1/lib/net/pop.rb:702: warning: already initialized constant APOPSession
       rake aborted!
       SyntaxError: unexpected INDENT
       (in /tmp/build_u78jv0ctsj98/app/assets/javascripts/app.coffee)
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:66:in `extract_result'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:28:in `block in exec'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:41:in `compile_to_tempfile'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:27:in `exec'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:19:in `eval'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:33:in `call'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/coffee_script.rb:57:in `compile'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tilt-1.3.6/lib/tilt/coffee.rb:46:in `evaluate'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/tilt-1.3.6/lib/tilt/template.rb:77:in `render'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:12:in `initialize'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:105:in `each'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processed_asset.rb:16:in `initialize'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `new'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:249:in `block in build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:270:in `circular_call_protection'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:248:in `build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:16:in `initialize'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/static_compiler.rb:19:in `block in compile'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/static_compiler.rb:18:in `compile'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:56:in `internal_precompile'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
       /tmp/build_u78jv0ctsj98/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
       Tasks: TOP => assets:precompile:primary
       (See full trace by running task with --trace)
       Precompiling assets failed, enabling runtime asset compilation
       Injecting rails31_enable_runtime_asset_compilation
       Please see this article for troubleshooting help:
       http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
-----> Rails plugin injection
       Injecting rails_log_stdout
       Injecting rails3_serve_static_assets
-----> Discovering process types
       Procfile declares types      -> web, worker
       Default types for Ruby/Rails -> console, rake

-----> Compiled slug size: 31.7MB
-----> Launching... done, v363
-----> Deploy hooks scheduled, check output in your logs

Matt Wildig

unread,
Mar 21, 2013, 3:48:18 PM3/21/13
to ha...@googlegroups.com

On 21 Mar 2013, at 18:50, Ismael Gimenez wrote:

> 2013-03-21T18:42:32+00:00 app[web.1]: ActionView::Template::Error
> (SyntaxError: unexpected INDENT
> 2013-03-21T18:42:32+00:00 app[web.1]: (in
> /app/app/assets/javascripts/app.coffee)):

It looks like this is a coffeescript error, not a Haml issue.

> 2013-03-21T18:42:32+00:00 app[web.1]: 10: = javascript_include_tag
> "application" if user_signed_in?

> app/views/layouts/application.html.haml:10:in
> `_app_views_layouts_application_html_haml__4435557158513798731_47437700'

The Haml line that is reporting the error appears to be where this coffeescript file is being compiled.

Note this is the same error that is reported when you deploy and Heroku tries to precompile your assets:

> -----> Preparing app for Rails asset pipeline
> Running: rake assets:precompile
>
> ...
>
> rake aborted!
> SyntaxError: unexpected INDENT
> (in /tmp/build_u78jv0ctsj98/app/assets/javascripts/app.coffee)

You should check your app.coffee file.


Matt
Reply all
Reply to author
Forward
0 new messages