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

  • Home
  • SEARCH
  • 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 9032681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:02:28+00:00 2026-06-16T08:02:28+00:00

Im trying to get my mysql test database setup and having a strange error,

  • 0

Im trying to get my mysql test database setup and having a strange error, these are my configurations

Gem file

source 'https://rubygems.org'

gem 'rails', '3.2.9'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem "mysql2"

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

group :test, :development do
  gem "rspec-rails", "~> 2.0"
  gem 'database_cleaner'
  gem 'capybara'
  gem "factory_girl_rails", ">= 4.1.0"
  gem 'cucumber-rails', :require => false
  gem 'mocha'
  gem "shoulda-matchers"
  gem "spork"
  gem 'guard-rspec'
  gem "guard-spork"
  gem 'rb-inotify', '~> 0.8.8' 
  gem 'cucumber-rails', :require => false
  gem 'cucumber-rails-training-wheels' #Still running on 'L' board
end

gem 'jquery-rails'
gem "twitter-bootstrap-rails"
gem "therubyracer", '0.10.2'
gem "less-rails"

gem 'devise'
gem 'omniauth-google-oauth2'
gem 'cancan'

# To use debugger
gem 'debugger'
gem 'ruby-prof'

my database.yml file

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
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: mysql2
  username: root
  password: root
  host: localhost
  database: bamboo_test

production:
  adapter: sqlite3
  database: db/production.sqlite3
  pool: 5
  timeout: 5000

cucumber:
  <<: *test

and this is the error I’m getting

[sameera@sameera bamboo]$ rake db:create:all
rake aborted!
can't convert nil into Hash
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/application/configuration.rb:115:in `database_configuration'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.9/lib/active_record/railties/databases.rake:25:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:create:all => db:load_config
(See full trace by running task with --trace)
[sameera@sameera bamboo]$ rake db:create:all --trace
** Invoke db:create:all (first_time)
** Invoke db:load_config (first_time)
** Execute db:load_config
rake aborted!
can't convert nil into Hash
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:196:in `merge!'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:196:in `block in visit_Psych_Nodes_Mapping'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each_slice'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `visit_Psych_Nodes_Mapping'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:205:in `block in visit_Psych_Nodes_Mapping'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `each_slice'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:190:in `visit_Psych_Nodes_Mapping'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/visitor.rb:7:in `accept'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/visitors/to_ruby.rb:16:in `accept'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych/nodes/node.rb:25:in `to_ruby'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/psych.rb:107:in `load'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/railties-3.2.9/lib/rails/application/configuration.rb:115:in `database_configuration'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.2.9/lib/active_record/railties/databases.rake:25:in `block (2 levels) in <top (required)>'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:228:in `call'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:228:in `block in execute'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:223:in `each'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:223:in `execute'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:185:in `each'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:185:in `invoke_prerequisites'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/home/sameera/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:159:in `invoke_with_call_chain'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/task.rb:152:in `invoke'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:143:in `invoke_task'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:101:in `each'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:101:in `block in top_level'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:110:in `run_with_threads'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:95:in `top_level'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:73:in `block in run'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/home/sameera/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
Tasks: TOP => db:create:all => db:load_config

It gives the error when loading the .yml file, but the file seems ok to me. Any help would be appreciated.

  • 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-06-16T08:02:29+00:00Added an answer on June 16, 2026 at 8:02 am

    The problem is that you reference the test environment alias in the cucumber section without actually creating it. Try to modify the test environment to this:

    test: &test
      adapter: mysql2
      username: root
      password: root
      host: localhost
      database: bamboo_test
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get data from MySQL database but in the php file
I'm trying to get mysql gem installed for use on rails, using jruby, can't
I'm trying to get the mysql gem installed with a fresh install of Snow
I'm trying to get my mysql data in ASP.net MVC3. The mysql Database Name
I'm trying to get a std::string from my database using mysql connexion Here is
I'm trying to get the $url value to display from the MySQL database but
I' trying to get some data from Oracle via ODBC to mySQL database. And
I am trying to import a large text file into a MySQL database. The
I'm trying to save a websites source to my MySQL database. The source is
I am having issues trying to get a database connection using the code below:

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.