Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling UTF-8 #29

Closed
waclock opened this issue Nov 2, 2016 · 18 comments
Closed

Handling UTF-8 #29

waclock opened this issue Nov 2, 2016 · 18 comments

Comments

@waclock
Copy link

waclock commented Nov 2, 2016

Is there anyway to handle UTF-8? I'm currently having issues with it. It's not displaying the accent maks correctly

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

axlsx should be generating utf-8 by default. Are your strings utf8?

@waclock
Copy link
Author

waclock commented Nov 2, 2016

Every string is in UTF-8. I'm a little bit confused by the documentation, I don't know if I should use the "XLS" extension or the "XLSX" extension. I've also added the following gems to my gemfile:

gem 'zip-zip'
gem 'axlsx'
gem 'axlsx_rails'

If I try setting the format to "XLSX" the file I get is corrupted. If I get it with the "XLS" format, it's all fine but the UTF-8 isn't working.

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

gem 'axlsx_rails'

You should remove this from your Gemfile if you're not using it as it conflicts with to_spreadsheet.

If I try setting the format to "XLSX" the file I get is corrupted

This gem generates xlsx, it can't generate xls.

@waclock
Copy link
Author

waclock commented Nov 2, 2016

Thing is, if I remove the gem (I just noticed it's in the docs as well), I get the error saying there's no MIME type for what I requested (XLSX). Should I live the mime_types.rb blank? If so, I'm not sure what I'm doing wrong, as I followed the readme step by step.

The readme is a little bit confusing, there are a few places where "xls" appears, is this correct? Or should it be "xlsx"?

glebm added a commit that referenced this issue Nov 2, 2016
@glebm
Copy link
Owner

glebm commented Nov 2, 2016

It should be xlsx, I've updated the Readme.

@waclock
Copy link
Author

waclock commented Nov 2, 2016

Thanks, in that case I'm not sure what the problem is. I'm getting the following error when rendering the html (because of the controller's code):

To respond to a custom format, register it as a MIME type first: http://guides.rubyonrails.org/action_controller_overview.html#restful-downloads. If you meant to respond to a variant like :tablet or :phone, not a custom format, be sure to nest your variant response within a format response: format.html { |html| html.tablet { ... } }

Should I live mime_types.rb blank? Or should I add the XLSX format? I'm not sure if the gem does this. My controller code is the following:

respond_to do |format|
format.html{render 'statistics'}
format.xlsx { render xlsx: :statistics, filename: "example" }
end

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

Can you post the code here? What are your versions of Rails and Ruby?

@waclock
Copy link
Author

waclock commented Nov 2, 2016

I've updated my last response with some code.

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

Do you have this in the controller?

class MyThingiesController < ApplicationController
  respond_to :xlsx, :html # <-- this
  ...
end

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

Also, what office product are you using to open the file?

@waclock
Copy link
Author

waclock commented Nov 2, 2016

Yes, I'm using ActiveAdmin. It looks like this:

class StatisticsSummary < ActiveRecord::Base

end

ActiveAdmin.register StatisticsSummary do
    action_item(:download,only: :statistics) do
      link_to 'Descargar Excel', statistics_admin_statistics_summaries_path(format: :xlsx)
    end


  controller do
    include StatisticsModule
    respond_to :xlsx, :html

    def statistics
   #Lots of queries
     respond_to do |format|
        format.html{render 'statistics'}
        format.xlsx { render xlsx: :statistics, filename: "example" }
      end
  end

Since I'm getting this error I'm not able to download a file anymore, but I'm using Office 2015 on OSX Sierra

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

The mime type is registered here: https://github.com/glebm/to_spreadsheet/blob/master/lib/to_spreadsheet/rails/mime_types.rb#L2

Not sure what the problem is in your case.
What are the versions of rails, to_spreadsheet, and ruby you're using?

@waclock
Copy link
Author

waclock commented Nov 2, 2016

I've managed to "move on", but now I get the following error when trying to render the XLSX:

Missing template layouts/active_admin with {:locale=>[:es], :formats=>[:xlsx], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :arb, :haml]}. Searched in:

So if I add format.xlsx { render layout:false, xlsx: :statistics, filename: "example" } it should work, but I get the error:

undefined method 'value' for nil:NilClass

This is the full stacktrace:

NoMethodError - undefined method `value' for nil:NilClass:
  to_spreadsheet (1.0.6) lib/to_spreadsheet/themes/default.rb:13:in `block (2 levels) in <module:Default>'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rule/format.rb:40:in `add_and_apply_style'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rule/format.rb:12:in `block in apply'
  nokogiri (1.6.8.1) lib/nokogiri/xml/node_set.rb:187:in `block in each'
  nokogiri (1.6.8.1) lib/nokogiri/xml/node_set.rb:186:in `each'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/selectors.rb:62:in `css_match'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rule/format.rb:11:in `apply'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rule/container.rb:15:in `block (2 levels) in apply'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rule/container.rb:15:in `block in apply'
  (eval):3:in `each'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rule/container.rb:12:in `apply'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/renderer.rb:21:in `block in to_package'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/renderer.rb:19:in `to_package'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/renderer.rb:13:in `to_data'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rails/action_pack_renderers.rb:21:in `block (2 levels) in <top (required)>'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/context.rb:32:in `with_context'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rails/action_pack_renderers.rb:19:in `block in <top (required)>'
  actionpack (4.2.5) lib/action_controller/metal/renderers.rb:45:in `block in _render_to_body_with_renderer'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/set.rb:283:in `each'
  actionpack (4.2.5) lib/action_controller/metal/renderers.rb:41:in `_render_to_body_with_renderer'
  actionpack (4.2.5) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  actionpack (4.2.5) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.2.5) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  activesupport (4.2.5) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
  activesupport (4.2.5) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  activerecord (4.2.5) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:43:in `render'
  wicked_pdf (1.1.0) lib/wicked_pdf/pdf_helper.rb:42:in `render_with_wicked_pdf'
  app/admin/statistics/statistics_summary.rb:179:in `block (2 levels) in statistics'
  actionpack (4.2.5) lib/action_controller/metal/mime_responds.rb:217:in `respond_to'
  app/admin/statistics/statistics_summary.rb:177:in `statistics'
  actionpack (4.2.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.2.5) lib/abstract_controller/base.rb:198:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.2.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.2.5) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  activesupport (4.2.5) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.5) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.5) lib/action_view/rendering.rb:30:in `process'
  rack-mini-profiler (0.10.1) lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
  actionpack (4.2.5) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.5) lib/action_controller/metal.rb:237:in `block in action'
  actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
  actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:45:in `serve'
  actionpack (4.2.5) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.5) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:817:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  omniauth (1.3.1) lib/omniauth/builder.rb:63:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.6) lib/warden/manager.rb:34:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/etag.rb:24:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/head.rb:13:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/flash.rb:260:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activerecord (4.2.5) lib/active_record/query_cache.rb:36:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activerecord (4.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activerecord (4.2.5) lib/active_record/migration.rb:377:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rollbar (2.7.1) lib/rollbar/middleware/rails/rollbar.rb:24:in `block in call'
  rollbar (2.7.1) lib/rollbar.rb:854:in `scoped'
  rollbar (2.7.1) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  rollbar (2.7.1) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  railties (4.2.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.5) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  request_store (1.3.1) lib/request_store/middleware.rb:9:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activesupport (4.2.5) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/static.rb:116:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack-mini-profiler (0.10.1) lib/mini_profiler/profiler.rb:278:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  railties (4.2.5) lib/rails/engine.rb:518:in `call'
  railties (4.2.5) lib/rails/application.rb:165:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

What does your template look like?

@waclock
Copy link
Author

waclock commented Nov 2, 2016

I've changed the layout to a "default one" with the following code:

controller:
format.xlsx { render layout: 'application.html',xlsx: :statistics, filename: "example" }

application.html (layout):

!!!
%html
  %head
  %body{:class => "#{controller_name} #{action_name}"}
    = yield

But I still get

undefined method 'value' for nil:NilClass. Maybe it's a nokogiri issue? Should the HTML contain something in particular?

@glebm
Copy link
Owner

glebm commented Nov 2, 2016

What is your template code? Where you render the table?

@waclock
Copy link
Author

waclock commented Nov 2, 2016

The xlsx.haml only contains this:

= render partial: 'statistics.html.haml'

I'm trying with a very simple HAML file now (_statistics.html.haml):

%table
  %thead
    %tr
      %th
        Table Heading 
  %tbody
    %tr
      %td
        Table Data 

And I get the following error:

undefined method `reopen' for "streamed":String

Before I was using an arb file, but I believe it was causing issues.

Full stacktrace:

NoMethodError - undefined method `reopen' for "streamed":String:
  rubyzip (1.2.0) lib/zip/output_stream.rb:32:in `initialize'
  axlsx (1.3.6) lib/axlsx/package.rb:113:in `to_stream'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/renderer.rb:13:in `to_data'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rails/action_pack_renderers.rb:21:in `block (2 levels) in <top (required)>'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/context.rb:32:in `with_context'
  to_spreadsheet (1.0.6) lib/to_spreadsheet/rails/action_pack_renderers.rb:19:in `block in <top (required)>'
  actionpack (4.2.5) lib/action_controller/metal/renderers.rb:45:in `block in _render_to_body_with_renderer'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/set.rb:283:in `each'
  actionpack (4.2.5) lib/action_controller/metal/renderers.rb:41:in `_render_to_body_with_renderer'
  actionpack (4.2.5) lib/action_controller/metal/renderers.rb:37:in `render_to_body'
  actionpack (4.2.5) lib/abstract_controller/rendering.rb:25:in `render'
  actionpack (4.2.5) lib/action_controller/metal/rendering.rb:16:in `render'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'
  activesupport (4.2.5) lib/active_support/core_ext/benchmark.rb:12:in `block in ms'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'
  activesupport (4.2.5) lib/active_support/core_ext/benchmark.rb:12:in `ms'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:44:in `block in render'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
  activerecord (4.2.5) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:43:in `render'
  wicked_pdf (1.1.0) lib/wicked_pdf/pdf_helper.rb:42:in `render_with_wicked_pdf'
  app/admin/statistics/statistics_summary.rb:179:in `block (2 levels) in statistics'
  actionpack (4.2.5) lib/action_controller/metal/mime_responds.rb:217:in `respond_to'
  app/admin/statistics/statistics_summary.rb:177:in `statistics'
  actionpack (4.2.5) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
  actionpack (4.2.5) lib/abstract_controller/base.rb:198:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/rendering.rb:10:in `process_action'
  actionpack (4.2.5) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (4.2.5) lib/active_support/callbacks.rb:117:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
  activesupport (4.2.5) lib/active_support/callbacks.rb:505:in `call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:92:in `__run_callbacks__'
  activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'
  activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/rescue.rb:29:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (4.2.5) lib/active_support/notifications/instrumenter.rb:20:in `instrument'
  activesupport (4.2.5) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (4.2.5) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
  actionpack (4.2.5) lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
  activerecord (4.2.5) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (4.2.5) lib/abstract_controller/base.rb:137:in `process'
  actionview (4.2.5) lib/action_view/rendering.rb:30:in `process'
  rack-mini-profiler (0.10.1) lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
  actionpack (4.2.5) lib/action_controller/metal.rb:196:in `dispatch'
  actionpack (4.2.5) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
  actionpack (4.2.5) lib/action_controller/metal.rb:237:in `block in action'
  actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:76:in `dispatch'
  actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:45:in `serve'
  actionpack (4.2.5) lib/action_dispatch/journey/router.rb:43:in `block in serve'
  actionpack (4.2.5) lib/action_dispatch/journey/router.rb:30:in `serve'
  actionpack (4.2.5) lib/action_dispatch/routing/route_set.rb:817:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  omniauth (1.3.1) lib/omniauth/strategy.rb:186:in `call!'
  omniauth (1.3.1) lib/omniauth/strategy.rb:164:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  omniauth (1.3.1) lib/omniauth/builder.rb:63:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/rack/browser_monitoring.rb:32:in `traced_call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.6) lib/warden/manager.rb:34:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/etag.rb:24:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/conditionalget.rb:25:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/head.rb:13:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/flash.rb:260:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/session/abstract/id.rb:225:in `context'
  rack (1.6.4) lib/rack/session/abstract/id.rb:220:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/cookies.rb:560:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activerecord (4.2.5) lib/active_record/query_cache.rb:36:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activerecord (4.2.5) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activerecord (4.2.5) lib/active_record/migration.rb:377:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (4.2.5) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  activesupport (4.2.5) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  activesupport (4.2.5) lib/active_support/callbacks.rb:81:in `run_callbacks'
  actionpack (4.2.5) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/reloader.rb:73:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rollbar (2.7.1) lib/rollbar/middleware/rails/rollbar.rb:24:in `block in call'
  rollbar (2.7.1) lib/rollbar.rb:854:in `scoped'
  rollbar (2.7.1) lib/rollbar/middleware/rails/rollbar.rb:22:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  rollbar (2.7.1) lib/rollbar/middleware/rails/show_exceptions.rb:22:in `call_with_rollbar'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  railties (4.2.5) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.5) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.5) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.5) lib/rails/rack/logger.rb:20:in `call'
  quiet_assets (1.1.0) lib/quiet_assets.rb:27:in `call_with_quiet_assets'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  request_store (1.3.1) lib/request_store/middleware.rb:9:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  activesupport (4.2.5) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  actionpack (4.2.5) lib/action_dispatch/middleware/static.rb:116:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack-mini-profiler (0.10.1) lib/mini_profiler/profiler.rb:278:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  railties (4.2.5) lib/rails/engine.rb:518:in `call'
  railties (4.2.5) lib/rails/application.rb:165:in `call'
  newrelic_rpm (3.16.3.323) lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
  /Users/johnpeebles/.rvm/rubies/ruby-2.2.2/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'

@waclock
Copy link
Author

waclock commented Nov 2, 2016

I could pinpoint the issue to the gem 'axlsx'. Once you update it there should be no issues, however, since I was using the gem roo I had conflicts finding the correct version for axlsx so that it was both compatible with roo, and with zip-zip.

I got it working by adding

gem 'axlsx', '2.1.0.pre'

to my gemfile.

Thank you very much for your help!

@waclock waclock closed this as completed Nov 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants