#indyrb IRC Log on irc.freenode.net
IRC Log for 2009-10-21
Timestamps are in GMT/BST.
[1:11] * waz (n=tjs@99-190-205-163.lightspeed.iplsin.sbcglobal.net) Quit (Read error: 110 (Connection timed out))
[4:46] * jqr_ (n=jqr@99-6-3-78.lightspeed.iplsin.sbcglobal.net) has joined #indyrb
[4:46] * jqr (n=jqr@99-6-3-78.lightspeed.iplsin.sbcglobal.net) Quit (Read error: 104 (Connection reset by peer))
[4:46] * jqr_ is now known as jqr
[8:18] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) Quit ()
[8:55] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) has joined #indyrb
[9:13] * waz (n=tjs@99-190-205-163.lightspeed.iplsin.sbcglobal.net) has joined #indyrb
[9:15] * jqr (n=jqr@99-6-3-78.lightspeed.iplsin.sbcglobal.net) Quit ()
[9:32] * jqr (n=jqr@rrcs-24-172-165-248.central.biz.rr.com) has joined #indyrb
[10:02] <mileszs> jqr: Have you installed wkhtmltopdf on a server, by any chance?
[10:03] <davidray2> not me
[10:05] <mileszs> It really should not be as hard as it has been. Haha.
[10:23] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) Quit ()
[10:34] <jqr> yeah, but I just used the binary
[10:36] <mileszs> What do you mean?
[10:37] <mileszs> I can't find the right combination of QT and wkhtmltopdf versions, evidently. Killing me.
[10:37] <mileszs> softly
[10:37] <mileszs> with its lies.
[12:32] * davidray2 (n=dave@64.105.237.44) has joined #indyrb
[13:39] * davidray2 (n=dave@64.105.237.44) Quit (Read error: 148 (No route to host))
[14:24] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) has joined #indyrb
[14:47] <jqr> they had precompiled binaries available for download
[14:47] <jqr> I just used those.
[15:34] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) Quit ()
[16:04] * jqr (n=jqr@rrcs-24-172-165-248.central.biz.rr.com) Quit ()
[16:40] <mileszs> That didn't seem to do it, either.
[16:41] <mileszs> I think it's the QT / X11 dependencies that are killing me. I don't know what else to install, really. I might just install GNOME on this fucking server and see if that will pull down all of the correct dependencies.
[16:41] <dsp> seems unlikely given that gnome doesn't use qt
[16:42] <dsp> what kind of error are you getting?
[17:00] <mileszs> I think I'm just missing something related to fonts.
[17:01] <mileszs> I know gnome doesn't use QT, but it will pull in the parts of X that wkhtml wants.
[17:01] <mileszs> I'm getting a PDF, which is great, but instead of letters and numbers, it has only black boxes. Or "dark squares" as someone called them.
[17:22] <dsp> what distiro?
[17:33] * baldwindavid (n=baldwind@173-15-43-57-Illinois.hfc.comcastbusiness.net) has joined #indyrb
[17:37] <joelmeador> Have you tried just dropping whatever fonts the html uses into directory with the the html?
[17:43] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) has joined #indyrb
[17:51] <baldwindavid> mileszs: ha - nice Killing Me Softly reference
[17:51] <davidray2> Hey baldwindavid - turns out I am using jrails in a few places
[17:52] <baldwindavid> davidray2: does it still work w/ Prototype?
[17:55] <davidray2> it = ?
[17:56] <davidray2> The stuff that depended on jrails gives me an error now
[17:56] <davidray2> (after I deleted jrails)
[17:57] <baldwindavid> what types of things?
[17:58] <davidray2> hang on - gotta phone call
[18:02] <davidray2> You know, I think I was wrong
[18:03] <davidray2> I think I forgot to stop and restart my server after I deleted it.
[18:03] <davidray2> I restarted it just now and it seems to be working now
[18:04] <davidray2> Ah, here it is...
[18:07] <davidray2> Element.update("rank_requirements", "\r\n\r\n<div>\r\n\r\nSelect a Rank to See Requirements\r\n\r\n</div>\r\n\r\n\r\n");
[18:07] <davidray2> So, when you pick something in a select it does an update
[18:07] <davidray2> and that's what's breaking
[18:08] <baldwindavid> what is the name of the Rails helper in the view code? (not the generated source)
[18:09] <davidray2> hang on
[18:11] <baldwindavid> I assume observe_field
[18:11] <baldwindavid> ..or observe_form
[18:14] <davidray2> Hmm. I hate javascript.
[18:15] <davidray2> I have a javascript called load_rank_details that is called when you change a select.
[18:15] <davidray2> That javascript is here:
[18:16] <davidray2> http://pastie.org/664314
[18:16] <davidray2> but the error my browser gives is Element.update is not a function
[18:18] <baldwindavid> is that function loaded up within jQuery(document).ready($){...?
[18:20] <davidray2> It's $(document).ready...
[18:20] <davidray2> If you refresh that pastie you can see it...
[18:21] <baldwindavid> I don't think that would work because you have relinquished the "$" to Prototype - jQuery is using the variable $j
[18:22] <davidray2> okay
[18:22] <davidray2> lemme try that
[18:22] <baldwindavid> I think your ready should be either $j(document).ready(function($) {... or jQuery(document).ready(function($) {...
[18:22] <baldwindavid> jQuery will always be available and is the safest option
[18:24] <davidray2> so, there are probably lots of places where I need to change the $ to jQuery then
[18:24] <baldwindavid> this is nice because it passes the $ into the ready function, so you can just use $ inside
[18:24] <baldwindavid> not necessarily
[18:25] <baldwindavid> this is a better explanation...http://docs.jquery.com/Using_jQuery_with_Other_Libraries
[18:26] <davidray2> Okay
[18:26] <davidray2> I'm still getting the same error.
[18:26] <baldwindavid> note the "Referencing magic" at the bottom where it mentions passing the $ to be used inside a block of code without overriding said $
[18:28] <davidray2> nice
[18:29] <davidray2> So, I added jQuery.noConflict();
[18:29] <davidray2> to my script and now I don't get an error, but it doesn't update the page
[18:31] <davidray2> But what that post is saying is that I don't need to change the $ to jQuery inside the function definition, right? Just the reference to it in the html?
[18:32] <baldwindavid> right, but it needs to be passed to it with the function($) part
[18:36] <davidray2> lots of $ is not a function errors in the console
[18:36] <davidray2> and the onchange thing still doesn't work
[18:37] <baldwindavid> retreat!
[18:37] <baldwindavid> ha
[18:37] <davidray2> :-)
[18:39] <baldwindavid> I don't use / don't like the Rails helpers anyway as they are obtrusive - your loadRankDetails makes the helper almost unnecessary anyway
[18:40] <davidray2> I can't even see where I'm using the helper (I didn't write this)
[18:40] <baldwindavid> maybe you're not
[18:41] <baldwindavid> I would think there would be something like $("#bulk_edit_ranks_form").change(function(){... somewhere in your jQuery - or maybe Prototype
[18:42] <baldwindavid> this would then unobtrusively look for changes to the form and call the loadRankDetails() function when it changes
[18:42] * jqr (n=jqr@99-6-3-78.lightspeed.iplsin.sbcglobal.net) has joined #indyrb
[18:43] <davidray2> Oh. Cuz right now :on_change is what watches the element
[18:43] <davidray2> (This is a stupid question)
[18:43] <davidray2> is that the rails helper?
[18:44] <baldwindavid> yes - it's probably something like observe_form("bulk_edit_ranks_form"...
[18:44] <davidray2> here's the whole page, btw
[18:44] <davidray2> http://pastie.org/664352
[18:45] <davidray2> where would that be?
[18:45] <baldwindavid> not sure if this is the old one, but the ready at the top should be jQuery(document).ready(function($) { loadRankDetails(); });
[18:46] <baldwindavid> or $j(document).ready(function($) {... - either should work, but $ is from Prototype
[18:46] <davidray2> Yeah, I reverted some stuff
[18:47] <jqr> jquery also supports $(function() { }) which does the exact same thing as $().ready
[18:50] <baldwindavid> yeah, I think I saw Resig do it the long way one time and I blindly followed
[18:51] <davidray2> Hmm. If I do it like this: http://pastie.org/664360 then I get Element.update is not a function
[18:52] <davidray2> but you're saying if I get rid of the on_change and replace it with something like ^^ it should work?
[19:06] <davidray2> Thanks for your helps
[19:06] <davidray2> I think I got it : http://pastie.org/664380
[19:08] <baldwindavid> Sweet - yeah, I'm not sure what to do
[19:08] <davidray2> It works now
[19:08] <baldwindavid> gots to go to movie - later
[19:08] <baldwindavid> cool
[19:08] <davidray2> have fun
[19:08] * baldwindavid (n=baldwind@173-15-43-57-Illinois.hfc.comcastbusiness.net) Quit ()
[19:08] <davidray2> thanks
[19:39] <jqr> lighthouse--
[19:44] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) Quit ()
[19:44] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) has joined #indyrb
[19:45] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) Quit (Client Quit)
[20:21] * jqr (n=jqr@99-6-3-78.lightspeed.iplsin.sbcglobal.net) Quit ()
[20:50] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) has joined #indyrb
[23:10] * davidray2 (n=dave@c-98-220-174-19.hsd1.in.comcast.net) Quit ()