#rubyonrails - Sat 31 Mar 2007 between 19:20 and 19:27

NY Lost Funds



ypSamihhaamu: right, I'm talking about a model for 1-to-many files
OetmetGNoMethodError (You have a nil object when you didn't expect it!. You might have expected an instance of Array. The error occurred while evaluating nil.<<): /app/models/carro.rb:13:in `agregar_producto' /app/controllers/etienda_controller.rb:16:in `agrega_alcarro'
that's the error
ypSamiOetmetG: it's usually because an ID wasn't set or something. That happens when ruby expects an object to be there, but it turned out to be a nil object
hhaamuypSami, oh.
ypSamiOetmetG: you need to look in /app/controllers/etienda_controller.rb, on line 16, and see if an ID isn't getting passed
hhaamuI can't actually think of any synonym for files. perhaps 'upload' would fit?
ypSamihhaamu: I was thinking BinFile, for Binary File.. but the files could be ASCII as well, so that's dumb.
FileUpload
that would be fitting
OetmetGthis is my line 16: @item_actual = @carro.agregar_producto(producto)
ypSamibut it seems as though it's an object for helping file uploads
producto isn't being passed, OetmetG, that's my guess
OetmetGhmm
how can I know quickly (printing something) if producto has something?
sorry I'm new at ror
producto comes from here: producto = Product.find(params[:id])
ypSamiAre you on linux?
or rather, are you using radrails, and do you have your console open?
hhaamuOetmetG, http://wiki.rubyonrails.org/rails/pages/logger
OetmetGnot me, but the server is on Linux
ypSamiAre you running the app locally?
OetmetGremotely
but i'm connected to a console
via ssh
ypSamialright cool
using mongrel?
OetmetGmongrel?
ypSamiwhat web server are you using?
OetmetGit's a dreamhost server
apache i guess
ypSamihm
what command do you run to restart your app?
asdxis there a ruby/rails gd library?
OetmetGI don't know ypSami :S
ypSamiasdx: RMagick
OetmetGmaybe I have to restart my application because I *think* i didn't do anything and suddenly it stopped working
the ajax thing
ypSamiOetmetG: heh, alright. Then you need to google "Rails Logger"
hhaamuOetmetG, read the page I linked you to, use the logger for debug and read the logs in logs/

Page: 1 8 15 22 29 36 43 50 57 64 71 78 

IrcArchive

NY Lost Funds