I installed a ROR environment on my OS X machine, and I cant' past
"go" with my "hello world" application.  Can anyone help me figure
this out?

Problem Summary
I cannot get my “Hello World” application to work.
http://localhost:3000/  view is OK but
http://localhost:3000/say/hello/ fails

Environment
Mac OS X v10.5.6
ruby 1.8.7 (2008-08-11 patchlevel 72)
gem 1.3.1
rails 2.2.2
mysql
mysql  Ver 14.14 Distrib 5.1.32, for apple-darwin9.5.0 (i386) using
readline 5.1
(followed install procedure at 
http://hivelogic.com/articles/2008/02/ruby-rails-leopard
)
I created a "say" controller with an empty "hello" method.  I also
created view.rhtml

ERROR- Browser View
http://localhost:3000/say/hello/
MissingSourceFile in SayController#hello
no such file to load – mysql
RAILS_ROOT: /Users/Joes/Sites/joes_app
This error occurred while loading the following files:    mysql

Mongrel Console View
Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/_trace (136.7ms)
Rendered /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/_request_and_response (1.2ms)
Rendering /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/layout.erb (internal_server_error)

WEBrick Console View
!!! The bundled mysql.rb driver has been removed from Rails 2.2.
Please install the mysql gem and try again: gem install mysql.
127.0.0.1 - - [05/Mar/2009:09:36:28 EST] "GET /say/hello/ HTTP/1.1"
500 14173
- -> /say/hello/

“gem install mysql” – failure
console log (partial)
joe-sulmars-imac2:~ Joes$ gem install mysql
WARNING:  Installing to ~/.gem since /usr/local/lib/ruby/gems/1.8 and
          /usr/local/bin aren't both writable.
Building native extensions.  This could take a while...
ERROR:  Error installing mysql:
        ERROR: Failed to build gem native extension.

/usr/local/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.


mkmf.log (partial)
find_library: checking for mysql_query() in -lmysqlclient...
-------------------- no
"gcc -o conftest -I. -I/usr/local/lib/ruby/1.8/i686-darwin9.6.0 -I. -I/
usr/local/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -
D_XOPEN_SOURCE=1  -fno-common -pipe -fno-common   conftest.c  -L. -L/
usr/local/lib -L/usr/local/lib -L.      -lruby-static -lmysqlclient  -
lpthread -ldl -lobjc  "
conftest.c: In function ‘t’:
conftest.c:3: error: ‘mysql_query’ undeclared (first use in this
function)
conftest.c:3: error: (Each undeclared identifier is reported only once
conftest.c:3: error: for each function it appears in.)
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))mysql_query;
return 0; }
/* end */


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to