This is an extremely strange one. Im trying to do a simple rake db:test:clone
or create and no matter what I do, from clearing the gemset to trying all sorts of database.yml configs, Im getting the oddest error:
LINE 1: CREATE DATABASE "tdt_test"0.0
Has anyone ever seen anything like this before? WTF is that "0.0!?" Im running Rails 3.2, RSpec and pg gem 0.14.1
04:15 PM ~/projects/dmvcs (feature/helpdesk) => RAILS_ENV=test rake db:create
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `block in require': iconv will be deprecated in the future, use String#encode instead.
Notice: for 10x faster LSI support, please install http://rb-gsl.rubyforge.org/
PG::Error: ERROR: syntax error at or near "0.0"
LINE 1: CREATE DATABASE "tdt_test"0.0
^
: CREATE DATABASE "tdt_test"0.0
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:654:in `async_exec'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:654:in `block in execute'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:653:in `execute'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `create_database'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:107:in `rescue in create_database'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:51:in `create_database'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:40:in `block (3 levels) in <top (required)>'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:40:in `each'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:40:in `block (2 levels) in <top (required)>'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `load'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@global/bin/rake:19:in `<main>'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/bin/ruby_noexec_wrapper:14:in `eval'
/Users/jlippiner/.rvm/gems/ruby-1.9.3-p194@dmvcs/bin/ruby_noexec_wrapper:14:in `<main>'
Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", "database"=>"tdt_test", "username"=>"jlippiner", "pool"=>5, "password"=>nil}
/Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: db:create (ArgumentError)
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:21:in `run'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
from /Users/jlippiner/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun'
This is a specific situation BUT it might help others.
Turns out the darn classifer gem is OVER WRITING the Array.sum method. Once I removed that, all was well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With