Warning messages from ActiveRecord when used with FXRuby
Reported by lyle (at lylejohnson) | November 9th, 2009 @ 10:59 PM | in 1.6.21
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.
Comments and changes to this ticket
-
lyle (at lylejohnson) November 9th, 2009 @ 11:01 PM
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.
-
lyle (at lylejohnson) November 9th, 2009 @ 11:01 PM
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.
-
lyle (at lylejohnson) November 11th, 2009 @ 07:01 PM
- Tag set to rubyforge
-
lyle (at lylejohnson) November 11th, 2009 @ 07:13 PM
- 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 state:resolved]
http://github.com/lylejohnson/fxruby/commit/ed77236fb21adf17187b86e... -
lyle (at lylejohnson) August 3rd, 2010 @ 09:32 PM
- 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 state:resolved]
http://github.com/lylejohnson/fxruby/commit/ed6af26685a586605164161...
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
FXRuby is a library for developing powerful and sophisticated cross-platform graphical user interfaces (GUIs) for your Ruby applications. It’s based on the FOX Toolkit, a popular open source C++ library developed by Jeroen van der Zijp. What that means for you as an application developer is that you’re able to write code in the Ruby programming language that you already know and love, while at the same time taking advantage of the performance and functionality of a featureful, highly optimized C++ toolkit.
People watching this ticket
Tags
Referenced by
- 8 Warning messages from ActiveRecord when used with FXRuby (from [ed77236fb21adf17187b86e9f81e29da9c45d770]) Modifie...
- 8 Warning messages from ActiveRecord when used with FXRuby (from [ed6af26685a586605164161d5aeb4c0c4d907ecc]) Modifie...