Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
@chences: Take a look at <a href=“https://www.digitalocean.com/community/articles/how-to-1-click-install-ruby-on-rails-on-ubuntu-12-10-with-digitalocean”>https://www.digitalocean.com/community/articles/how-to-1-click-install-ruby-on-rails-on-ubuntu-12-10-with-digitalocean</a>
If you have already spun up a droplet off of that one-click image you can remove mysql and replace it with postgres: <pre>sudo apt-get remove mysql-server-core</pre>
Install Postgres:
<a href=“https://www.digitalocean.com/community/articles/how-to-install-and-use-postgresql-on-ubuntu-12-04”>https://www.digitalocean.com/community/articles/how-to-install-and-use-postgresql-on-ubuntu-12-04</a>
Configure it <strong>(start from the <pre>Installing Postgres</pre> section)</strong>:
<a href=“https://www.digitalocean.com/community/articles/how-to-setup-ruby-on-rails-with-postgres”>https://www.digitalocean.com/community/articles/how-to-setup-ruby-on-rails-with-postgres</a>
This did not work for me.
I needed to add this line to database.yml for both test and dev db’s : host: localhost
http://www.postgresql.org/download/linux/ubuntu/ is necessary to start this process. Also you’re going to need to create a DB cluster and users http://www.postgresql.org/docs/9.1/interactive/creating-cluster.html
Ugh, I keep getting this error when using rake db:setup. I also tried rake db:migrate. And lastly bundle exec rake db:create. For all I get this error:
rake aborted! database configuration does not specify adapter
I even tried deleted the rails files and putting them into a different directory under /home/rails/ I’ve searched the Internet. I also tried editing my database.yml file several times to no avail.
Any idea what is causing the adapter problem? I have this in my database.yml:
production: adapter: postgresql encoding: unicode database: acsjvl_production username: acsjvl password: ######
Help! Thank you!
There is a step missing in the above Setting Up Postgres Create a Postgres user for the Rails app we’ll create in the next step. To do this, switch into the Postgres user: su - postgres Then create a user (or a “role”, as Postgres calls it): # this is where the missing step should be create role myapp with createdb login password ‘password1’ The missing step is psql Then you can enter “create role myapp with createdb login password ‘password1’” sucessfully
If you have homebrew:
brew install postgresql
ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
createdb -h localhost
gem install pg rbenv rehash
I wanted to say thank you. I’ve been struggling to get Rails working with PostgreSQL. I didn’t get my project working until reading your article and using the accompanying comments.
Again, thanks to the author and commenters!