Try to access my Ruby project – Loaderror related to MySQL

I am trying to access my first ruby ​​project. Navigate to the correct directory and type:

$rails server

I received the following error message:

/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)
Referenced from: /Users/Rozey/.rvm/gems/ruby-1.9 .2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
Reason: image not found-/Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2 -0.2.6/lib/mysql2/mysql2.bundle
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'
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/g ems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/runtime.rb:66:in each'
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'
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'
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'
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'
from script/rails:6:in

I installed the mysql2 gem using RVM before. I know there may be a simple fix, but I am a newbie, so I appreciate your help.

Some extras Information:

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

Have you read How to fix “dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/ mysql/libmysqlclient.15.dylib”?

It looks like it may be a similar problem

I am trying to access my page A ruby ​​project. Navigate to the correct directory and type:

$rails server

I received The following error message:

/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)
Referenced from: /Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
Reason: image not found-/Users/Rozey/.rvm/gems/ruby-1.9.2-p180/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle
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'
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'
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'
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'
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'
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'
from script/rails:6:in< /code>'

I installed the mysql2 gem using RVM before. I know there may be a simple fix, but I am a newbie, so I appreciate your help.

< p>Some additional information:

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

< p>

Have you read How to fix “dlopen(/Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle, 9): Library not loaded: /usr /local/mysql/lib/mysql/libmysqlclient.15.dylib"?

It looks like it might be a similar problem

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3363 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.