On Jan 24, 2014, at 11:48 AM, Hassan Schroeder <hassan.schroe...@gmail.com> wrote:
>> Turns out mysql is barfing. > > That's so sad; maybe some ginger ale and a bit of bed rest will help? Hey that's funny. > OR maybe post the actual error message/stack trace here? >> My database.yml has my local mysql using a username and password set for all >> three modes (development, test, and production). I am not sure why this >> isn't being used as the log says it's using the production database. It is >> currently using root, which isn't set anywhere. > > That paragraph doesn't really make sense. - I am not in production mode. I have merely started a new project, so it should be in development. - The development.log has nothing in it. Because, like I said above where you didn't understand, it isn't posting to the development log because it isn't using the development database, because it isn't using the development database. It is posting to the production database as demonstrated by the following in the production log: I, [2014-01-24T11:46:55.334391 #8884] INFO -- : Started GET "/" for 127.0.0.1 at 2014-01-24 11:46:55 -0500 F, [2014-01-24T11:46:55.338134 #8884] FATAL -- : Mysql2::Error (Unknown database 'rortest_production'): mysql2 (0.3.14) lib/mysql2/client.rb:67:in `connect' mysql2 (0.3.14) lib/mysql2/client.rb:67:in `initialize' activerecord (4.0.2) lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `new' activerecord (4.0.2) lib/active_record/connection_adapters/mysql2_adapter.rb:18:in `mysql2_connection' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection' /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection' activerecord (4.0.2) lib/active_record/connection_handling.rb:79:in `retrieve_connection' activerecord (4.0.2) lib/active_record/connection_handling.rb:53:in `connection' activerecord (4.0.2) lib/active_record/query_cache.rb:51:in `restore_query_cache_settings' activerecord (4.0.2) lib/active_record/query_cache.rb:43:in `rescue in call' activerecord (4.0.2) lib/active_record/query_cache.rb:32:in `call' activerecord (4.0.2) lib/active_record/connection_adapters/abstract/connection_pool.rb:626:in `call' actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' activesupport (4.0.2) lib/active_support/callbacks.rb:373:in `_run__3639985778722734772__call__callbacks' activesupport (4.0.2) lib/active_support/callbacks.rb:80:in `run_callbacks' actionpack (4.0.2) lib/action_dispatch/middleware/callbacks.rb:27:in `call' actionpack (4.0.2) lib/action_dispatch/middleware/remote_ip.rb:76:in `call' actionpack (4.0.2) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' actionpack (4.0.2) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' railties (4.0.2) lib/rails/rack/logger.rb:38:in `call_app' railties (4.0.2) lib/rails/rack/logger.rb:20:in `block in call' activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `block in tagged' activesupport (4.0.2) lib/active_support/tagged_logging.rb:25:in `tagged' activesupport (4.0.2) lib/active_support/tagged_logging.rb:67:in `tagged' railties (4.0.2) lib/rails/rack/logger.rb:20:in `call' actionpack (4.0.2) lib/action_dispatch/middleware/request_id.rb:21:in `call' rack (1.5.2) lib/rack/methodoverride.rb:21:in `call' rack (1.5.2) lib/rack/runtime.rb:17:in `call' activesupport (4.0.2) lib/active_support/cache/strategy/local_cache.rb:83:in `call' rack (1.5.2) lib/rack/sendfile.rb:112:in `call' railties (4.0.2) lib/rails/engine.rb:511:in `call' railties (4.0.2) lib/rails/application.rb:97:in `call' passenger (4.0.35) lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request' passenger (4.0.35) lib/phusion_passenger/request_handler/thread_handler.rb:142:in `accept_and_process_next_request' passenger (4.0.35) lib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop' passenger (4.0.35) lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads' As stated, it has logged the following in the production log: Mysql2::Error (Unknown database 'rortest_production'): There is no such thing as the production database because it hasn't been generated. I had to manually generate the development database. > The main question is: can you log into your production database > using the credentials in database.yml? If so, then can you start up > a console in production mode and access the DB? I can log into any current database using the credentials in database.yml. For all three environments, they are the same username and password. The manual rortest_development is the only database that's there because it's the only one that I have made. Regardless, as stated above, it is looking for the production database and not the development database. My question is, how do I change this? I have no clue why it's asking for production when I'm clearly in development. beer...@gmail.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/42428EFD-A89D-4BB8-9AD4-2F5D696F93BD%40gmail.com. For more options, visit https://groups.google.com/groups/opt_out.