rake db:create fails

Hi

I'm currently deploying a rails app

when I issue "RAILS_ENV=production rake db:create"

I get the following error:

"rake aborted! Unknown database 'wiggle_production'"

when I issue "RAILS_ENV=production rake db:create --trace"

I get:

rake aborted! Unknown database 'wiggle_production' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:548:in `real_connect' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:548:in `connect' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:198:in `initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:74:in `new' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/mysql_adapter.rb:74:in `mysql_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:121:in `retrieve_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:113:in `connection' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:2934:in `quoted_table_name' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1626:in `construct_finder_sql_without_searchlogic' /home/demo/public_html/wiggle/releases/20090511200038/vendor/plugins/searchlogic/lib/searchlogic/active_record/base.rb:113:in `construct_finder_sql' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:1490:in `find_every' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/base.rb:589:in `find_without_searchlogic' /home/demo/public_html/wiggle/releases/20090511200038/vendor/plugins/searchlogic/lib/searchlogic/active_record/base.rb:23:in `find' /home/demo/public_html/wiggle/releases/20090511200038/app/controllers/users_controller.rb:2 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262:in `require_or_load' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221:in `depend_on' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133:in `require_dependency' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:368:in `load_application_classes' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:367:in `each' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:367:in `load_application_classes' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:365:in `each' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:365:in `load_application_classes' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:185:in `process' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run' /home/demo/public_html/wiggle/releases/20090511200038/config/environment.rb:13 /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:521:in `new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:153:in `require' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/misc.rake:3 /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:617:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:612:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:578:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:588:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:585:in `invoke_prerequisites' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:577:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:564:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2027:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2005:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1999:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1977:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2044:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19

I've already created the database manually, and when I run rake db:migrate I'm getting more errors

can anyone make any suggestions??

The "searchlogic" plugin is trying to query your database, you could try to fix it by adding some "if table exists" before querying.

Or I could just remove it, it's not essential to my project

The weird thing is, I've previously served and created/migrated another application with searchlogic included, and didn't see any such issues

strange!

MaurĂ­cio Linhares wrote:

Searchlogic is very plugin for search and i hoped it would help me better in pagination but pagination is not at all working.

Any pupil facing such type of errors. Thanks in advance