PG pg_ext load error in rails
Asked Answered
N

2

9

I recently updated to rails 4.1.6 and ruby 2.1.3p242. I also updated all gems on my system. After creating a new app, I keep getting a pg_ext load file error on running the server. I'm on windows 8 x64 with PostgreSQL 9.3. The pg gem was working fine under my previous RoR installation which was rails 3.2 and ruby 1.9.3.

Under the gem's installation directory, I've a 2.0/pg_ext.so file. I tried renaming the folder to 2.1 and ran the server. The result was the same. I assume it's cause Ruby doesn't allow to Require a .so file. Below is the screenshot of the error:

enter image description here

Any help would be really appreciated. Thanks!

Naominaor answered 28/10, 2014 at 20:21 Comment(2)
You need to reinstall the pg gem under ruby 2.1Timeworn
I tried doing that. Did not workNaominaor
N
12

Posted question on the official Gem page:

https://bitbucket.org/ged/ruby-pg/issue/192/pg_ext-load-error

As per the suggestion, I installed the pre-version of the next release. That gave me another error which was solved using:

https://github.com/tzinfo/tzinfo/wiki/Resolving-TZInfo::DataSourceNotFound-Errors TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows

Posting the answer to help people facing similar problems in the future.

Naominaor answered 29/10, 2014 at 17:13 Comment(2)
Thanks. Using pre-release version solved the issue, for now. Cheers.Watford
No problems. I'm using it for Dev and testing too. Hopefully, they'll release the next stable version soon.Naominaor
G
6

1) In the command line enter:

gem install pg --pre
gem list pg

2) In the Gemfile set the gem to the newly installed version:

gem 'pg', '~> 0.18.2'
Gramercy answered 22/6, 2015 at 13:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.