Code Monkey home page Code Monkey logo

Comments (15)

 avatar commented on June 30, 2024

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.

 avatar commented on June 30, 2024

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.

ncdc avatar ncdc commented on June 30, 2024

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.

 avatar commented on June 30, 2024

Did 0.1.2 fix it? -- it may have been interfering with the autoloading.

from jammit.

ncdc avatar ncdc commented on June 30, 2024

Trying now - looks like we were both posting updates here at the same time :)

from jammit.

ncdc avatar ncdc commented on June 30, 2024

Yes, it looks like your fix in 0.1.2 did the trick. Thanks!

from jammit.

 avatar commented on June 30, 2024

Wonderful -- I'll update the change log now and make it official. Thanks for reporting it.

from jammit.

ncdc avatar ncdc commented on June 30, 2024

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.

 avatar commented on June 30, 2024

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.

ncdc avatar ncdc commented on June 30, 2024

Yes, removing the before_filter fixes the issue. Oh and I'm just using script/server, not Passenger, BTW.

from jammit.

ncdc avatar ncdc commented on June 30, 2024

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.

 avatar commented on June 30, 2024

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.

 avatar commented on June 30, 2024

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.

ncdc avatar ncdc commented on June 30, 2024

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.

 avatar commented on June 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.