allesklar
allesklar

Reputation: 9600

Rails host app doesn't see engine layout

What I want to do works on my OSX dev machines and on a staging server. However, I encounter problems on the production server.

I have a Rails Engine which I have created, maintained, and used over the years: https://github.com/allesklar/tkh_admin_panel

It works fine on many apps and I have been porting it to this new website as of late. For admin views, my controllers render the 'admin' layout which is located on this engine.

Everything has gone great until I tried to deploy to the site's production server. I get the following error:

ActionView::Template::Error (no implicit conversion of nil into String):

This exception occurs in the line with the following code:

render layout: 'admin'

I can't pinpoint any differences in gems, rbenv ruby versions, or any other factor from one setup to the next.

I've tried to reset the binstubs and done a number of other things.

No matter what I do, it works on the staging server and not on the production server.

Please point me to some directions where I can investigate further.

UPDATE ---

The scope of the problem has changed entirely since now I'm experiencing the same issue on my development machines.

I therefore think the problem lies in the host app/gem relationship. The same version of this gem works fine with some other Rails host sites of mine.

Any ideas welcome.

Upvotes: 0

Views: 56

Answers (1)

Benjamin Bouchet
Benjamin Bouchet

Reputation: 13181

Try to recompile all assets. If you can (it's a prod server) delete all assets and manifest and re-deploy.

Try to delete all cache, if you are using page or fragment caching, perhaps your deploy system is not cleaning it correctly.

Simply reboot the system (simple action that fixed a lot of problems in the past).

And if nothing works, try to display the full backtrace to see where this is happening

Upvotes: 1

Related Questions