gpt4 book ai didi

mysql - 尝试访问我的 ruby​​ 项目 - 与 mysql 有关的 LoadError

转载 作者:可可西里 更新时间:2023-11-01 07:54:40 25 4
gpt4 key购买 nike

我正在尝试访问我的第一个 ruby​​ 项目。导航到正确的目录并键入后:

$ rails server

我收到以下错误消息:

/Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2.rb:7:in require': dlopen(/Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError)<br/>
Referenced from: /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle<br/>
Reason: image not found - /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle<br/>
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2.rb:7:in
'
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in require'<br/>
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:68:in
block (2 levels) in require'
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in each'<br/>
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in
block in require'
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in each'<br/>
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:55:in
require'
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler.rb:120:in require'
from /Users/Rozey/Sites/first_project/config/application.rb:7:in
'
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:28:in require'<br/>
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:28:in
block in '
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in tap'<br/>
from /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/railties-3.0.5/lib/rails/commands.rb:27:in
'
from script/rails:6:in require'<br/>
from script/rails:6:in
'

我之前使用 RVM 安装了 mysql2 gem。我知道可能有一个简单的修复方法,但我是新手,所以非常感谢您的帮助。

一些额外的信息:

Rozey$ which ruby
/Users/Rozey/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
Rozey$ which mysql
/usr/local/mysql/bin/mysql

最佳答案

关于mysql - 尝试访问我的 ruby​​ 项目 - 与 mysql 有关的 LoadError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5394873/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com