I started a beginner’s tutorial on RoR through lynda.com. I followed
the instructions to the letter. Everything was working so far until I
got to accessing Webrick. When I typed in “rails server” to begin
work, I got this error message below.
/Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle:
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/
mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
(LoadError)
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2/
mysql2.bundle
Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/
lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.2.7/lib/mysql2.rb:8
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/
runtime.rb:68:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/ runtime.rb:68:in require’
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/
runtime.rb:66:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/ runtime.rb:66:in require’
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/
runtime.rb:55:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/ runtime.rb:55:in require’
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler.rb:120:in require' from /Users/macuser/Sites/simplecms/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb: 28:in require’
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:
28
from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb:
27:in tap' from /Library/Ruby/Gems/1.8/gems/railties-3.0.6/lib/rails/commands.rb: 27 from script/rails:6:in require’
from script/rails:6
I’m using a
iMac
Ruby 1.87
Gem 1.7.2
I have been exposed to very little Rails and looking to learn how to
fix this. Your help would be greatly appreciated.
Thanks in advance for your attention and help if possible.
I tried installing the suggested sudo and got command not found. Then
I looked for the brew for mac and I’m just not getting it.
Radhames, thanks for your help and patience. If others have
suggestions of what I’m missing here, please add your voice. All help
is appreciated.
oh i see, *nix system often have package manager, that is programs that
connect to a repository, where there is the source code for you OS,
then
the package manager download the source code and compiles it for your OS
version. The most popular Package manager are : Aptitude, apt-get, YUM,
Macports, fink, homebrew, among others , and i have never used the
windows
ones from which i only know of Cygwin. As a simple example Apple’s app
store
is kind of like a package manager. Ubuntu comes with with apt-get, in
mac i
use homebrew. In mac there is not apt-get so thats why you get the
error.
You have to pass the proper package manager according to your OS, mac
does
not comes with any so you have to install homebrew.
I have the same issues above, I’ve installed Homebrew. Now I cant get it
to do the sudo app-get part. I understand that Mac does not have this
functionality. What options do I have instead?
I have the same issues above, I’ve installed Homebrew. Now I cant get it
to do the sudo app-get part. I understand that Mac does not have this
functionality. What options do I have instead?
Explain this.
Did you really mean “apt-get” instead of “app-get.” I have no idea
what app-get is, never heard of it if it does exist.
What do you mean by “can’t get it to do the sudo app-get part.” What
happens? Do you get errors? What are they?
What operating system are you using? The apt-get command only works
for certain Linux distributions. Other platforms use different package
managers with different commands. RedHat for example uses rpm (RedHat
Package Manager) by default, instead of apt-get (Debian/Ubuntu).
If you happen to be on a Mac then there are several choices for these
types of package managers. The Mac doesn’t ship with any of them because
the Mac has a native package installer system using the built-in
Installer services provided by Mac OS X. These packages are called dpkg
(Darwin Package, where Darwin is the low level UNIX OS of Mac OS X).
Other package managers for OS X have been created by the open source
community, which include Macports, Fink, Homebrew, etc. IMHO Homebrew is
the only one worth using. I have never liked how intrusive the other
solutions can be on my system. Homebrew is light weight and
non-intrusive, not to mention full of awesomeness. But, that is a matter
of opinion.
It’s Strange that I cam after all this time with the same error coming
out when I try to run the Webrick server…
Have you tried all the things mentioned previously in the thread?
Googling for
rails Library not loaded: libmysqlclient.18.dylib
shows numerous hits that might be the same problem. Have a look at
those and see if it helps.
It’s Strange that I cam after all this time with the same error coming
out when I try to run the Webrick server…
\KAMAL$ rails server
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle:
dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle,
9): Library not loaded: libmysqlclient.18.dylib (LoadError)
Referenced from:
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
Reason: image not found -
/Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.bundle
from /Library/Ruby/Gems/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9
from
/Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in require' from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:inrequire’
from
/Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:inrequire’
from
/Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in each' from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:inrequire’
from /Library/Ruby/Gems/1.8/gems/bundler-1.3.5/lib/bundler.rb:132:in require' from /Users/ahmedkamal/Documents/railswork/simple_cms/config/application.rb:7 from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53:inrequire’
from
/Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:53
from
/Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50:in tap' from /Library/Ruby/Gems/1.8/gems/railties-3.2.13/lib/rails/commands.rb:50 from script/rails:6:inrequire’
from script/rails:6