On Mar 25, 8:24 pm, Sean McGilvray <[email protected]> wrote:
> Yes that works. How do I fix the problem of the correct environment not
> loading?
>
Looks like nothing set the RAILS_ENV environment variable and so it
defaulted to development (things that run apps such as mongrel or
passenger usually have this as an explicit option in the
configuration). You need to either:
- always specify RAILS_ENV when doing something
- fiddle with the files appropriate to your shell and operating system
so that the environment variable is always set for you.
Fred
> Sean McGilvray & Sarena Byers
> Director
> Identity Theft Specialist
> Pre-Paid Legal Service's, Inc. NYSE:PPD
> Phone: 760-486-1019
> [email protected]http://www.transferhome.net
>
> On Wed, Mar 25, 2009 at 12:03 PM, Frederick Cheung <
>
> [email protected]> wrote:
>
> > On Mar 25, 6:58 pm, Sean McGilvray <[email protected]> wrote:
> > > No, my database.yml has the correct settings:
>
> > which implies that the correct environment isn't loaded. does
> > RAILS_ENV=production rake db:load_csv_data
> > work any better?
>
> > Fred
> > > production:
> > > adapter: mysql
> > > database: DB_NAME
> > > username: USER_NAME
> > > password: PASSWORD
> > > host: 127.0.0.1
>
> > > Sean McGilvray
> > > Executive Director
> > > Identity Theft Specialist
> > > Pre-Paid Legal Service's, Inc. NYSE:PPD
> > > Phone: 760-486-1019
> > > [email protected]http://www.transferhome.net
>
> > > On Wed, Mar 25, 2009 at 11:47 AM, Frederick Cheung <
>
> > > [email protected]> wrote:
>
> > > > On Mar 25, 6:41 pm, Sean McGilvray <[email protected]> wrote:
> > > > > Hello everyone,
> > > > > I am getting this database connection error when I run a rake task or
> > > > > when I try to send with ar_mailer. My app works fine that I know of
> > > > > but I went to import users into the database and this is what I get.
>
> > > > > rake db:load_csv_data --trace
> > > > > (in /home/greatcar/gcp)
> > > > > ** Invoke db:load_csv_data (first_time)
> > > > > ** Invoke environment (first_time)
> > > > > ** Execute environment
> > > > > ** Execute db:load_csv_data
> > > > > rake aborted!
> > > > > Access denied for user 'root'@'localhost' (using password: NO)
>
> > > > Should it be connecting as root ?
>
> > > > Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---