After updating a few gems through the terminal on my mac, I created a new rails project created using the mysql database. When the application starts, regular welcome navigation appears.
Here's the problem - I tried to click a link called "About your application environment", in my browser I get the following output:
MissingSourceFile in Rails/infoController
no such file to load -- mysql
I also get this output in terminal
The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
Processing Rails::InfoController#properties (for 127.0.0.1 at 2008-12-09 20:41:41) [GET]
Processing Rails::InfoController#properties (for 127.0.0.1 at 2008-12-09 20:41:41) [GET]
MissingSourceFile (no such file to load -- mysql):
...
As the saying goes, I tried releasing "gem install mysql" after the application stopped, only to welcome this piece of jargon, which I cannot understand:
WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
/usr/bin aren't both writable.
WARNING: You don't have /Users/mymac/.gem/ruby/1.8/bin in your PATH,
gem executables will not run.
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
Gem files will remain installed in /Users/mymac/.gem/ruby/1.8/gems/mysql-2.7 for inspection.
Results logged to /Users/mymac/.gem/ruby/1.8/gems/mysql-2.7/gem_make.out
It is clear that something is wrong with my mysql installation, since I also tried to run the rake command to create the database, which called me next.
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
rake aborted!
no such file to load
(See full trace by running task with
, "mysql -version" , mysql !
mysql Ver 14.12 Distrib 5.0.67, for apple-darwin9.4.0 (i686) using readline 5.1
"sudo gem install mysql", :
sudo gem install mysql
Password:
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
"sudo gem install mysql - --with-mysql-config =/usr/local/mysql/bin/mysql_config", bradheintz, , , , , , rails ! , lol.
dyld: lazy symbol binding failed: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Expected in: dynamic lookup
dyld: Symbol not found: _mysql_init
Referenced from: /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Expected in: dynamic lookup
Trace/BPT trap
- , , , :)