Can't connect with MySQL database

I just installed MySQL and its drivers on a Mac OS X Leopard. When I
issued my rails command to build a new app, then issued the script/
server command and connected to my localhost:3000 in the browser, I
saw the following problem with MySQL.

I changed/updated the PATH in nano, and it can see MySQL fine. So I
really don’t understand the problem.

Can you tell me what I need to do?

Thank you.

MissingSourceFile in Rails/infoController#properties

no such file to load – mysql
RAILS_ROOT: /Users/pdenlinger/Sites/In_Development/my_app1
Application Trace | Framework Trace | Full Trace
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:inrequire’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:153:in require' /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ dependencies.rb:521:innew_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:153:in require' /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ core_ext/kernel/requires.rb:7:inrequire_library_or_gem’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
core_ext/kernel/reporting.rb:11:in silence_warnings' /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ core_ext/kernel/requires.rb:5:inrequire_library_or_gem’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/mysql_adapter.rb:63:in mysql_connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:223:insend’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:223:in
new_connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:245:incheckout_new_connection’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:188:in checkout' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:184:inloop’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:184:in checkout' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:183:incheckout’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_pool.rb:98:in connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_pool.rb:326:inretrieve_connection’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:121:in
retrieve_connection' /Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:113:inconnection’
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/
query_cache.rb:8:in cache' /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ caching/sql_cache.rb:12:inperform_action’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:524:in send' /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ base.rb:524:inprocess_without_filters’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
filters.rb:606:in process_without_session_management_support' /Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/ session_management.rb:134:inprocess’
/Library/Ruby/Gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
base.rb:392:in process' /Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:74:inservice’
/Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/servers/
webrick.rb:66
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:153:in require' /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ dependencies.rb:521:innew_constants_in’
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/
dependencies.rb:153:in `require’
/Library/Ruby/Gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49
This error occurred while loading the following files:
mysql

Paul D. wrote:

I just installed MySQL and its drivers on a Mac OS X Leopard. When I
issued my rails command to build a new app, then issued the script/
server command and connected to my localhost:3000 in the browser, I
saw the following problem with MySQL.

I changed/updated the PATH in nano, and it can see MySQL fine. So I
really don’t understand the problem.

Can you tell me what I need to do?

Thank you.

MissingSourceFile in Rails/infoController#properties

no such file to load – mysql
[…]

You’ve made the same common mistake that many others on this list have
made. :slight_smile: The file that Rails can’t load is not the mySQL app itself,
but rather the mysql gem (which contains the libraries that tell Ruby
how to talk to the DB). Install the gem and all should be well.

But you probably should be using PostgreSQL anyway. It’s a much
better DB.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]