caxlsx / caxlsx_rails

A Rails plugin to provide templates for the axlsx gem
MIT License
744 stars 84 forks source link

Missing Template error in Production only #57

Closed pastullo closed 8 years ago

pastullo commented 8 years ago

I am using version 0.5.0 on Rails 5 and everything works great on development. I am using the example code provided in the docs and the xlsx file is perfect.

When i try in production however i get a

No template found for Admin::ReportsController#create, rendering head :no_content

This error also fails silently, i click on the create report button and nothing happens.

I then tried to use a more explicit render version with:

  def create
    render xlsx: 'create'
  end

And i get this error:

Missing template admin/reports/create, admin/create, application/create with {:locale=>[:"en-GB", :en], :formats=>[:xlsx], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}

It looks like the handler :xlsx is not registered and Rails can't find the template. However, in development everything works just great??

pastullo commented 8 years ago

God, just did a unicorn restart instead of stop/start :(

straydogstudio commented 8 years ago

Haha. Yesterday I fought a failed test for hours before realizing I forgot to copy a template. No worries.