Comments (15)
Hmm. All of my ApplicationController code is working in development. Are you seeing NoMethodErrors, or is it just that the passwords aren't being filtered as expected? If there are exceptions being thrown, a backtrace would be helpful. Also, what version of Rails are you using?
from jammit.
The way that Jammit was adding a before_filter in development might have been mucking with Rails' autoloading of ApplicationController. I've pushed a new gem of Jammit, 0.1.2, to Gemcutter. Give it a spin and let me know if it fixes your problem.
from jammit.
I'm on 2.3.4. It's actually not loading my application_controller.rb. I added some puts statements to controller.rb in my local jammit gem, and in my application_controller.rb. If I load jammit via config.gem, I only see the puts from jammit's controller.rb. If I take that out, I see the puts from my application_controller.rb. This is really weird...
from jammit.
Did 0.1.2 fix it? -- it may have been interfering with the autoloading.
from jammit.
Trying now - looks like we were both posting updates here at the same time :)
from jammit.
Yes, it looks like your fix in 0.1.2 did the trick. Thanks!
from jammit.
Wonderful -- I'll update the change log now and make it official. Thanks for reporting it.
from jammit.
Hmm apparently there are still some issues. My rails app is using the acts_as_audited plugin. With jammit enabled, it's not adding the "audit" method to ActionController::Base (from acts_as_audited/lib/acts_as_audited/audit_sweeper.rb). With a similar "puts" in this file, I see/don't see my puts output if I don't/do have jammit enabled. I'll keep doing some more research...
from jammit.
I still can't reproduce your issue on my end (probably because I'm not using Passenger in development). Try going into the jammit gem, in lib/controller.rb, and commenting out the before_filter at the bottom. I'd be curious to know if that fixes it.
from jammit.
Yes, removing the before_filter fixes the issue. Oh and I'm just using script/server, not Passenger, BTW.
from jammit.
Looking at your comment in jammit.rb for self.reload!, would it make more sense to put the before_filter in Jammit::Controller (if that's doable)? Or does every controller need to call reload! in development mode?
from jammit.
We need it to work for the jammit asset tag helpers for all of your views, so it's gotta be a before_filter on ApplicationController. There's always the option of taking it out, and having Jammit.reload! be something that you call yourself, but I'm sure we can work it out.
from jammit.
If you can, here's one last stab at getting the before_filter in place (working for me with cache_classes => false and script/server). I'm not pushing a new gem, but if you've got a clone of the git repo, you can do a rake gem:install to install yourself a 0.1.3....
Let me know if it works for you.
from jammit.
It looks like that's working now. Before this latest change, it wasn't actually loading any plugins. Now it looks like it's loading all my plugins and getting Jammit loaded too. I'll keep my fingers crossed that you've gotten to the bottom of this. Thanks for the quick resolution!
from jammit.
Okay, 0.1.3 it is. The difference is that before I was adding the before_filter to ApplicationController in development, which is blown away and reloaded from the source code on every development request -- now it's adding it directly to ActionController::Base, which should be more stable. Thanks for taking the time. Open this ticket back up if you have any more trouble -- you should be able to do things like set "package_assets" to "always" between requests.
from jammit.
Related Issues (20)
- New gem version? 0.6.6? HOT 17
- Error when running jammit 0.6.5 (ruby 1.9.3 + rails 3.2.8 + windows 7 64-bit) HOT 2
- Templates are not loaded on production
- What will be the max js file size for compression ?
- Segmentation fault when calling rake jammit:package HOT 2
- Per-file compile settings HOT 1
- JSMin should not be the default JS Minifier
- Adding path changes all JST paths HOT 2
- new tag/release needed to apply patch for Rails 4! HOT 8
- Jammit should warn when it fails to load an explicitly configured compressor. HOT 2
- what os the use in document cloud viewer ? HOT 1
- Remove jsmin from dependencies HOT 2
- Is there a way to use jammit independent of rails? HOT 2
- The character sequence backslash single quote breaks jst files
- Where are timestamps? HOT 2
- Produce an optional manifest of files being compiled
- rake aborted! when activesupport-3.0.20 fails to load jammit HOT 2
- NameError (undefined local variable or method `page_cache_directory' for #<Jammit::Controller:0x007f1daee33488>): HOT 4
- DEPRECATION WARNING: append_before_filter is deprecated and will be removed in Rails 5.1. Use append_before_action instead. HOT 1
- sdt
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jammit.