Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Andrew Merrick
Andrew Merrick
20,151 Points

Heroku Deployment Issue

Hello - I'm trying to deploy my app to Heroku but it stated that sqlite3 isn't compatible. It got an error stating that sqlite3 1.3.8 isn't compatible with Heroku and that I would need to follow the instructions from the link: https://devcenter.heroku.com/articles/sqlite3. I've followed these instructions to a t but I keep getting the same errors when I attempt to run rake db:create (see next post).

6 Answers

Andrew Merrick
Andrew Merrick
20,151 Points

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

and

Couldn't create database for {"adapter"=>"postgresql", "database"=>"develeopment_db", "pool"=>5, "timeout"=>5000, "socket"=>"/tmp/.s.PGSQL.5432"}
could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Andrew Merrick
Andrew Merrick
20,151 Points

Here is my database.yml

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: postgresql # sqlite3
  database: develeopment_db # db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: postgresql # sqlite3
  database: test_db # db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: postgresql # sqlite3
  database: production_db # db/production.sqlite3
  pool: 5
  timeout: 5000
Andrew Merrick
Andrew Merrick
20,151 Points

Here is my gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.12'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

# gem 'sqlite3', '~> 1.3.8'

# Replaces gem 'sqlite3', '~> 1.3.8' to push to Heroku master.
gem 'pg'

# Installs Devise
gem 'devise'

# Installs bcrypt
gem "bcrypt-ruby", "~> 3.1.2"

# Install Simple Form
gem 'simple_form'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

gem 'rails_12factor', group: :production

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'
Andrew Merrick
Andrew Merrick
20,151 Points

Any help would be appreciated.

Anton Shtylman
PLUS
Anton Shtylman
Courses Plus Student 23,306 Points

I'm having the same issue. Was there ever any answer for this?

Andrew Merrick
Andrew Merrick
20,151 Points

@Anton: I never got an answer but I fixed it by removing all of my keys and starting over with Heroku. There was something wrong with my github key and the Heroku database not matching. Once I started from scratch it was fixed. I hope that helps.