Note that there are some explanatory texts on larger screens.

plurals
  1. POIssues with Rails gem mysql2 on OS X 10.7 with Ruby 1.9.2 and Rails 3.1
    text
    copied!<p><strong>OS Version:</strong> Mac OS X 10.7.1 Lion<br> <strong>Ruby Version:</strong> <code>ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.1.0]</code><br> <strong>Ruby Location:</strong> <code>/usr/local/rvm/bin/ruby</code><br> <strong>Rails Version:</strong> <code>Rails 3.1.0</code><br> <strong>Rails Location:</strong> <code>/usr/local/rvm/gems/ruby-1.9.2-p290/bin/rails</code></p> <p>Now, I installed the mysql2 gem and when I run <code>gem list</code> it shows up in the list as: <code>mysql2 (0.3.7)</code></p> <p>So far so good, right? OK, so here's where it gets tricky. No matter what I do, I can't start the server. In terminal I cd to the directory my rails app is and run <code>rails s</code>. However, instead of starting i get this:</p> <pre><code>/usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2.rb:9:in `require': dlopen(/usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib (LoadError) Referenced from: /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle Reason: image not found - /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2/mysql2.bundle from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.3.7/lib/mysql2.rb:9:in `&lt;top (required)&gt;' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `block (2 levels) in require' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `block in require' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler.rb:120:in `require' from /Users/doug/Sites/simple_cms/config/application.rb:7:in `&lt;top (required)&gt;' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:52:in `require' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:52:in `block in &lt;top (required)&gt;' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:49:in `tap' from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.1.0/lib/rails/commands.rb:49:in `&lt;top (required)&gt;' from script/rails:6:in `require' from script/rails:6:in `&lt;main&gt;' </code></pre> <p>Obviously, this is not what should be happening. The problem is I can't figure out why not. None of the solutions I've come across have worked.</p> <p>This is actually my first attempt at getting Ruby/RoR working on my computer. I'm following a tutorial from Lynda.com and, unsurprisingly, this doesn't happen to the guy doing the videos.</p> <p>I've tried searching and, as I said, nothing seems to help. Ideas?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload