Coder Social home page Coder Social logo

Comments (9)

mikefresh avatar mikefresh commented on June 11, 2024

Same exact problem here, any solution?

from bullet.

flyerhzm avatar flyerhzm commented on June 11, 2024

I can't reproduce your problem, but I can give you two suggestions which maybe can solve the problem.

The error occurred in $GEM_PATH/gems/flyerhzm-bullet-1.4.0/lib/bullet.rb line 9

  1. You can add :: before ActionController,

    
    ::ActionController::Dispatcher.middleware.use Bulletware
    
  2. You can add a line before use Bulletware

    
    require File.join(File.dirname(__FILE__), "bulletware")
    ActionController::Dispatcher.middleware.use Bulletware
    

Let me know which method can solve the problem or none of them.

Thanks

from bullet.

KieranP avatar KieranP commented on June 11, 2024

The require line before the middleware line did the trick. The server starts up now.

However, while the growl notification says things are up and running, I get nothing via growl, nothing in log/bullet.log.... zip... nada... nilch... zero.

Here is my after initialize block:

config.after_initialize do
  Bullet.enable = true
  Bullet::Association.alert = true
  Bullet::Association.bullet_logger = true
  Bullet::Association.console = true
  begin
    require 'ruby-growl'
    Bullet::Association.growl = true
  rescue MissingSourceFile
  end
  Bullet::Association.rails_logger = true
end

Surely my codings not that perfect :-P

Edit: I tweaked around some. I had some queries that could have used :include on the finder. I added them, and one came back as being unused. So working on and off. Doesn't seem to handle very complex relationships well. Very nice idea though.

from bullet.

flyerhzm avatar flyerhzm commented on June 11, 2024

Really? Can you create a new project as the step by step example in README.textile and see if the growl and bullet.log work?
The plugin can handle complex relationships well if you see the spec/bullet_association_spec.rb, I think there's something wrong with others.
Can you track and ensure bulletware file is really required and excuted?

from bullet.

flyerhzm avatar flyerhzm commented on June 11, 2024

I found browser cache make this plugin not work very well. Can you disable the browser cache and check it again?

from bullet.

lostie avatar lostie commented on June 11, 2024

i had put the


config.after_initialize do
  Bullet.enable = true
  Bullet::Association.alert = true
  Bullet::Association.bullet_logger = true
  Bullet::Association.console = true
  Bullet::Association.growl = true
  Bullet::Association.rails_logger = true
end

on the file config/environments/development.rb

but when i start the server it returns me this error:


uninitialized constant Rails::Initializer::Bullet (NameError)

Am i doing something wrong?

Note: I have installed bullet as a gem

from bullet.

flyerhzm avatar flyerhzm commented on June 11, 2024

I guess you forgot to put


  config.gem 'flyerhzm-bullet', :lib => 'bullet', :source => 'http://gems.github.com'

to config/environment.rb

from bullet.

lostie avatar lostie commented on June 11, 2024

i have forgot to set that, but even do when i set it i get another error:


 uninitialized constant ActionController::Dispatcher (NameError)

from bullet.

flyerhzm avatar flyerhzm commented on June 11, 2024

It is beacuse bullet plugin/gem uses middleware which is introduced by rails 2.3.
I open another issue to support rails version before 2.3.

from bullet.

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.