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

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”?