Tagged Questions
45
votes
8answers
25k views
How to handle Ruby on Rails error: “Please install the postgresql adapter: `gem install activerecord-postgresql-adapter'”
Running a Ruby on Rails (RoR) app or Ruby code which uses the ActiveRecord framework, you get the error message:
Please install the postgresql adapter:
gem install
...
19
votes
16answers
11k views
Can't install pg gem on Windows
I've got 2 Ruby versions: 1.8.7 and 1.9.2 and PostgreSQL 8.3. I cant install pg gem on any of them. Getting this error:
C:/Development/Ruby187/bin/ruby.exe extconf.rb
checking for pg_config... yes
...
7
votes
2answers
2k views
Rails: encoding woes with serialized hashes despite UTF8
I've just updated from ruby 1.9.2 to ruby 1.9.3p0 (2011-10-30 revision 33570). My rails application uses postgresql as its database backend. The system locale is UTF8, as is the database encoding. The ...
21
votes
3answers
4k views
gem install pg can not bind to libpq
After upgrading to Ruby 1.9.3 (from 1.9.2 using system RVM) on Ubuntu 10.04.3, I removed all of my gems, and attempted to reinstall pg (ala bundle install pg).
It then threw an error and informed me ...
13
votes
5answers
4k views
Rails Resque workers fail with PGError: server closed the connection unexpectedly
I have site running rails application and resque workers running in production mode, on Ubuntu 9.10, Rails 2.3.4, ruby-ee 2010.01, PostgreSQL 8.4.2
Workers constantly raised errors: PGError: server ...
27
votes
3answers
3k views
NOTICES for sequence after running migration in rails on postgresql Application
When i run my migration in Rails application on postgresql i got following NOTICES
NOTICE: CREATE TABLE will create implicit sequence "notification_settings_id_seq" for serial column ...
7
votes
1answer
2k views
Trouble installing pg gem
Trying to install the pg gem gives me errors.
I'm using Ruby 1.9.3-p125 built using rbenv/ruby-build. I installed PostgreSQL using the one-click installer. I'm able to connect to the DB using ...
11
votes
8answers
12k views
Failing installing pg gem, “mkmf.rb can't find header files for ruby” (Mac OSX 10.6.5)
I just upgraded to rails3 and had a bit of a mess with macports/gems/databases to sort out. So I threw out all gems to install them fresh. Everything seems to be ok except for the aquirement of the pg ...
0
votes
2answers
147 views
Inserting an array using Sequel gem in PostgreSQL
i created a table with the following schema in code
DB.create_table :Pokemon do
primary_key :id
String :first_name
String :last_name
String :email
String :zipcode
String :company_name
...
12
votes
2answers
4k views
sudo gem install pg won't work
I'm trying to get Rails to work with PostgreSQL. Apparently one thing I need to do along the way is sudo gem install pg. When I do that, I get this:
jason@buster:~/projects$ sudo gem install pg
...
2
votes
1answer
2k views
Installing PL/Ruby for PostgreSQL
This is to enable the development of postgres functions with embedded ruby code,
but I have been unable to build it.
As advised by
...
5
votes
5answers
9k views
pg_config, ruby pg, postgresql 9.0 problem after upgrade, centos 5
After upgrade postgresql 8.1 to 9.0 ive noticed issues with libraries dependency. Postgresql works fine (connection, queries).
yum list postgresql*
Installed Packages
postgresql.i386 9.0.0-1PGDG.el5 ...
3
votes
3answers
2k views
Rails 3.1 with PostgreSQL: GROUP BY must be used in an aggregate function
I am trying to load the latest 10 Arts grouped by the user_id and ordered by created_at. This works fine with SqlLite and MySQL, but gives an error on my new PostgreSQL database.
Art.all(:order => ...
6
votes
3answers
2k views
Travis CI: FATAL: role does not exist
I'm trying to get my application working w/ Travis CI but I keep getting: FATAL: role "skateparks" does not exist. Any ideas on what I could be doing wrong? I've followed their documentation.
...
3
votes
3answers
209 views
Error requiring pg under rvm with postgres.app
I'm using Postgres.app on OS X (10.8.3). I have modified my PATH so that the bin folder for the app is before all others.
Rammy:~ phrogz$ which pg_config
...