Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7921597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:38:28+00:00 2026-06-03T16:38:28+00:00

Studying at http://ruby.railstutorial.org/ version 3.2 Stucked in the end of 6.2.1 section with the

  • 0

Studying at http://ruby.railstutorial.org/ version 3.2

Stucked in the end of 6.2.1 section with the following:

$ bundle exec rake db:test:prepare
rake aborted!
FATAL:  no pg_hba.conf entry for host "192.168.108.1", user "sample_user", database "postgres", SSL on
FATAL:  no pg_hba.conf entry for host "192.168.108.1", user "sample_user", database "postgres", SSL off

Tasks: TOP => db:test:load => db:test:purge

192.168.108.1 is my ip. Why is it looking for it, if I have another entry in database.yml?
User sample_user is owner of all databases and has CREATEDB on them.
I can successfuly connect to any database on 192.168.108.2 with psql from 192.168.108.1

How cat I overcome it, still using remote postgres?

Gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.0'
gem 'pg', '0.12.2'

group :development, :test do
  gem 'rspec-rails', '2.9.0'
end

group :assets do
  gem 'sass-rails',   '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.0'

group :development do
gem 'annotate', '~> 2.4.1.beta'
end

group :test do
  gem 'capybara', '1.1.2'
  gem 'spork', '0.9.0'
end

database.yml

common: &common
    adapter: postgresql
    username: sample_user
    password: qwerty123
    host: 192.168.108.2

development:
    <<: *common
    database: sample_db_dev

test:
    <<: *common
    database: sample_db_tst

production:
    <<: *common
    database: sample_db_pro

pg_hba.conf on 192.168.108.2

host    sample_db_dev   sample_user 192.168.108.1/32   md5
host    sample_db_tst   sample_user 192.168.108.1/32   md5
host    sample_db_pro   sample_user 192.168.108.1/32   md5

have no local pg_hba.conf on 192.168.108.1

ruby 1.9.3p125
Rails 3.2.3
psql (PostgreSQL) 8.4.11

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:38:30+00:00Added an answer on June 3, 2026 at 4:38 pm

    pg_hba.conf is a file on the PostgreSQL server to define which users are allowed to connect to which databases from which hosts using what authentication methods.

    http://www.postgresql.org/docs/8.4/interactive/auth-pg-hba-conf.html

    So, that message is telling you that the server hasn’t been told to allow the connection you are attempting. You must either make a connection which PostgreSQL has been told to allow, or tell it to allow this one by updating the pg_hba.conf file.

    If you don’t have access to server, and whoever does has not chosen to grant you PostgreSQL connection rights, you can’t connect. That’s the nature of security.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While studying for the Zend PHP Exam I came across the following contradicting information:
I'm studying for a finite automata & grammars test and I'm stuck with this
I'm studying for a test on PDA, and I want to know how to
I am studying this page: http://www.fxstreet.com/rates-charts/currency-rates/ which is continually updated by JavaScript with new
I am studying the css reset of S. Meyer, found here: http://meyerweb.com/eric/tools/css/reset/ My question
I am studying the LunarLander example in the Android sample code: http://developer.android.com/resources/samples/LunarLander/index.html I am
I'm studying Knockoutjs and I'm doing some low-level experiments. Following an existing jsFiddle ko
I'm studying this code: http://www.w3style.co.uk/a-lightweight-and-flexible-front-controller-for-php-5 In it the author uses a static function to
I was studying Ray Tracing on http://www.devmaster.net/articles/raytracing_series/part1.php when I came across this piece of
I was studying Perlin's Noise through some examples @ http://dindinx.net/OpenGL/index.php?menu=exemples&submenu=shaders and couldn't help to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.