WebFaction
Community site: login faq

I am in the process of setting up a Rails 3.1 application on Webfaction, using the instructions outlined in the documentation.

When attempting to load the database schema, I use the following command:

rake db:schema:load ENV=production --trace

But the following error occurs:

** Invoke db:schema:load (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `[]' for false:FalseClass
/home/chrisalley/webapps/adoptadog/gems/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:59:in `establish_connection'
/home/chrisalley/webapps/adoptadog/gems/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:55:in `establish_connection'
/home/chrisalley/webapps/adoptadog/gems/gems/activerecord-3.1.0/lib/active_record/railtie.rb:69
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/lazy_load_hooks.rb:26:in `on_load'
/home/chrisalley/webapps/adoptadog/gems/gems/activerecord-3.1.0/lib/active_record/railtie.rb:67
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `run_initializers'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `send'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/chrisalley/webapps/adoptadog/adoptadog/config/environment.rb:5
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
/home/chrisalley/webapps/adoptadog/gems/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:240:in `require'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/application.rb:78:in `require_environment!'
/home/chrisalley/webapps/adoptadog/gems/gems/railties-3.1.0/lib/rails/application.rb:189
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/local/ruby1.8.7ee/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/usr/local/ruby1.8.7ee/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/home/chrisalley/webapps/adoptadog/gems/gems/rake-0.9.2/bin/rake:32
/home/chrisalley/webapps/adoptadog/bin/rake:19:in `load'
/home/chrisalley/webapps/adoptadog/bin/rake:19
Tasks: TOP => db:schema:load => environment

My database.yml file looks like this:

# SQLite version 3.x
#   gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: postgresql
  encoding: unicode
  database: chrisalley_adoptadog
  host: localhost
  username: chrisalley_adoptadog
  password: [Removed]

Any idea what I'm doing wrong?

asked 06 Oct '11, 08:31

Uriptical
12
accept rate: 0%

edited 06 Oct '11, 08:33

"ENV=production" doesn't look quite right to me. I believe that should be "RAILS_ENV=production"

Also, are you sure that your /home/chrisalley/webapps/adoptadog/adoptadog/config/database.yml file contains what you're showing in your question?

(06 Oct '11, 18:12) seanf

Thanks, that fixed it. And you were right about database.yml; for some reason it was empty.

permanent link

answered 07 Oct '11, 22:44

Uriptical
12
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×107
×28

question asked: 06 Oct '11, 08:31

question was seen: 2,335 times

last updated: 07 Oct '11, 22:44

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM