Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
4 votes
1 answer
1k views

error: call to undeclared function 'mysql_ssl_set'; ISO C99 and later do not support implicit function declarations

I'm trying to gem install mysql2 ~/s/r/railties> gem install mysql2 Fetching mysql2-0.5.6.gem Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: ...
Dorian's user avatar
  • 8,962
3 votes
1 answer
2k views

client.c:178:24: error: call to undeclared function 'rb_tainted_str_new2'; ISO C99 and later do not support implicit function declarations

I was trying to install mysql2 gem on macOS Sonoma 14.2.1 and first got the error: > gem install mysql2 ... ld: library 'zstd' not found ... Then: > gem install mysql2 -- --with-ldflags=-L(brew ...
Dorian's user avatar
  • 8,962
0 votes
0 answers
42 views

MySQL - Select the maximum from a column based on an association

I am working with Rails 6.1.7 and attempting to write this with Arel. In this situation, I have 2 models, that have a polymorphic relationship to each other. Model A has_many associated Model B ...
SlothJesus's user avatar
0 votes
0 answers
148 views

MySQL - How to generate a hashing password with salt in caching_sha2_password format

In MySQL 5.7, I used to create a hashing password in Ruby by def generate_mysql_password(plaintext_password) digest = OpenSSL::Digest.new('sha1', OpenSSL::Digest.new('sha1', plaintext_password)....
binhdt2611's user avatar
0 votes
0 answers
223 views

Cant install Mysql2 Gem::Ext::BuildError: ERROR: Failed to build gem native extension

Im using ruby '2.7.5' and rails '6.0.4.7' on WSL2 I'm trying to install the mysql2 gem but I keep getting the following error: Gem::Ext::BuildError: ERROR: Failed to build gem native extension. ...
JulioCarvalho's user avatar
-2 votes
1 answer
157 views

Connecting to a MySQL Docker Container from Rails

I've provided my docker-compose and database config files below. I'm trying to connect my rails app to a containerized mysql instance. # docker-compose.yml version: '3' services: db: image: ...
wubbalubba's user avatar
0 votes
0 answers
38 views

how to find missing indices in mysql using rspec? [duplicate]

I need to identify missing indices in mysql before deploy to production. For example, analyze rspec test. My stack: sinatra sequel gem mysql It is preferable ORM-agnostic solution or for sequel ORM ...
gayavat's user avatar
  • 19.3k
0 votes
1 answer
47 views

MYSQL Weird behaviour in grouping

I have transactions table with a description column. While testing, I observed an unusual behaviour. There were not completely similar descriptions "Circle K Skövde" and "Circle K ...
Aditya Gadekar's user avatar
-1 votes
1 answer
89 views

docker container connect with remote mysql DB

i have a ruby script inside a docker container, normally this script (without container) is connected with a remote online mysql DB, but when i dockerize it connection with this DB doesn't work. i ...
YasuoPlayer's user avatar
0 votes
0 answers
77 views

MySQL gem Failed to Build: Ruby(1.8.7) Rails(2.0.2)

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension Running bundle install display that error above. This project has an old version of ruby(1.8.7) and rails(2.0.2). ...
Mike's user avatar
  • 61
1 vote
2 answers
883 views

Library not loaded libmysqlclient, macOS Sonoma

ruby 2.5.1 macOS Sonoma Beta Run rails server Error /.rvm/gems/ruby-2.5.1/gems/mysql2-0.5.3/lib/mysql2/mysql2.bundle, 0x0009): Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.21.dylib (...
Nazar Fedishin's user avatar
0 votes
0 answers
39 views

jsonapi-resources: MySQL Error - 0.10.x, 0.11.0.beta2, Ruby on Rails

Jsonapi-resources: MySQL Error - 0.10.x, 0.11.0.beta2 Rails: 7.0.8 mysql2: 0.5.5 jsonapi-resources: 0.10.x, 0.11.0.beta2 We tried to implement jsonapi-resources into our project with MySQL DB. ...
Kubatron P's user avatar
0 votes
1 answer
243 views

Extracting RAW SQL from Rails Migration file

In Rails Migration, I have to extract RAW SQL from rails migration file without migrating. This is sample conversion: In rails migrations: # 20230918004257_add_some_column_to_table.rb class ...
jeyraof's user avatar
  • 893
0 votes
1 answer
287 views

Ruby on Rails - Mysql2::Error: The client was disconnected by the server because of inactivity

I have upgraded my Ruby on Rails project Ruby version to 3.0.6 from 2.5.8. My Ruby on Rails version is 6.1.7.6. After I upgraded the Ruby version, now I get a lot of following errors while using Rails ...
Mohsin Sethi's user avatar
0 votes
0 answers
21 views

Unable to setup Ruby on Rails localhost on my system [duplicate]

Working on Ruby on Rails : I have set up my local, Localhost:3000 but its not working, on debugging it shows 'performance_schema.session_variable' not found .. Issue is, I have never set up any such ...
Abhijeet's user avatar

15 30 50 per page
1
2 3 4 5
205