Note that there are some explanatory texts on larger screens.

plurals
  1. POissue in installing mysql2 gem with rails3 on mac
    primarykey
    data
    text
    <pre><code> Installing mysql2 (0.2.6) with native extensions /Library/Ruby/Site/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework /Versions/1.8/usr/lib/ruby/ruby.h Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/ext/mysql2/gem_make.out from /Library/Ruby/Site/1.8/rubygems/installer.rb:446:in `each' from /Library/Ruby/Site/1.8/rubygems/installer.rb:446:in `build_extensions' from /Library/Ruby/Site/1.8/rubygems/installer.rb:198:in `install' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/source.rb:96:in `install' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in `run' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `send' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start' from /Library/Ruby/Gems/1.8/gems/bundler-1.0.10/bin/bundle:13 from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19 </code></pre> <p><strong>EDIT</strong></p> <pre><code> Mohit-Jains-MacBook-Pro:casecreed mohit$ locate mysql_config /Applications/XAMPP/xamppfiles/bin/mysql_config /usr/local/mysql-5.5.9-osx10.6-x86_64/bin/mysql_config /usr/local/mysql-5.5.9-osx10.6-x86_64/man/man1/mysql_config.1 </code></pre> <p>and after doing what u suggested...</p> <p>ie </p> <pre><code> sudo gem install mysql2 -- –with-mysql-config=/usr/local/mysql-5.5.9-osx10.6-x86_64/bin/mysql_config </code></pre> <p>here is the error..</p> <pre><code> Mohit-Jains-MacBook-Pro:casecreed mohit$ rake db:create (in /Users/mohit/projects/casecreed) rake aborted! dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle Reason: image not found - /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle /Users/mohit/projects/casecreed/Rakefile:4 (See full trace by running task with --trace </code></pre> <p><strong>EDIT2</strong></p> <p><a href="http://i.stack.imgur.com/33z69.png" rel="nofollow">screenshot</a> of whole process after answer was modified..</p> <pre><code>Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Couldn't create database for {"reconnect"=&gt;false, "encoding"=&gt;"utf8", "username"=&gt;"root", "adapter"=&gt;"mysql2", "database"=&gt;"the_casecreed_test", "host"=&gt;"localhost", "pool"=&gt;5, "password"=&gt;nil}, charset: utf8, collation: utf8_unicode_ci Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) Couldn't create database for {"reconnect"=&gt;false, "encoding"=&gt;"utf8", "username"=&gt;"root", "adapter"=&gt;"mysql2", "database"=&gt;"the_casecreed_development", "host"=&gt;"localhost", "pool"=&gt;5, "password"=&gt;nil}, charset: utf8, collation: utf8_unicode_ci </code></pre> <p><strong>EDIT3</strong></p> <p><a href="http://i.stack.imgur.com/R4qyR.png" rel="nofollow">development.yml</a></p> <p><strong>EDIT4</strong></p> <p>Even not able to connect to mysql.</p> <p><a href="http://i.stack.imgur.com/PelPP.png" rel="nofollow">Check this screenshot</a>.</p> <p><strong>EDIT5</strong></p> <p>This is the solution but i am not able to understand, why mysql server was not starting..</p> <p><a href="http://i.stack.imgur.com/DBqsT.png" rel="nofollow">Screenshot</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

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