Nice trick routing the app to your desktop :). And yes indeed, lifecycles are definitively powerful.
Warm regards, Ignacio El 16/01/14 13:27, Stefan Haslinger escribió: > Hi Ignacio, > > Sometimes indicates that an ActiveRecord call went wrong, > > yep .... > > like trying to > find product 9999 when it does not exist: > Product.find(9999) > > almost, attribute was empty ... > Unbelievable. Telepath? > > Indeed the error message was misleeding. > > To debug it, I copied the database on the server to a development one, > started a webrick there. > > mysqldump -u root -p mercator_production > mercator_production.sql > mysql -u root -p mercator_development < > /path/to/mercator_production.sql > rails s > > > Routet the app to my desktop > > ssh -L *:3001:localhost:3000 www.%domain%.com > > to be able to access at > > http://localhost:3001/... > > Dumped intentionally, used the repl in better errors to fix the > attribute in db to be able to see if that's it. > Then fixed in production using a repl with > > RAILS_ENV=production rails c > > to check there and finally fixed my code and deployed again. > > That as an addon to your nice debugging strategies video on youtube. > > Sidenode on the performance of lifecycles / transitions. (There is quite > a lot of magic happening here.) > Adding the product to the basket including order item generation, > pricing determination, check for inventory,... > takes now 600ms on an average for the full circle, what is a lot faster > than i've seen on many web shops. > 2kB are trasported to the server, 6kB (including product options, > related products, availability ...) back without any Ajax magic. > It almost feels like a local application. I'm sold for lifecycles. > > Warm regards, > Stefan > > -- > You received this message because you are subscribed to the Google > Groups "Hobo Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/groups/opt_out. -- Ignacio Huerta Arteche http://www.ihuerta.net Teléfono: 0034 645 70 77 35 Email realizado con software libre -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/groups/opt_out.
