当我尝试生成控制器时,我收到此错误:
/Users/mac/.rvm/gems/ruby-2.3.0/gems/mysql2-0.4.8/lib/mysql2.rb:31:in require': dlopen(/Users/mac/.rvm/gems/ruby-2.3.0/gems/mysql2-0.4.8/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/mac/.rvm/gems/ruby-2.3.0/gems/mysql2-0.4.8/lib/mysql2/mysql2.bundle
Reason: image not found - /Users/mac/.rvm/gems/ruby-2.3.0/gems/mysql2-0.4.8/lib/mysql2/mysql2.bundle (LoadError)
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/mysql2-0.4.8/lib/mysql2.rb:31:in' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:82:in require'
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:82:inblock (2 levels) in require' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:in each'
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:77:inblock in require' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:in each'
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler/runtime.rb:66:inrequire' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/bundler-1.15.2/lib/bundler.rb:108:in require'
from /Users/mac/Desktop/MulteApp/config/application.rb:7:in' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:in require'
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:92:inpreload' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:153:in serve'
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:141:inblock in run' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:in loop'
from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application.rb:135:inrun' from /Users/mac/.rvm/gems/ruby-2.3.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in <top (required)>'
from /Users/mac/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /Users/mac/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from -e:1:in'<main>'
我目前正在使用mysql2
。我试图查找负责的文件,但我没有看到任何问题。你能救我吗?