I'm new to Rails.
I already have a project ready to be deployed.
I'm using Sqlite3 but I want to switch to Postgres.
I follow many tutorials but nothing works, so I need your help.
When I follow instructions from Railscast, it doesn't work : [http://railscasts.com/episodes/342-migrating-to-postgresql?view=asciicast][1]
When I run :
rake db:migrate
it return :
rake aborted! ActiveRecord::NoDatabaseError: FATAL: database "development" does not exis
When I run.. :
$ taps server sqlite://db/development.sqlite3 User password
..with the User I set up in database.yml,
I set "SECRET_KEY_BASE=mypassword" into .env.development fil.
Here is my database.yml :
development:
adapter: postgresql
encoding: utf8
database: development
pool: 5
username: FC
password:
test: &TEST
adapter: postgresql
encoding: utf8
database: test
pool: 5
username: FC
password:
it return :
/Users/fc/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require': cannot load such file -- rack/showexceptions (LoadError)
from /Users/fc/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /Users/fc/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from /Users/fc/.rvm/gems/ruby-2.3.0/gems/sinatra-1.0/lib/sinatra/showexceptions.rb:1:in `<top (required)>'
PG version :
psql (PostgreSQL) 9.4.4
which psql :
/usr/local/bin/psql
I'm lost at this point because nothing works.
How can I do the migration easily, step by step ?