'cannot load such file -- mysql2/mysql2
I am doing the installation on m1 mac and I am stuck mysql issue.
my rails server is working fine but when I run my spec then I got cannot load such file -- mysql2/mysql2
error
can someone help me here?
rspec spec/
An error occurred while loading rails_helper.
Failure/Error: require File.expand_path('../../config/environment', __FILE__)
LoadError:
cannot load such file -- mysql2/mysql2
# ./config/application.rb:7:in `<top (required)>'
# ./config/environment.rb:2:in `require_relative'
# ./config/environment.rb:2:in `<top (required)>'
# ./spec/rails_helper.rb:4:in `<top (required)>'
No examples found.
Finished in 0.00003 seconds (files took 5.21 seconds to load)
0 examples, 0 failures, 1 error occurred outside of examples
Solution 1:[1]
I deleted my tmp/ folder and it's worked for me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sajjad Murtaza |
