paul.denlinger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2009-Sep-30 13:14 UTC
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:in `require'' /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:in `new_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:in `require_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:in `require_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:in `send'' /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:in `checkout_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:in `loop'' /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:in `checkout'' /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:in `retrieve_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:in `connection'' /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:in `perform_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:in `process_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:in `process'' /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:in `service'' /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:in `new_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 Denlinger 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. :) 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 marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.