Indeed, it was a configuration problem. The specification / spec _helper.rd pointed to the "test" environment. I changed it to "development" so that it refers to config / environment / development.rb
Regards, Fred
I am new to RoR and follow RoR 3.2 instructions from Michael Hartl.
When it comes to performing the first test (chapter 3.2.1), RSpec returns a hundred errors starting from this (and everyone looks the same bigger or smaller):
/home/fred/.rvm/gems/ ruby-1.9.3-p0@ODQ /gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:45:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
My DEV database is PostgreSQL and it works fine (migration works well).
Can someone help me figure out what is wrong and decide?
Thanks.
Gemfile:
source 'https://rubygems.org' gem 'rails', '3.2.1'
database.yml:
Environment:
Ruby version 1.9.3 (i686-linux) RubyGems version 1.8.15 Rack version 1.4 Rails version 3.2.1 JavaScript Runtime Node.js (V8) Active Record version 3.2.1 Action Pack version 3.2.1 Active Resource version 3.2.1 Action Mailer version 3.2.1 Active Support version 3.2.1 Middleware ActionDispatch::Static Rack::Lock #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0xa848460> Rack::Runtime Rack::MethodOverride ActionDispatch::RequestId Rails::Rack::Logger ActionDispatch::ShowExceptions ActionDispatch::DebugExceptions ActionDispatch::RemoteIp ActionDispatch::Reloader ActionDispatch::Callbacks ActiveRecord::ConnectionAdapters::ConnectionManagement ActiveRecord::QueryCache ActionDispatch::Cookies ActionDispatch::Session::CookieStore ActionDispatch::Flash ActionDispatch::ParamsParser ActionDispatch::Head Rack::ConditionalGet Rack::ETag ActionDispatch::BestStandardsSupport Application root /home/fred/rails_projects/ODQ Environment development Database adapter postgresql Database schema version 20120503135705
Fred
source share