# ActiveRecord

**URL:** <https://www.ruby-forum.com/t/activerecord/76872>\
**Category:** Ruby\
**Created:** [November 21, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/activerecord/76872 "2006-11-21T21:56:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 21, 2006, 9:56pm UTC](https://www.ruby-forum.com/t/activerecord/76872/1 "2006-11-21T21:56:59Z")

</div>

First Post.

Totally new to Ruby and am trying ActiveRecord.

I’ve written a standalone script but it produces the following warnings  
before running and outputting the correct results.

Any pointers, please?

-Ants

script …

#!/usr/bin/ruby -w

require “rubygems”;  
require\_gem “activerecord”

ActiveRecord::Base.establish\_connection(  
:adapter =\> ‘mysql’,  
:host =\> ‘localhost’,  
:database =\> ‘book\_shop’,  
:username =\> ‘anthony’,  
:password =\> ‘’  
)

class Book \< ActiveRecord::Base  
end

book = Book.find(1)  
puts book.author  
puts book.title  
puts book.pages

warnings …

/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/validations.rb:334:  
warning: `*' interpreted as argument prefix /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/validations.rb:363: warning:`\*’ interpreted as argument prefix  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/migration.rb:224:  
warning: instance variable @ignore\_new\_methods not initialized  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/migration.rb:224:  
warning: instance variable @ignore\_new\_methods not initialized  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:41:  
warning: method redefined; discarding old allow\_concurrency=  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/connection\_adapters/sqlserver\_adapter.rb:456:  
warning: method redefined; discarding old remove\_column  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/connection\_adapters/oracle\_adapter.rb:119:  
warning: (…) interpreted as grouped expression  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/connection\_adapters/abstract/connection\_specification.rb:74:  
warning: instance variable @active\_connection\_name not initialized  
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active\_record/base.rb:695:  
warning: instance variable @columns not initialized

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 21, 2006, 10:33pm UTC](https://www.ruby-forum.com/t/activerecord/76872/2 "2006-11-21T22:33:09Z")

</div>

On Nov 21, 2006, at 12:55 PM, Anthony G. wrote:

> First Post.
> 
> Totally new to Ruby and am trying ActiveRecord.
> 
> I’ve written a standalone script but it produces the following  
> warnings before running and outputting the correct results.
> 
> Any pointers, please?

Rails sucks in this regard, really sucks.

You’re out of luck.

Just remove the -w and shake your fists in frustration that you can’t  
find warnings in your own code.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 21, 2006, 10:39pm UTC](https://www.ruby-forum.com/t/activerecord/76872/3 "2006-11-21T22:39:12Z")

</div>

On 11/21/06, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Rails sucks in this regard, really sucks.
> 
> You’re out of luck.
> 
> Just remove the -w and shake your fists in frustration that you can’t  
> find warnings in your own code.

This is really, really sad.

Cameron

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 21, 2006, 11:23pm UTC](https://www.ruby-forum.com/t/activerecord/76872/4 "2006-11-21T23:23:16Z")

</div>

On Nov 21, 2006, at 4:15 PM, Eric H. wrote:

> > > >
> > 
> > This is really, really sad.
> 
> Yes. I wrote a patch to fix it but it was ignored.

Ouch. They didn’t apply it or refused it? That’s disappointing  
either way.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 21, 2006, 11:15pm UTC](https://www.ruby-forum.com/t/activerecord/76872/5 "2006-11-21T23:15:15Z")

</div>

On Nov 21, 2006, at 1:38 PM, Cameron McBride wrote:

> > > Any pointers, please?
> > 
> > Rails sucks in this regard, really sucks.
> > 
> > You’re out of luck.
> > 
> > Just remove the -w and shake your fists in frustration that you can’t  
> > find warnings in your own code.
> 
> This is really, really sad.

Yes. I wrote a patch to fix it but it was ignored.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 21, 2006, 11:31pm UTC](https://www.ruby-forum.com/t/activerecord/76872/6 "2006-11-21T23:31:17Z")

</div>

On 11/22/06, James Edward G. II [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > > > I’ve written a standalone script but it produces the following  
> > > > > find warnings in your own code.
> > > 
> > > This is really, really sad.
> > 
> > Yes. I wrote a patch to fix it but it was ignored.
> 
> Ouch. They didn’t apply it or refused it? That’s disappointing  
> either way.

Wow, and I had so much respect for the rails camp. Though maybe they  
are busy on something else…

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 22, 2006, 5:09am UTC](https://www.ruby-forum.com/t/activerecord/76872/7 "2006-11-22T05:09:52Z")

</div>

On Nov 21, 2006, at 2:21 PM, James Edward G. II wrote:

> > > > > warnings before running and outputting the correct results.
> > > 
> > > This is really, really sad.
> > 
> > Yes. I wrote a patch to fix it but it was ignored.
> 
> Ouch. They didn’t apply it or refused it? That’s disappointing  
> either way.

I think it ended up being both. They accepted a patch for  
ActionMailer, so I wrote one for the rest of Rails, then it was  
ignored for three months, then it was rejected because it had bitrotted.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 22, 2006, 11:40am UTC](https://www.ruby-forum.com/t/activerecord/76872/8 "2006-11-22T11:40:20Z")

</div>

On 11/22/06, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Just remove the -w and shake your fists in frustration that you can’t  
> find warnings in your own code.

Well, or the slightly less extreme 2\>&1 | grep -v ‘lib/active\_record’  
🙂 But I agree that rails sucks in that respect.

m.

---

<div class="post-metadata">

**Author:** ![acgreen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3bc359/32.png) [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Post date:** [November 22, 2006, 10:08am UTC](https://www.ruby-forum.com/t/activerecord/76872/9 "2006-11-22T10:08:11Z")

</div>

riiiiiiiiiiiiiiiiiiiiiiight!!

that’s a good start 😉

I like Perl’s DBIx::Class stuff (seems more flexible than ActiveRecord)  
but will continue with Ruby for now.

i have played around with Rails with ActiveRecord but never saw any  
warnings like these (maye I wasn’t running under -w)

Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: On Nov 21, 2006, at 2:21 PM,  
James Edward G. II wrote:

> > > > > warnings before running and outputting the correct results.
> > > 
> > > This is really, really sad.
> > 
> > Yes. I wrote a patch to fix it but it was ignored.
> 
> Ouch. They didn’t apply it or refused it? That’s disappointing  
> either way.

I think it ended up being both. They accepted a patch for  
ActionMailer, so I wrote one for the rest of Rails, then it was  
ignored for three months, then it was rejected because it had bitrotted.

–  
Eric H. - removed\_email\_address@domain.invalid - [http://blog.segment7.net](http://blog.segment7.net)  
This implementation is HODEL-HASH-9600 compliant

[http://trackmap.robotcoop.com](http://trackmap.robotcoop.com)

Send instant messages to your online friends

> **[Yahoo | Mail, Weather, Search, Politics, News, Finance, Sports & Videos](https://www.yahoo.com/)**
>
> Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!
