After cmd $ heroku create
Heroku provides you a PostgreSQL hence so it has to changed from SQLite before deploying it to Heroku. Follow manual given on https://devcenter.heroku.com/articles/rails3, and after $ heroku create, do some changes in file as mention below- Login to heroku.com dashboard and goto newly created app.
- Check if Addon Heroku Postgres Dev :: Teal is added if not add it manually.
- Login to https://postgres.heroku.com/ and under the respective app see the connection details of database.
Change in files
Change config/database.yml for production.development: adapter: sqlite3 database: db/production.sqlite3 pool: 5 timeout: 5000 #Details from https://postgres.heroku.com/app_name production: adapter: postgresql encoding: utf8 reconnect: false database: [Replace with database_name] pool: 5 username:[Replace with username] password: [Replace with password] host: [Replace with host]
Change Gemfile for production.
group :development, :test do gem 'sqlite3' end group :production do #Specially for heroku server gem 'rb' end
Please comment for any related problem..
No comments:
Post a Comment