I currently have Ruby on Rails installed via RVM in Ubuntu 12.04. The default database is set up in SQLite3, but I'd like to switch to PostgreSQL for the purposes of pushing to Heroku. How can I accomplish this?
sudo sh -c "echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' > /etc/apt/sources.list.d/pgdg.list" wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - sudo apt-get update sudo apt-get install postgresql-common sudo apt-get install postgresql-9.3 libpq-dev |
|||
|
Here are the steps I've followed: Install PostgreSQL and development package
Set up a user that is the same as my Ubuntu log-in
Modify Gemfile
Modify
Run bundle install
Create databases and migrations
Here are the sources I used to help: |
|||||||||||||||||||||
|
For all
since there isn't an official Postgres repository for Then create the user as
Note: Replace the The easiest way to create your rails application is to specify you are using
The code above will automatically add the
Note: You need to change the username and to specify the correct password if you have set such. Then run |
|||