Activity Graph

Page 1 of 1


[15:37:31] Symbiosisz: Ping timeout: 240 seconds


[21:43:26] Symbiosisz: has joined #ruby
[21:43:30] Symbiosisz: has joined #RubyOnRails


[04:41:27] Symbiosisz: Remote host closed the connection


[22:53:30] Symbiosisz: Ping timeout: 276 seconds
[23:06:26] Symbiosisz: has joined #RubyOnRails
[23:06:30] Symbiosisz: has joined #ruby


[17:15:29] Symbiosisz: Quit: Leaving
[17:16:11] Symbiosisz: has joined #ruby
[17:16:15] Symbiosisz: has joined #RubyOnRails


[12:25:15] Symbiosisz: Ping timeout: 276 seconds
[12:37:35] Symbiosisz: has joined #RubyOnRails
[12:37:39] Symbiosisz: has joined #ruby


[13:09:07] Symbiosisz: has joined #ruby
[13:09:10] Symbiosisz: has joined #RubyOnRails


[00:27:03] Symbiosisz: Quit: Leaving


[01:28:04] Symbiosisz: Ping timeout: 272 seconds
[01:43:11] Symbiosisz: has joined #RubyOnRails
[01:43:15] Symbiosisz: has joined #ruby


[05:58:43] Symbiosisz: has joined #ruby
[05:58:47] Symbiosisz: has joined #RubyOnRails


[10:13:01] Symbiosisz: *.net *.split


[10:18:39] Symbiosisz: Ping timeout: 240 seconds
[10:18:52] Symbiosisz: has joined #RubyOnRails
[10:18:54] Symbiosisz: has joined #ruby


[00:22:40] Symbiosisz: Ping timeout: 245 seconds
[00:23:17] Symbiosisz: has joined #RubyOnRails
[00:23:21] Symbiosisz: has joined #ruby
[05:08:09] Symbiosisz: Ping timeout: 250 seconds
[06:27:09] Symbiosisz: has joined #RubyOnRails
[06:27:13] Symbiosisz: has joined #ruby


[07:47:14] Symbiosisz: Ping timeout: 245 seconds
[08:41:10] Symbiosisz: has joined #RubyOnRails
[08:41:13] Symbiosisz: has joined #ruby


[13:43:15] Symbiosisz: Ping timeout: 240 seconds
[13:43:35] Symbiosisz: has joined #RubyOnRails
[13:43:39] Symbiosisz: has joined #ruby


[15:38:17] Symbiosisz: *.net *.split
[15:41:27] Symbiosisz: has joined #ruby
[15:41:44] Symbiosisz: has joined #RubyOnRails
[15:52:06] Symbiosisz: *.net *.split
[16:47:43] Symbiosisz: has joined #ruby
[16:48:03] Symbiosisz: has joined #RubyOnRails


[04:40:56] Symbiosisz: Ping timeout: 256 seconds


[06:30:38] Symbiosisz: has joined #ruby
[06:30:42] Symbiosisz: has joined #RubyOnRails


[21:27:27] Symbiosisz: Remote host closed the connection


[22:47:51] Symbiosisz: has joined #ruby
[22:47:55] Symbiosisz: has joined #RubyOnRails


[04:48:03] Symbiosisz: Remote host closed the connection


[16:04:48] Symbiosisz: has joined #ruby
[16:04:52] Symbiosisz: has joined #RubyOnRails
[16:07:05] Symbiosisz: Remote host closed the connection
[16:07:30] Symbiosisz: has joined #ruby
[16:07:34] Symbiosisz: has joined #RubyOnRails


[22:22:09] Symbiosisz: If I have a RSpec related question, is this the place to ask it? Or is there a more appropriate channel?
[22:23:29] Symbiosisz: Oh, disregard that -- just saw the rspec channel.
[22:28:30] Symbiosisz: lts in "send" being called. I can't quite figure out how to test that. The easiest way I can think of is to be able to take the final resultss from the if (calls authenticate if ...) block and then continue on assuming we reach that stagebut I'm not sure if I can do that. So the only way I'm able to do it now is to just repeat everything I wrote in that prior test, then add on the next step -- which clearly isn't DRY.
[22:28:30] Symbiosisz: I'm new to RSpec and struggling to understand the best approach to testing this code. Here's the class I'm testing ( and here are my tests currently ( I'm trying to write a test that IF we call connect on server instance and it succeeds in gmae socket creation THEN we should verify that authenticate resu
[22:30:07] Symbiosisz: Ya, fair point. I should change that.
[22:33:11] Symbiosisz: no sweat, thanks for taking a look!
[22:38:01] Symbiosisz: zenspider: While that test isn't particualrly useful on its own, waht happens next is. Once authenticate is called, I want to verifyt that the GameSocket object is receiving a sendPacket call.
[22:38:14] Symbiosisz: So, as far as I understand, I have to construct the object up to that point to ensure that the next step in its sequence occurs.
[23:01:50] Symbiosisz: thanks for the feedback zenspider. I ended up just ditching rspec.
[23:02:01] Symbiosisz: I had decided to try it out as I heard good things about it -- but that mode of testing doesn't jive for me. Just going to use test unit.
[23:04:35] Symbiosisz: Oh, alright, I'll look both of those up now.
[23:04:37] Symbiosisz: Appreciate it.
[23:29:16] Symbiosisz: A general question about testing: I know that with normal methods in my program we should keep it brief, but I've read int he past it's okay to have fairly long test method names so they can be sufficiently descriptive. Would a name like this be okay for a test? def testThatAuthenticatePacketIsSentAfterConnectionEstablished
[23:29:27] Symbiosisz: Or should I use a less lengthy name and just add a comment explaining it
[23:30:19] Symbiosisz: centrx: Is it really? Crap, thought that was only for variables.


[02:34:02] Symbiosisz: If I have two threads that are using a socket (one thread is just sending, the other is doing blocking receives), do I need to do anything beyond exiting a thread when I notice a socket failed in my listen method (by 'failed' I mean it's returning a 0 character message), or is there more I need to do to ensnure that I cleanup the socket?
[04:34:08] Symbiosisz: I'm looking to learn how I can mock core classes in Ruby. E.g. make it so returns a mocked socket. Given those requirements, should I be trying to learn rspec, or is there another, more suitable library? Thanks!
[04:42:59] Symbiosisz: zenspider: I want to be able to test that my system behaves as expected without having to go all the way into the realms of dependency injection. That's why I figured stubbing the core classes themselves would be the easiest approach.
[04:43:00] Symbiosisz: Am I mistaken?
[04:43:48] Symbiosisz: For example, I want to be sure that if a tcpsocket object returns nil on recvfrom, that I throw the proper exception, etc
[04:49:38] Symbiosisz: zenspider: Sorry, fair enough. Stubbing would be the correct term for what I'm trying to do, correct?
[04:49:55] Symbiosisz: Could you elaborate?
[04:50:57] Symbiosisz: Ahh, I see what you mean. So am I correct in saying generally you would use mocks when doing dependency injection, whereas you use stubs when you're trying to test without DI?
[04:52:08] Symbiosisz: zenspider: So, for stubbing, which library do you generally use?
[04:52:13] Symbiosisz: I suppose that's the meat of what I'm trying to find out.
[04:52:45] Symbiosisz: oh, you just use meta programming for it?
[04:52:56] Symbiosisz: (Is that the correct term: metaprogramming)?
[04:53:43] Symbiosisz: ahh, neat, that seems like what I want
[04:53:45] Symbiosisz: Appreciate it
[04:54:05] Symbiosisz: thanks zenspider. Have a good one!
[08:50:56] Symbiosisz: Any chance anyone knows why this Mocha mock isn't throwing an exception ( when I don't call connectionFailed? If I call connectionFailed zero OR 1 times no error is thrown, an error is only thrown for 2 or more invocations.
[08:51:12] Symbiosisz: The behavior for one invocation is as expected, but I would have expected that if it's called zero times, the "once" would cause an exception to be thrown
[09:02:12] Symbiosisz: Does anyone have any suggestions on where I should put "Thread.abort_on_exception = true" if I want that ot be the case everywhere in my project? Including both when running normally, and when running tests, etc


[02:28:43] Symbiosisz: Does anyone know why when I call, that call is blocking indefinitely? The server it's trying to connect to is responsive
[02:28:45] Symbiosisz: but it never returns from that call
[02:29:00] Symbiosisz: Can't recall ever seeing that behaviour before. Here's the exact line: @socket =, serverPort)
[02:34:48] Symbiosisz: Ahh, sorry, I see. With TCP the other side has to acknowledge the connection.


[06:48:43] Symbiosisz: I'm having toruble getting data from my regular expression into my replacement string using gsub.
[06:48:58] Symbiosisz: I was under the impression that $1 should include my first match, and $2 should include the second. Am I missing something?
[06:51:01] Symbiosisz: Ah, great, thanks Hanmac


[00:09:36] Symbiosisz: I have two classes, purchases and transactions. Purchases have a foreign key constraint on the id column of a table called videos, that's the only place it differs from transactions (that one extra column). Is it my best bet to do this as two completeyl separate models, or should I be relying on inheritance?
[00:11:49] Symbiosisz: RubyRonin: Bandwidth is pretty darn pricey on AWS. That being said, if the user profile pictures aren't too large, that shouldn't be a huge issue.
[00:12:08] Symbiosisz: AWS' benefit, imo, is that here are so many great periphery services you gain access too.
[00:12:36] Symbiosisz: S3's prices did come down substantially pretty recently, though. So it's better than it used to be.
[00:12:54] Symbiosisz: RubyRonin: I personally use AWS for everything.
[00:13:02] Symbiosisz: The additional cost is worth ti for ease of use, and easeo f management -- for me at least.
[00:14:19] Symbiosisz: There are usage calculators online on AWS' website.
[00:17:42] Symbiosisz: That answer is far too broad to answer. You need to spend some time learning about AWS, there are a lot of resources out there that you can use to learn.
[00:17:57] Symbiosisz: Figure out what each component offers, figure out what you need, then if you have more precise questions feel free to ask.


[18:10:15] Symbiosisz: Hey everyone, I'm having a bit of trouble with associations between models. Here's my code: -- I've followed tghe instructions for creating an association, but whenever I try to access a user object's videos attribute, I get the exception showna t the bottom.
[18:11:46] Symbiosisz: elaptics: I didn't add one. I was under the impression that you wouldn't have to -- I figured the association does it on its own.
[18:12:02] Symbiosisz: So, just to be clear, I have to add the column on my own, but the reason I put has_many in my code is so rails can enforce constraints based on it>?
[18:12:54] Symbiosisz: Ahh, okay. That makes sense.
[18:12:57] Symbiosisz: Thank you :)
[18:13:32] Symbiosisz: While I have your attention, I may as well ask: I read on some rails forums that they use validations for ensuring that fk constraints occur (so basically they're fK constraints done in Rails rather than the db). Do most people add a FK at the DB level as well? Or is just having the 'emulated' fk constraint sufficient?
[18:17:48] Symbiosisz: elaptics: Understood. Thank you!
[18:18:57] Symbiosisz: With the video_id column, is it supposed to be an integer, or another data type?
[18:19:08] Symbiosisz: I tried doing t.integer :user_id, but I'm sttill getting errors.
[18:21:59] Symbiosisz: Ahh, disregard my last question, figured it out :)
[18:22:54] Symbiosisz: elaptics: oh, that seems much cleaner. I'll do that. Thanks.
[18:23:31] Symbiosisz: elaptics: If a video belongs to a user with there being a one-to-many relationship from User to Video, I'm assuming I only add an id column in videos, not in users, correct?


[19:50:28] Symbiosisz: Is there any way to map a specific path to multiple controllers usign rackup, and it'll keep going through controllers until its path matches one? e.g. map('/') { run staticcontroller }, map ('/') { run otherpagecontroller}. If no route in staticcontroller matches, it tries on otherpage controller?


[13:11:16] Symbiosisz: hey everyone, I was wondering what the purpose of helpers in app/helpers are? I know that when I generate a controller it generates that helper in a file, but I'm wondering if I only put methods in it that I would use for views, only for controllers, only for views or controllers, etc.
[13:17:43] Symbiosisz: Ahh, okay. So fI would put stuff liek a method for taking the page's title, and adding on the website name before it?
[13:17:55] Symbiosisz: But if I needed a helper for my say controller like, "check if user is logged in" I'd put that function inside say_controller.rb?


[09:30:50] Symbiosisz: Does anyone happen to know why this code: shows user as being nil in line 27?
[09:31:13] Symbiosisz: Generally if I put anything that manipulates in a before block it works fine, but if I do it outside of a before block, it doesn't work. I believe that's what's wrong -- but I don't know why that is.
[09:31:31] Symbiosisz: ethicalhack3r: I'd do that in the view, personally.
[09:33:43] Symbiosisz: Also, please ignore my question from above. Figured out what was wrong. I was missing an it -- doh.


[08:27:14] Symbiosisz: tobiasvl: Never seen that document before. Thanks for the link!


[14:03:03] Symbiosisz: Hey all, I'm sure I've made a silly oversight, but for some reason if I put "include models.rb" in my file (and models.rb is in the same folder as the file that I'm running) it throws an exception saying it could not be loaded.
[14:04:25] Symbiosisz: Sorry, my miistake. I actually wrote require 'models.rb' -- not sure what I was thinking. Here's the code:
[14:06:59] Symbiosisz: johnny5: It is! One note, I am using RVM. Could that hav esomething to do with it? Here's the exception that's raised:
[14:08:33] Symbiosisz: johnny5: I'm not quite sure what you're getting at.
[14:09:10] Symbiosisz: johnny5: Thanks, very helpful. Already been Googling to no avail. P.S. I'm not using Rails.
[15:27:08] Symbiosisz: Seriously? Using gay as a pejorative term? You're a dick.
[17:46:37] Symbiosisz: keelzebub: Anything non False or nil evaluates to True.
[17:49:49] Symbiosisz: I just picked up Ruby a week ago, after having been primarily a Java programmer for my entire undergrad so far (3 years). I think I might cry: Ruby and Sinatra are amazing!


[09:30:22] Symbiosisz: I have a somewhat basic question. I'm sorry, I promise I've searched online for this, but all of my searches for cookie security is coming up with how to configure software like word press, etc.
[09:30:24] Symbiosisz: We say that data is secured with a secret key, so someone can't simply craft a cookie. How does this authentication work? We don't encrypt the data using the session key because when I look at cookies I can see the key and value name in plain text. What's the mechanism by which it's secured?
[09:31:38] Symbiosisz: mikecmpbll: Awesome, thanks, I'll look that up now. Aprpecaite it!
[09:33:12] Symbiosisz: Thanks SpikensbroR and mikecmpbll. This ror security guide seems particularly good: I know jack about cookies!


[02:14:26] Symbiosisz: learning rails after I make one ap p in php. I figure php is going to have a lot less magic, so I'll have a better understanding of what's going on.
[02:14:26] Symbiosisz: Hey all, I was hoping to get some input as someone new to web programming. I'm trying to figure out waht I should learn first: rails or php. I know rails has a lot of advantages, a big one being all the magic it does in the background. My concern is that given that I'm completely new to web development, if I start by learning rails I may not understand what's going on under the hood, so I was considering doing php first, then
[02:14:35] Symbiosisz: Does anyone have any advice eithjr way?
[02:16:33] Symbiosisz: sevenseacat: Fair enough!
[02:17:55] Symbiosisz: sevenseacat:I was worried about trhat. I'm about 9 chapters into the Ruby on Rails tutorial so far. I've got most of it working, but I have no clue what's going on under the hood.
[02:17:58] Symbiosisz: Which concerns me
[02:19:03] Symbiosisz: I suppose all of it: I don't really understand the really low level stuff about how requests work, how rails is doing routing, etc
[02:19:11] Symbiosisz: I mean, I put a route in my routes.rb and poof, it routes... but I have no clue how.
[02:19:50] Symbiosisz: That seems like it would be really great once I know what I'm doing, but I worry I may be avoiding learning the important parts about web apps as a result
[02:20:02] Symbiosisz: similar to how one should learn SQL by writing queries and DDL themselves before using a ORM
[02:20:20] Symbiosisz: I suppose my question is whether you feel my concern is warranted?
[02:21:02] Symbiosisz: alright, that's fair :)
[02:22:36] Symbiosisz: Interesting, so that's stuff you could learn iin the normal course of being a rails developer?
[02:22:45] Symbiosisz: I suppose if I dig in I can probably figure some of the magic as I go
[02:23:45] Symbiosisz: Awesome, that sounds like a decent approach.
[02:23:51] Symbiosisz: Appreciate the feedback :)
[02:25:33] Symbiosisz: Let me fix that...
[02:25:39] Symbiosisz: MY CODE DOESNT WORK... CAN NE1 FIX IT?


[04:16:51] Symbiosisz: te method for me.
[04:16:51] Symbiosisz: Hey everyone. I'm new to Rails doing the Rails Tutorial atm. I'm at a stage now where I've added resource :users to my routes file and tried to create a sign up form, but when I try to submit any form I create it says the create method isn't defined. If I define a create method in my UsersController I can see that it;s' getting called. I Was under the impression that rails restful features would automatically fill in the crea
[04:17:08] Symbiosisz: Am I mistaken? My book seems to imply that the create method should auto exist as well: I'm using the Ruby on Rails Tutorial by Heartl.
[04:17:52] Symbiosisz: I stand corrected: apparently I do have to make the create method myself. Think I misread the book. Sorry!
[04:20:23] Symbiosisz: Criten: Ahh, awesome, that makes sense. I'm not using scaffolding, so I didn't have the method. I'll fill the method in now. Appreciate the help!
[06:21:46] Symbiosisz: I'm getting a weird issue, in this code here: -- Line 12 keeps getign an error, saying name isn't a valid method. When I uise the naem method on a dog object it always works. It appears taht @dog is currently nil, any idea why that may be? I thought I initialized it in line 5.
[06:26:11] Symbiosisz: jammanbo: Ahh, okay, thanks!
[08:14:25] Symbiosisz: justinas_: If validation throws errors, I was under the impression it wouldn't save it. the save method will return false as it'll fail.
[08:14:42] Symbiosisz: Oh, sorry, I see what you mean. It's a nested object.
[08:14:46] Symbiosisz: Not sure in that case.
[11:16:17] Symbiosisz: Can anyone give me some suggestions on how to know when I should make a model for some object and when not to? For example, in this book I'm reading we made a model for User, but we don't mkae a model for Session (the object we use to store a user's login). Is anyone aware why that's the case?


[05:41:59] Symbiosisz: I'm trying to use mechanize to automate interaction with a page behind a password wall. This page uses a pop up username and password box though, not one where I directly type into a site. Does anyone know how I interact with that?
[05:42:36] Symbiosisz: pontiki: Ahh, okay. Thank you.