Error installing mysql2: Failed to build gem native extension

I am having some problems when trying to install mysql2 gem for Rails. When I try to install it by running bundle install or gem install mysql2 it gives me the following error: Error installing...

MySQL2 with native extensions ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

I am trying to install the gem mysql2 for Ruby Enterprise Edition. I am getting error that says: Installing mysql2 (0.2.7) with native extensions...

MAMP mysql install directories

I can not find the install directories for mysql under MAMP. I have used WAMP before, and I easily found the folders where mysql were installed. Not so much with MAMP. I can't find this anywhere...

Can't connect to MySql Server and can't reconfigure MySql server

I had problem with connection to database in my Rails application, so reinstalled everything according to this tutorial, and it doesn't help. Now when I'm running the installation of MySql Server...

Using less (2.2.1) raises an error requiring therubyracer (can't install therubyracer on windows)

I've been working to get twitter-bootstrap-rails gem working on my windows machine and ran into an error attempting to install 'therubyracer' gem which is a dependency of older version of the less...

Use MariaDB instead of MySQL in my Rails project

How can I use MariaDB instead of MySQL in my Rails project? When I try to install mysql2 gem it returns error,because mysqlclient was not found. Here some solution, but I didn't found any...

Check if a value exists before updating a column for a already existing record in mysql

Lets say I have table called Tokens, with columns: id, refresh_token, and token. refresh_token column should be unique. But we may have many refresh_token fields that are null. These null...

Getting Mysql2::Error (SSL connection error: ASN: bad other signature confirmation) on Heroku App with AWS RDS

Mysql2::Error (SSL connection error: ASN: bad other signature confirmation): I am making an administration site. The environment is Rails 4.2 and Ruby 2.2, connecting AWS RDS with Heroku server. I...

Linux shell get value of a field from a yml file

I have a database.yml file like development: adapter: mysql2 encoding: utf8 database: d360 host: localhost username: root password: password test: adapter: mysql2 encoding: utf8 ...

NoMethodError: undefined method `create'

I'm starting learning ruby and starting to loving it, but I have a problem that I couldn't solve by myself. I just cannot use a created model to find or create data into the db, getting the error...

ActiveRecord::StatementInvalid: Mysql2::Error: Lock wait timeout exceeded

In my rails project, I use sidekiq processing time consuming task, but in sidekiq log an error: ActiveRecord::StatementInvalid: Mysql2::Error: Lock wait timeout exceeded; try restarting...

docker-compose with multiple databases

I'm trying to figure out how to implement docker using docker-compose.yml with 2 databases imported from sql dumps. httpd: container_name: webserver build: ./webserver/ ports: ...

Rails migrations—temporarily ignore foreign key constraint?

I'm trying to change a table's id field to be a uuid Here's my code: class AddUuidToProjects < ActiveRecord::Migration[5.0] def up add_column :projects, :uuid, :string, limit:36, null:...

An error occurred while installing mysql2 (0.4.8), and Bundler cannot continue

How can I fix this error in ruby on rail. source 'https://rubygems.org' git_source(:github) do |repo_name| repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") ...

Mysql2::Error: Access denied for user 'database_user' at heroku remote connect

iam trying to connect my heroku app with remote database by following method: I have a variable DATABSE_URL in enviornments variables on heroku that...

Understanding Heroku and ClearDB max_questions resource error

I'm getting this error consistently with my Rails site on Heroku using ClearDB mySQL. Mysql2::Error: User '123123' has exceeded the 'max_questions' resource (current value: 18000) Looking at...

`require': 126: The specified module could not be found. - ../Ruby24-x64/lib/ruby/gems/2.4.0/gems/rmagick-2.16.0/lib/RMagick2.so (LoadError)

I have an existing project. I have upgraded that into Ruby24-x64, I am trying to run that but i am getting the above error. I have been trying since 2 days but no luck. I am facing the above issue...

ERROR: Please install mysql2 package manually

When using the sequalize db:migrate command I am getting the following error. Looking at some of the previous comments on similar issues people said it is a dependency issue but whenever I...

Why can't I install mysql2 gem?

My OS is Red Hat Enterprise Linux Server 7.4 (Maipo), CPU architecture is x86_64 and byte order is Little Endian. I was doing bundle install for my rails application, but I get An error occurred...

CURRENT_TIME Timestamp is incorrect when inserting row in MySQL, I'm using AWS RDS

edit: this was a problem with the mysql library I was using node-mysql2 I am using AWS RDS to host a MySQL database. There is a column in my database with the following definition createdAt...

ld: library not found for -lssl while installing mysql2 gem

I changed mysql2 version in my project's Gemfile from 0.3.20 to 0.5.2. When I run bundle update mysql2 I get the following error: Fetching mysql2 0.5.2 (was 0.3.21) Installing mysql2 0.5.2 (was...

Sequelize failing to create table with sync()

I'm learning node.js and mySQL. I have tried Sequelize and according to my learning source sync should create new table if doesn't exist. But for some reason it doesn't create new table. Here is...

TypeORM throws QueryFailedError Table already exists on MySQL when synchronize is true

I am using NestJS, TypeORM, and MySQL to build a web application. I am using a .env file to pass in some environment variables for connecting to my local database. Synchronize is set to...

ER_ACCESS_DENIED_NO_PASSWORD_ERROR meaning confusion

I wrote a js script and it works fine locally, however, when I deploy it to my ubuntu-server I can not connect to the mysql-database. I am getting following error-message: Error: Access denied for...

Rails Error: Sprockets::FileNotFound in Users::Sessions#new

The following error occurred while executing the project after git clone, yarn install and bundle install. Error logs Sprockets::FileNotFound in Users::Sessions#new Showing...

Rails - Mysql2::Error: MySQL client is not connected: ROLLBACK

I have a problem with my rails app, when trying to create an object that has a data column of type LONGTEXT in which I store JSON string. The problem happens only when I'm trying to create/update...

Rails & MySQL on Apple Silicon

has anyone been able to get Rails running with the MySQL via the mysql2 gem on Apple Silicon? I'm working with Ruby 2.5.3 and Rails 5.2.3 but would love to hear of any successes with any...

Jest mock Knex transaction

I have the following lambda handler to unit test. It uses a library @org/aws-connection which has a function mysql.getIamConnection which simply returns a knex connection. Edit: I have added the...

ld: library not found for -lzstd while bundle install for mysql2 gem Ruby on macOS Big Sur 11.4

while running bundle install An error occurred while installing mysql2 (0.5.3), and Bundler cannot continue. Make sure that `gem install mysql2 -v '0.5.3' --source 'https://rubygems.org/'`...

Not able to access different databases in rails console in production environment

I have database.yml as, database.yml default: &default adapter: mysql2 encoding: utf8 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> socket: /var/run/mysqld/mysql.sock development: ...