#rubyonrails - Sun 4 Mar 2007 between 12:48 and 12:58

NY Lost Funds



_davwhat's server.log have?
matt1982_dav: nothing its empty
chapeljimmygoon: there are things for ror that do that
_davthen check apache log i guess?
jimmygoonok
matt1982_dav: im wondering if when I setup rails on the server I specified a different place for error messages
_dav: Yeah thats the one
chapeljimmygoon: http://home.leetsoft.com/liquid
matt1982_dav: where would they be i cant remember doh!
_davcheck your httpd.conf
jimmygooncool. thanks for the info chapel
jackyyll1_dav: when i do rake db:migrate VERSION=004 , it doesn't delete one of the tables
matt1982_dav cheers will do
_davjackyyll1: do your 005 and 006 migrations have anything defined in the down sections?
defsdoorjackyyll1: that will take to version 4 and not udo version 4
jackyyll1_dav, yes both have drop
defsdoorundo*
_davi know some people never bother defining them, but then you can't migrate down :(
neveletrying to figure out how to correctly put code in a migration script that updates the db, but i guess im missing somthing.. If anyone has a sec, http://pastie.caboo.se/44610 thanks!
jackyyll1i want to undo versions 005 and 006
marc123when i put: render :action=>"list" in my "index" method of my controller it doesnt use/create the variables created in the list method it only gives the "list" view? is that supposed to happen
jackyyll1it undoes 005, but not 006
_davdb:migrate outputs to stdout, you can add --trace if it is failing
neveleie.. reads out plain text passwords and writes encrypted ones back in..
defsdoornevele: try saving them
nevele: x.save
_davor x.update_attribute :password, Digest...
jackyyll1_dav: it's only reverting 005, why wont it revert 006 also?
neveledefsdoor: can i put that in the @manager.each line somehow?
_davjackyyll1: check the schema_info table in the database
the version column may be messed up
defsdoor@manager.each { |x| x.password = Digest::SHA1.hexdigest("change-me--#{x.password}--")\n x.save }
_davdb:update assumes that the version is correct when deciding what to do. occasionally when things go wrong, io have to UPDATE schema_info SET version = X tofix it
neveledefsdoor: cool, thanks.. i see..
_davnevele: use update_attribute if you really want a one-liner
nevele_dav: @manager.each { |x| x.password.update_attributes .. like that?
jackyyll1if i delete the table manually from the SCHEMA.RB file, will that sort things out?
_davyeah, convert model.attr = val into model.update_attribute :attr, val
jackyyll1: ha, no. migrations need that table
jackyyll1so how do i fix this?

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 96 103 

IrcArchive

NY Lost Funds