pgsql gem install encoding error

Hi everyone,

I am trying to install pgsql gem, but I have some strange encoding issue
when trying to install. Whole app have just been migrated (mv) from
windows environment to Linux environment, but only default gemfile was
used. I have found that way to solve is to change locale in registry.rb,
but as I mentioned, my environment is Linux. Gist of gem_make.out can be
viewed here: https://gist.github.com/alankis/66fe0b3d80d0373dc01e

postgresql is installed and runing:

$ service postgresql status
9.3/main (port 5432): online

EDIT: Seems that this issue is only happening with pgsql gem, other gems
are installing sucessfuly, for example, running $ gem install A_123
installs specified gem successfully.

OS: Linux alan-desktop 3.16.0-45-generic #60~14.04.1-Ubuntu SMP Fri Jul
24 21:16:23 UTC 2015 x86_64 x86_64 x86_64 GNU/Lin

Rails version: Rails 4.2.1

Ruby version: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

Thanks in advance,

Hi, Are you using git? Is everything committed? do you have the postgresql-common and the
libpq-dev

I got some similar problem but due to git.

Hope it helps! :slight_smile:

Julio

Hi everyone,

I am trying to install pgsql gem, but I have some strange encoding issue
when trying to install. Whole app have just been migrated (mv) from
windows environment to Linux environment, but only default gemfile was
used. I have found that way to solve is to change locale in registry.rb,
but as I mentioned, my environment is Linux. Gist of gem_make.out can be
viewed here: https://gist.github.com/alankis/66fe0b3d80d0373dc01e

Is there a reason you're trying to install pgsql rather than the more common pg gem? It doesn't look like pgsql has been updated in some time.

Fred

JĂșlio Papel wrote in post #1178063:

Hi, Are you using git? Is everything committed? do you have
the postgresql-common and the
libpq-dev

I got some similar problem but due to git.

Hope it helps! :slight_smile:
Julio

On Wednesday, August 19, 2015 at 9:18:07 PM UTC+2, Ruby-Forum.com User

Hi, Julio,

According to similar question on SO it seems that installing ruby-dev
headers for compiling extension modules did the trick.

sudo apt-get install ruby-dev && sudo gem install pg