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

NameError (undefined local variable or method `page_cache_directory' for #<Jammit::Controller:0x007f1daee33488>): #271

Open
nynhex opened this issue Aug 25, 2016 · 4 comments

Comments

@nynhex
Copy link

nynhex commented Aug 25, 2016

We were using Jammit on a Rails 3 application which we just upgraded to 4.2.6. After deploying to production we started getting this error and our page views/css do not display properly

NameError (undefined local variable or method `page_cache_directory' for #<Jammit::Controller:0x007f1daee33488>):

We are on Rails 4.2.6, Ruby 2.3.0, and Jammit 0.7.0

Can anyone provide some insight on if there are compatibility issues with Jammit and Rails 4.2.6? If so can you point me in the direction of where this needs to be fixed so I can PR. Or should we scrap the gem and migrate to the asset pipeline?

@knowtheory
Copy link
Member

Hey! We're still using it. Not super satisfied with it, however if you pull off of Master things should still work: https://github.com/documentcloud/documentcloud/blob/master/Gemfile#L34

@nynhex
Copy link
Author

nynhex commented Aug 25, 2016

@knowtheory Thanks, I'm bundling in master. Bundles fine, but when I go to deploy the app into production capistrano gives me this

fatal: Could not parse object 'cc9c5a87624bc5f0b82128a1daa5599f03eccaa0'.

@nynhex
Copy link
Author

nynhex commented Aug 25, 2016

@knowtheory Figured this out, had to delete the shared/cached-copy directory. But I'm still getting the error:

NameError (undefined local variable or method `page_cache_directory' for #<Jammit::Controller:0x000000064fc4e0>):

And none of our pages are showing up right. Is it time to move to asset pipeline and if so what's the best strategy of doing so coming from rails 3 to 4.2.6 and converting everything?

@anthonycrumley
Copy link

The NameError results from the fact that "Static page caching for Action Pack (removed from core in Rails 4.0)." It was moved to a separate gem called actionpack-page_caching. Once this gem is added to the Gemfile then the error will be resolved.

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

3 participants