# Active Record Connection works from script, but not from Apache CGI...?

**URL:** <https://www.ruby-forum.com/t/active-record-connection-works-from-script-but-not-from-apache-cgi/138914>\
**Category:** Ruby\
**Created:** [May 28, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/active-record-connection-works-from-script-but-not-from-apache-cgi/138914 "2008-05-28T23:15:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xeno\_C](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/958977/32.png) [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Post date:** [May 28, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/active-record-connection-works-from-script-but-not-from-apache-cgi/138914/1 "2008-05-28T23:15:39Z")

</div>

ActiveRecord::Base.establish\_connection(@@DBCfg[RAILS\_ENV])

where my little @@DBCfg[RAILS\_ENV] demonstrably has the correct path to  
the local rails directory representing the data I want to get. But, I’m  
failing on this establish\_connection, and it’s complaining about an  
“Insecure operation”. I would like security if it’s easy, but I’m  
stumped on what security it’s asking for, and why I didn’t get the  
diagnostic from a shellscript that used virtually the same code…?

Is there a way to designate to this Rails Active Record connection that  
I either don’t want the security, or “here’s my security thingy”?
