Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Warning messages from ActiveRecord when used with FXRuby

#8

I am developing a desktop application that needs to save some information to a database. I am using ActiveRecord for this purpose. My code works fine when I don't require fox16 and include Fox. But once I do that I get a bunch of warnings:

  /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations.rb:100:
      warning: instance variable @choices not initialized
  /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/connection_adapters/abstract/database_statements.rb:116:
      warning: instance variable @transaction_joinable not initialized
  ... etc. ...

I tried changing the sequence of require statements but I still get the same warnings.

Reported by lyle (at lylejohnson) · November 9th, 2009 @ 10:59 PM

State: resolved
Milestone: 1.6.21
Assigned to: lyle (at lylejohnson) lyle (at lylejohnson)

Activity

  1. lyle (at lylejohnson)
    lyle (at lylejohnson)

    Since they are warning messages, they shouldn't be causing your program to fail (you just get a lot of noise in the console window). But I have a guess of what might fix it, if you can try something for me locally.

    For the purpose of this discussion, I'm going to assume that you've installed FXRuby via RubyGems, and that it's installed here:

    /opt/local/lib/ruby/gems/1.8/gems/fxruby-1.6.19

    I want you to make changes to two lines in this file from the FXRuby installation:

    /opt/local/lib/ruby/gems/1.8/gems/fxruby-1.6.19/lib/fox16/kwargs.rb

    The first line I want you to change is line 3. It currently reads:

      $VERBOSE = nil
    

    and I want you to change it to:

      old_verbose = $VERBOSE; $VERBOSE = nil
    

    The other line I want you to change is line 2740 (the last line), which currently reads:

      $VERBOSE = true
    

    and I want you to change it to read:

      $VERBOSE = old_verbose
    

    When you've changed those two lines, try running your program again and let's see if that doesn't clear up all those warnings from ActiveRecord.

    November 9th, 2009 @ 11:01 PM

  2. lyle (at lylejohnson)
    lyle (at lylejohnson)

    Original submitter replied:

    I made the changes you suggested and I don't see any warnings now. Earlier I also used to get a warning from rscribd gem code when I am using fox16, now that is gone too.

    November 9th, 2009 @ 11:01 PM

  3. lyle (at lylejohnson)
  4. lyle (at lylejohnson)
    lyle (at lylejohnson)
    • State changed from new to resolved

    (from [ed77236fb21adf17187b86e9f81e29da9c45d770]) Modified the generate_kwargs_lib.rb script so that it remembers the previous warning level the user had set instead of just assuming
    that warnings were turned on. [#8 Warning messages from ActiveRecord when used with FXRuby state:resolved]
    http://github.com/lylejohnson/fxruby/commit/ed77236fb21adf17187b86e...

    November 11th, 2009 @ 07:13 PM

  5. lyle (at lylejohnson)
    lyle (at lylejohnson)
    • Milestone order changed from 0 to 0

    (from [ed6af26685a586605164161d5aeb4c0c4d907ecc]) Modified the generate_kwargs_lib.rb script so that it remembers the previous warning level the user had set instead of just assuming
    that warnings were turned on. [#8 Warning messages from ActiveRecord when used with FXRuby state:resolved]
    http://github.com/lylejohnson/fxruby/commit/ed6af26685a586605164161...

    August 3rd, 2010 @ 09:32 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.