In database.yml
(file di default rotaie-generati):rake su adattatore database incoerente con database.yml
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
Quando si esegue rake about
, ho questo errore:
Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded.
Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by
ActiveRecord).
Se aggiungo il pg
gemma, quindi rake about
fornisce questo risultato:
About your application's environment
Ruby version 2.1.0-p0 (x86_64-darwin13.0)
RubyGems version 2.2.2
Rack version 1.5
Rails version 4.1.0
JavaScript Runtime Node.js (V8)
Active Record version 4.1.0
Action Pack version 4.1.0
Action View version 4.1.0
Action Mailer version 4.1.0
Active Support version 4.1.0
Middleware Rack::Sendfile, ActionDispatch::Static, Rack::Lock, # <ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x007f8043154a30>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Reloader, ActionDispatch::Callbacks, ActiveRecord::Migration::CheckPending, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, Rack::Head, Rack::ConditionalGet, Rack::ETag
Environment development
Database adapter postgresql
Database schema version 0
Qualche idea sul perché questo sta accadendo? Voglio usare l'adattatore sqlite3.
Puoi condividere i contenuti completi di database.yml? –
In database.yml il tuo adattatore sta ancora specificando sqlite3, cambialo in postgresql come sotto – andreofthecape
Sto cercando di usare sqlite3 come adattatore, non postgres. Rake sta dicendo che sto usando l'adattatore Postgres, per qualche motivo. – sysofwan