Rake db:create fails


#1

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:inconnect’
/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:innew’
/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:insend’
/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:incheckout_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:inloop’
/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:insynchronize’
/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:inconnection’
/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:inretrieve_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:inquoted_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:inconstruct_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:infind_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:ingem_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:inrequire’
/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:independ_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:inload_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:inload_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:inload_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:insend’
/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:ingem_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:inrequire’
/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:inrequire’
/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:inexecute’
/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:inexecute’
/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:insynchronize’
/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:ininvoke_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:ininvoke_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:insynchronize’
/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:ininvoke’
/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:intop_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:intop_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:intop_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:instandard_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:inload’
/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??


#2

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

Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)

On Sat, May 16, 2009 at 9:55 AM, Paul N.


#3

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


#4

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:

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

Maur�cio Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)

On Sat, May 16, 2009 at 9:55 AM, Paul N.