ruby on rails - Using PG for ROR -


i using pg in application

here database.yml file

default: &default   adapter: postgresql   pool: 5   timeout: 5000  development:   <<: *default   database: testing_development  # warning: database defined "test" erased , # re-generated development database when run "rake". # not set db same development or production. test:   <<: *default   database: db/test.sqlite3  production:   <<: *default   database: db/production.sqlite3 

when ran rake db:create got:

pg::syntaxerror: error:  syntax error @ or near "." line 1: create database "db/test"."sqlite3" encoding = 'utf8'                              ^ : create database "db/test"."sqlite3" encoding = 'utf8' 

how fix this?

when running rake db:create, tries create databases you, need name test , production databases properly. database names can't contain periods.

i.e., if application name testing:

test:   <<: *default   database: testing_test  production:   <<: *default   database: testing_production 

Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -