Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pg gem version in the Gemfile #1649

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

takatea
Copy link
Contributor

@takatea takatea commented Feb 17, 2024

This PR updates the pg gem version in the Gemfile for developing this project.

Details

While setting up my local environment for this project, I encountered an error during bundle install related to the installation of the pg gem:

pg_binary_decoder.c:115:20: error: call to undeclared function 'rb_tainted_str_new'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

This error was resolved by updating the pg gem to the latest version (1.5.x) from the old version (0.11.x). This allowed me to successfully run bundle install.
Additionally, I could run bundle exec rake and see all the tests pass.

How about this change?

Environment

I have tested this change with the following environment:

gcc

gcc -v
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: x86_64-apple-darwin22.5.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

postgresql

psql --version psql
psql (PostgreSQL) 14.11 (Homebrew)

Ruby

ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]

@alexreisner
Copy link
Owner

alexreisner commented Feb 18, 2024

Thanks for this. And yes, I think it's safe to bump the pg version number. However, Geocoder currently supports Ruby >=2.1, and pg 1.5 requires Ruby 2.5+, so that's a problem. The latest version of pg that supports Ruby 2.1 is 1.1.4. Does pg v1.1.4 install correctly on your system? If so, let's bump it to that instead.

@takatea
Copy link
Contributor Author

takatea commented Feb 19, 2024

@alexreisner
Thank you for your comment!
I got the same error described the description when I tried to change the pg version to 1.1.4 and then ran bundle install...

@alexreisner
Copy link
Owner

Can you try troubleshooting your install of the pg gem, maybe by using the option discussed here? We can't bump the pg version past 1.1.4.

@takatea
Copy link
Contributor Author

takatea commented Mar 1, 2024

@alexreisner

Thanks!
I got that Ruby 2.1 need to be supported!
So, I am trying to change pg gem version to => 0.11 in Gemfile and trying to test with Ruby 2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants