ruby on rails - heroku rake db:migrate rake aborted! unable to open database -


i making way through ruby on rails tutorial on @ http://ruby.railstutorial.org/ , trying migrate demo_app database heroku.

heroku rake db:migrate     rake aborted!     unable open database file 

i have read on other stackoverflow posts people fixed entering

group :production, :staging   gem "pg" end  group :development, :test     gem "sqlite3-ruby", "~> 1.3.0", :require => "sqlite3" end 

in gemfile. entered gemfile , deleted old gemfile.lock , redid bundle install , rake db:migrate command. still receiving same error.

i brand new ruby, rails , heroku understand problem seems using sqlite locally , postgresql in production (on heroku). have install postgresql onto machine , re-migrate db? afraid not able more out of tutorials (or ruby on rails itself) if cannot use heroku.

kill it!

i having same problem , found no solutions. think doing in tutorials leading mangle database.yml file heroku generates.

i ended destroying heroku app

heroku destroy 

and creating new one, pushing fresh copy, , running

heroku create git push heroku master heroku rakedb:migrate 

this time worked fine! make sure have pg gem in gemfile production

group :production   gem "pg" end 

and add config/database.yml .gitignore file measure.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -