Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6639823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:35:59+00:00 2026-05-25T23:35:59+00:00

I just installed a Rails 3.1 app to my deployment server. When I tried

  • 0

I just installed a Rails 3.1 app to my deployment server.

When I tried to run

sudo rake db:setup RAILS_ENV=“production”

I got an error message saying

rake aborted!
undefined method `[]' for nil:NilClass

With –trace it says:

** Invoke db:setup (first_time)  
** Invoke db:create (first_time)  
** Invoke db:load_config (first_time)  
** Invoke rails_env (first_time)  
** Execute rails_env  
** Execute db:load_config  
** Execute db:create  
rake aborted!  
undefined method '[]' for nil:NilClass  
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.1.0/lib/active_record/railties/databases.rake:74:in 'rescue in create_database'  
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.1.0/lib/active_record/railties/databases.rake:54:in 'create_database'  
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-3.1.0/lib/active_record/railties/databases.rake:44:in 'block (2 levels) in <top (required)>'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in 'call'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:205:in 'block in execute'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in 'each'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:200:in 'execute'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:158:in 'block in invoke_with_call_chain'  
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in 'mon_synchronize'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in 'invoke_with_call_chain'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:176:in 'block in invoke_prerequisites'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:174:in 'each'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:174:in 'invoke_prerequisites'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:157:in 'block in invoke_with_call_chain'  
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in 'mon_synchronize'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:151:in 'invoke_with_call_chain'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/task.rb:144:in 'invoke'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:112:in 'invoke_task'    
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in 'block (2 levels) in top_level'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in 'each'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:90:in 'block in top_level'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in 'standard_exception_handling'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:84:in 'top_level'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:62:in 'block in run'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in 'standard_exception_handling'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in 'run'  
/usr/local/lib/ruby/gems/1.9.1/gems/rake-0.9.2/bin/rake:32:in '<top (required)>'  
/usr/local/bin/rake:19:in 'load'  
/usr/local/bin/rake:19:in '<main>'  
Tasks: TOP => db:setup => db:create  

My database.yml says

production:
adapter: mysql2  
    encoding: utf8  
    reconnect: false  
    database: t_production  
    pool: 5  
    username: deploy  
    password: V  
    host: localhost  

There is only 1 migration and it says this:

    class CreateDeals < ActiveRecord::Migration  
  def change  
    create_table :deals do |t|  
      t.string :title  
      t.text :description  
      t.string :image_url  
      t.decimal :price, :precision => 8, :scale => 2  
t.timestamps  
    end  
  end  
end  

What should I try to fix this? I’m not even sure where to begin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:36:00+00:00Added an answer on May 25, 2026 at 11:36 pm

    You should fix your statement, the double quotes are wrong. They need to be regular " quotes. It probably tries to load a setting for the “production” environment, which obviously doesn’t exist.

    If you are using the correct quotes, make sure your identation is correct, the definition should look something like the following:

    production:
        adapter: mysql2  
        encoding: utf8  
        reconnect: false  
        database: t_production  
        pool: 5  
        username: deploy  
        password: V  
        host: localhost  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We just installed Facebooker and Authlogic on a new Rails app, but the Canvas
I just installed rvm + rails 3+ on centos 6.0 at Rackspace cloud server.
I just installed Rails 3 and created my first app. The install of Rails3
Ok this is something weird. I got authlogic-oid installed in my rails app today.
I have just installed Rspec and Rspec-rails. When i try to run the test,
I just installed ckeditor into my rails app. Now i am trying to do
I just installed Rails, etc. on a Windows 7 machine. Created my first app,
I recently installed Rails 3.1 and now my old Rails 3.0 app won't rake
I just installed passenger (apache2) on my ubuntu server to deploy my rails 3.1
I've installed Devise for my Rails app (3.0.1) and it's mostly working. I just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.