postgresql - How to find database name in rails console -
this odd. in rails 4 database.yml have following:
development: adapter: postgresql encoding: unicode database: inspector_development password: pool: 5
i copied production database heroku , imported using form local copy of postgresql
curl -o latest.dump `heroku pgbackups:url --account personal` pg_restore --verbose --clean --no-acl --no-owner -h localhost -u sam -d inspector_development latest.dump
the result showed 88 expected users in pgadmin in inspector_development database on osx. however, after restarting rails app, user table still shows 1 user, not 88 see in pgadmin.
i've googled how determine rails sees properties of database name in order determine finding these non-existent records?
looking more closely @ user table in pgadmin see 0 columns. perhaps pgadmin mistaken? i'm unable determine db rails looking can troubleshoot this, thx, sam
this works in rails 3 , rails 4
activerecord::base.connection.current_database
but works drivers have implemented method. example, not work sqlite work mysql , postgres.
Comments
Post a Comment