LoadError: cannot load such file -- arel/visitors/mysql

Hi Guys,
when i run the below command to create database
bundle exec rake db:create db:structure:load

i am facing LoadError: cannot load such file – arel/visitors/mysql

In this path --> /var/lib/gems/2.5.0/gems/arel-8.0.0/lib/arel/visitors , mysql.rb file is missing.
How that file can be added in that location or is there any possible solution plz suggest me.

can someone help me to fix this issue

Thank You!!

2 Likes

I am also facing the same issue @kalyani can you please suggest what had you done for this issue.

The same/similar problem rake failing to load mysql2 even it is installed and run

Hi Kalyani,

Did you get any solution for it?
I am also struggling with the same issue.

Thank you!

In my case I ran:
gem uninstall arel
bundle install
Then I had another error with mysql and I ran
gem uninstall activerecord
bundle install
And
bundle exec rake db:create db:structure:load
worked.
I believe that in my case, this happened because of such actions:
MySQL 5.7.30 -> MySQL 8.0.20 -> MySQL 5.7.30
The first time I had MySQL 5.7.30 it was fine with
bundle exec rake db:create db:structure:load