Open ughstudios opened 4 years ago
You are using a very outdated version. The bug with my_bool is known and has been fixed, see #980
You need to update mysql2 to at least 0.4.10
Has anyone managed to solve this? I have the same problem, but I can't update for summer 0.4.x because ActiveRecord and rails are in version 3. I am trying to solve for days and I am nowhere near a solution.
We are also facing this issue and can't upgrade to 0.4.x because it's incompatible with our rails/activerecord version.
Hello @sourabhkt , so, in order for me to run, I needed to put it in a docker with an older operating system. I used this images and managed to make it work and see my changes.
Do you use a newer system like ubuntu 20? If so, that could be the reason, but I'm not sure. My docker file:
FROM zrpaplicacoes/docker-in-rails:2.2.10
EXPOSE 3000
WORKDIR /home/app
COPY Gemfile .
COPY Gemfile.lock .
ENV RUNTIME_PACKAGES="mysql mysql-dev mysql-client libxslt-dev linux-headers imagemagick imagemagick-dev nodejs"
RUN apk add --no-cache $RUNTIME_PACKAGES && \
gem update bundler
If you're on v0.3.x, you have to use mysql 5.7; mysql 8.0 removed the my_bool datatype (see #840).
Fix
gem install mysql2 -v '0.3.21' -- --srcdir=/usr/local/mysql/include
mysql Ver 14.14 Distrib 5.7.35, for Linux (x86_64) using EditLine wrapper Rails 4 Ruby 2.7.3
@airblade Thanks for the advice. I also needed to install MySQL 5.7. I was finally able to get the gem to install correctly as part of bundle install
, through the instructions found here: https://askubuntu.com/questions/1259242/unable-to-install-mysql-5-7-on-ubuntu-20-04
Has anyone seen this before? How do I resolve this?