Bonjour à tous,
Par défaut, sqlite3 est livré avec RoR.
J'aimerais migrer mon mini projet sous PGsql. Je bloque à la commande suivante :
L'erreur est la suivante :
Couldn't create database for {"adapter" => "postgresql" , "database"...
Voici le fichier config.yml
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: postgresql
  database: fi_app_dev_db
  pool: 5
  timeout: 5000
  username: root
  password: root
  port: 5433
  host: localhost
 
# 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: postgresql
  database: fi_app_test_db
  pool: 5
  timeout: 5000
  host: localhost
  username: root
  password: root
 
production:
  adapter: postgresql
  database: fi_app_prod_db
  pool: 5
  timeout: 5000
Par défaut sublime text l'affiche avec deux espaces d'indentations, j'ai donc essayé avec quatres, rien y fait ...

J'ai prealablement fait gem install pg

L'erreur peut venir d'où ?

Cordialement ,


EDIT : ce n'est pas root mais postgres