Forum: Ruby on Rails rake db:migrate on old app

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Dion H. (Guest)
on 2007-06-05 17:15
(Received via mailing list)
Hi there

I am setting up an old rails app I did last year on my development
machine,
but it will not migrate the new db

I froze rails at 1.1.6...but not the gems

when I do a rake db:migrate I get the log at the bottom...my database
looks
fine, with an empty schema ready to go with permissions set...

maybe I need the old version of digest/sha1 ??? this is where it breaks

 def scramble41(password, message)
    return 0x00.chr if password.nil? or password.empty?
    buf = [0x14]
    s1 = Digest::SHA1.new(password).digest
<<<<<
this is line 551....
    s2 = Digest::SHA1.new(s1).digest
    x = Digest::SHA1.new(message + s2).digest
    (0..s1.length - 1).each {|i| buf.push(s1[i] ^ x[i])}
    buf.pack("C*")
  end


>>rake migrate --trace
** Invoke migrate (first_time)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
wrong number of arguments (1 for 0)
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:551:in
`initialize'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:551:in
`new'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:551:in
`scramble41'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/vendor/mysql.rb:141:in
`real_connect'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:330:in
`connect'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:87:in
`initialize'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:36:in
`new'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:36:in
`mysql_connection'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`send'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:251:in
`connection_wi
thout_query_cache='
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/query_cache.rb:54:in
`connection='
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:220:in
`retrieve_conn
ection'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
`connection'
D:/portals/delta1/config/../vendor/rails/activerecord/lib/active_record/migration.rb:282:in
`migrate'
D:/portals/delta1/config/../vendor/rails/railties/lib/tasks/databases.rake:4
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in
`synchronize'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:369:in
`invoke_prerequisites'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `send'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1003:in `each'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:368:in
`invoke_prerequisites'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:361:in `invoke'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in
`synchronize'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in
`top_level'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in
`top_level'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in
`top_level'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in
`standard_exception_handling'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
d:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
d:/ruby/bin/rake.bat:20:in `load'
d:/ruby/bin/rake.bat:20




any tips ???

cheers

dion
Dion H. (Guest)
on 2007-06-05 17:26
(Received via mailing list)
I set the password to empty and this worked...put that on the wiki...lol
This topic is locked and can not be replied to.