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

Broken after updating rails from 4.2.5 to 4.2.5.1 #421

Closed
mmozuras opened this issue Jan 26, 2016 · 5 comments
Closed

Broken after updating rails from 4.2.5 to 4.2.5.1 #421

mmozuras opened this issue Jan 26, 2016 · 5 comments

Comments

@mmozuras
Copy link

After updating rails from 4.2.5 to 4.2.5.1, apipie:cache rake task started failing.

This change seems to be the cause:
rails/rails@0c5c32a

Release notes:
http://weblog.rubyonrails.org/2016/1/25/Rails-5-0-0-beta1-1-4-2-5-1-4-1-14-1-3-2-22-1-and-rails-html-sanitizer-1-0-3-have-been-released/

Error:

ActionView::MissingTemplate: Missing template ../../layouts/apipie/apipie with {:locale=>[:"en-dev"], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee]}. Searched in:
actionview-4.2.5.1/lib/action_view/path_set.rb:46:in `find'
actionview-4.2.5.1/lib/action_view/lookup_context.rb:121:in `find'
actionview-4.2.5.1/lib/action_view/renderer/abstract_renderer.rb:18:in `find_template'
actionview-4.2.5.1/lib/action_view/renderer/template_renderer.rb:86:in `resolve_layout'
actionview-4.2.5.1/lib/action_view/renderer/template_renderer.rb:76:in `block in find_layout'
actionview-4.2.5.1/lib/action_view/lookup_context.rb:252:in `with_layout_format'
@TimThaler
Copy link

I am having the exact same problem. Also after updating from Rails 4.25 to 4.2.5.1

@FooBarWidget
Copy link

Me too.

@FooBarWidget
Copy link

I've fixed this locally as follows. Edit apipie-rails-0.3.5/lib/tasks/apipie.rake. Look for:

@apipie_renderer = ActionView::Base.new(base_path)

Replace with:

layouts_path = File.expand_path("../../../app/views/layouts", __FILE__)
@apipie_renderer = ActionView::Base.new([base_path, layouts_path])

Look for:

f.write av.render(
  :template => "#{template}",
  :layout => (layout && "../../layouts/apipie/#{layout}"))

Replace with:

f.write av.render(
  :template => "#{template}",
  :layout => (layout && "apipie/#{layout}"))

@buiatte
Copy link

buiatte commented Feb 1, 2016

Same problem on rails 4.2.5.1, works fine on 4.2.5

halilim added a commit to halilim/apipie-rails that referenced this issue Feb 1, 2016
Fixes Apipie#421 (Missing template ../../layouts/apipie/apipie ... error).
@buren
Copy link
Contributor

buren commented Feb 5, 2016

I'm also seeing this under 4.2.5.1... (and Rails 5.0.0.beta2)

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

5 participants