Install PostgreSQL:
sudo zypper install postgresql-server postgresql-devel
Start the database server:
sudo systemctl start postgresql
Enable server to be started on boot:
sudo systemctl enable postgresql
Switch to the postgres user to set up the database:
sudo su -l postgres
Create database user:
createuser -d USERNAME
Return to your normal user, exchange the database driver in the Gemfile from sqlite3 to pg and run
bundle install
Change the configuration of the database driver to something like:
default: &default adapter: postgresql username: cs development: <<: *default database: APPNAME_development test: <<: *default database: APPNAME_test production: <<: *default database: APPNAME_productionCreate the databases:
rake db:create
rake db:migrate
rake db:migrate RAILS_ENV=test
That's it.