Set project to pg postgres and send to heroku

 1.1 remove sqlite gem  if exist already

 1.2 remove sqlite from the gitignore or search in full application and remove anywhere otherwise it will give the error 

2. add pg gem

3. bundle

4. Change the code inside database.yml :: like this ::

........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

# PostgreSQL. Versions 9.3 and up are supported.

#

# Configure Using Gemfile

# gem 'activerecord-jdbcpostgresql-adapter'

#

default: &default

  adapter: postgresql

  encoding: unicode

  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>

  username: postgres

  password: postgres


development:

  <<: *default

  database: DemoApp

  

test:


  <<: *default

  database: DemoApp


production:

  <<: *default

  database: DemoApp

  username: postgres

  password: postgres

..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Then :: rake db:create + rake db:migrate

5. heroku login  + heroku create +heroku logout are commands for heroku
6. check git branch + 
7. git push heroku master

Comments

Popular posts from this blog

Rails 7 Features :: Comparison with Rails 6 and Rails 5