1

I was using postgresql with rails. I installed mysql yesterday for some side project and today when I ran rails c, It gave the following error,

home/rahul/.rvm/gems/ruby-2.6.0/gems/arel-9.0.0/lib/arel/visitors.rb:7:in require': cannot load such file -- arel/visitors/mysql (LoadError)

I have not changed anything in my rails project. My rails application still uses Postgres

database.yml

default: &default
  adapter: postgresql
  pool: 50
  timeout: 5000
  # host: localhost
  encoding: utf8
development:
  <<: *default
  database: enquiry_dispatch_development
test:
  <<: *default
  database: enquiry_dispatch_test
4
  • 1
    How does your config/database.yml look like (without password!)? Did you replace pg with mysql2 in your Gemfile and run bundle install? Commented Feb 4, 2019 at 11:58
  • @spickermann, I have put my database.yml in question. And no, my Gemfile contains pg and not mysql2 Commented Feb 4, 2019 at 12:06
  • please check in application if somewhere is written require 'mysql' or 'mysql2' Commented Feb 4, 2019 at 12:32
  • No. As I said earlier, my rails application used postgresql from the beginning and nothing has been changed in it. Commented Feb 4, 2019 at 12:35

1 Answer 1

3

Hello just remove the gem 'arel'

gem uninstall arel

and run

bundle install
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.