cakehero has quit [Quit: Computer has gone to sleep.]
<havenn>
pewter_tao: Accept use ||= on your array, or better yet initialize the @not_a_success Array in def initialize.
<havenn>
Except*
buibex has joined #ruby
<pewter_tao>
havenn: init it so that: @not_a_success = filename?
pu22l3r has quit [Ping timeout: 255 seconds]
bradhe has quit [Ping timeout: 250 seconds]
<havenn>
pewter_tao: No, an empty array for you to later put script.filename(s) into: @not_a_success = []
darthdeus has joined #ruby
<pewter_tao>
so after I run this, I should be able to type echo $? and it won't output 0
<pewter_tao>
havenn: which it still does
<havenn>
pewter_tao: You need to, at the end of your script, check if there is anything in @not_a_success (name it @errors maybe instead?). If there is, exit 1, if not exit normally.
jimeh has quit [Quit: Computer has gone to sleep.]
<davidcelis>
^ show your macbook's battery level as a zelda-style heart meter
<havenn>
davidcelis: Sick! :)
<havenn>
♥♡♡
<davidcelis>
works best with blinking text; that last heart will blink when you're under 25% :)
<pewter_tao>
havenn: okay, it says it completes with failures no matter what
ephemerian has left #ruby [#ruby]
<havenn>
pewter_tao: Put a 'binding.pry' in the self#report_final_status so you can check what is in @errors. (Or if you must, puts @errors to debug >.>.)
mrsolo has quit [Quit: Leaving]
<havenn>
pewter_tao: Do you use Pry?
replore has joined #ruby
<banister`sleep>
davidcelis: are those headphones "dr dre, beats"
replore has quit [Read error: Connection reset by peer]
<pewter_tao>
havenn: never have
<havenn>
pewter_tao: Install it `gem install pry pry-doc` then at the top of your script put `require pry` and wherever in that script you put a `binding.pry` it will open a Pry (irb-like-but-oh-so-better) session.
theRoUS_ has joined #ruby
<havenn>
pewter_tao: alias irb="pry"
<banister`sleep>
lol just noticed the bebo logo is the same as the dr dre beats logo
<davidcelis>
banister`sleep: lolol no
<davidcelis>
sennheiser, HD598
<havenn>
davidcelis: Love the Zelda-esque batter meter!! Need a homebrew formula. :P
<havenn>
s/batter/battery
<pewter_tao>
havenn: yeah the puts @errors didn't return antying
clooth has quit [Quit: clooth]
<havenn>
pewter_tao: Pry!
darkphib_ has joined #ruby
<davidcelis>
havenn: could be a good tmux status section
<davidcelis>
or powerline section
<havenn>
"A Zelda HUD for your Terminal."
<pewter_tao>
havenn: okay, so it's just pointing to binding.pry
nateberkopec has joined #ruby
<havenn>
pewter_tao: Pry does lots. You can use it like irb. Type `help` to see Pry commands.
andrewhl has joined #ruby
drfreeze_ has joined #ruby
<havenn>
pewter_tao: You can put `binding.pry` in where you want to jump out to a Pry session and explore what is happening at that point in your script.
apeiros_ has quit [Remote host closed the connection]
<pewter_tao>
when I do puts @errors, it says nil in pry
<havenn>
pewter_tao: In this case, I'd put it in the self.report_final_status method.
icole has quit [Read error: Connection reset by peer]
<havenn>
pewter_tao: just try: @errors
icole has joined #ruby
<havenn>
pewter_tao: nil?
alexspeller has joined #ruby
<pewter_tao>
yep
<pewter_tao>
well "[]"
rondale_sc has quit [Quit: rondale_sc]
SCommette has quit [Quit: SCommette]
icole has quit [Remote host closed the connection]
savage- has quit [Read error: Connection reset by peer]
ryanlecompte has joined #ruby
drfreeze has quit [Ping timeout: 256 seconds]
<pewter_tao>
havenn: you was my paste, right?
ryanlecompte has quit [Read error: Connection reset by peer]
<havenn>
pewter_tao: Oh, @errors = [] is in the wrong thing. I didn't look at your pastie close enough. Put @errors = [] on line 45, right above report_final_status
<havenn>
pewter_tao: For heaven's sake, use two-spaced indention! :P
brianpWins has quit [Quit: brianpWins]
<pewter_tao>
did that same, thing
<pewter_tao>
I remove it from somewhere else?
daniel_- has quit [Quit: WeeChat 0.3.9.2]
<pewter_tao>
havenn: ok I'll work on indentation
<havenn>
pewter_tao: Yeah, remove it from class Script. Make sure you're checking final_status @errors.empty?
savage- has joined #ruby
jenrzzz has joined #ruby
<havenn>
pewter_tao: instead of `if @errors`, `unless @errors.empty?
yshh has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
joeycarmello has quit [Remote host closed the connection]
piotr__ has quit [Ping timeout: 264 seconds]
kenneth has quit [Quit: kenneth]
joeycarmello has joined #ruby
verto is now known as verto|off
65MAAA5QI has joined #ruby
Jasko has joined #ruby
pwelch has joined #ruby
Gooder`` has quit [Remote host closed the connection]
pwelch has quit [Client Quit]
<pewter_tao>
hey guys: @errors << script.filename, any idea I get undef method here?
joeycarmello has quit [Remote host closed the connection]
<UdontKnow>
pewter_tao: what is @errors?
Guest____ is now known as asteve
<pewter_tao>
array of errors (from return codes)
<pewter_tao>
UdontKnow:
<UdontKnow>
nil << "foo"
<UdontKnow>
NoMethodError: undefined method `<<' for nil:NilClass
<UdontKnow>
you sure?
<pewter_tao>
UdontKnow: `valid?': undefined method `<<' for nil:NilClass
<UdontKnow>
pewter_tao: you are trying to use << on nil. check what your @errors is
<UdontKnow>
nil << anything will give that error
<pewter_tao>
UdontKnow: nil
<pewter_tao>
UdontKnow: unless $?.success? @errors << script.filename (what do you think it should be?)
<erichmenge>
pewter_tao: they are asking what sets @errors
zmisc has left #ruby [#ruby]
CaptainJet has joined #ruby
dmerrick has quit [Quit: dmerrick]
<pewter_tao>
initialized to @errors = []
<pewter_tao>
erichmenge: that what you neeeed?
<erichmenge>
pewter_tao: evidentially not.
havenn has quit [Remote host closed the connection]
marr has quit [Ping timeout: 255 seconds]
kiyoura has joined #ruby
havenn has joined #ruby
<pewter_tao>
erichmenge: what should it be?
Virunga has quit [Remote host closed the connection]
<erichmenge>
pewter_tao: It is nil, so it can't be an array. Are you sure that it is being defined in the right scope? Maybe you could gist your code.
<pewter_tao>
erichmenge: I get `valid?': undefined method `<<' for nil:NilClass
fyolnish has joined #ruby
65MAAA5QI has quit [Remote host closed the connection]
<erichmenge>
but the lack of indenting makes it hard to read :) You are setting @errors after valid? is called.
havenn has quit [Ping timeout: 272 seconds]
ewag has joined #ruby
havenn has joined #ruby
sealeaf1 has quit [Ping timeout: 272 seconds]
iamjarvo has joined #ruby
<erichmenge>
pewter_tao: ^
apeiros_ has joined #ruby
<pewter_tao>
erichmenge: after moving @errors = [] to before it's being called, it seems everything is ok
<pewter_tao>
erichmenge: thanks!
phelps has joined #ruby
pewter_tao has left #ruby [#ruby]
bradyl0ve has joined #ruby
neurotech has quit [Remote host closed the connection]
apeiros_ has quit [Ping timeout: 264 seconds]
mmitchel_ has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
friskd has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
swex has joined #ruby
jekotia has joined #ruby
jenrzzz has joined #ruby
mmitchell has quit [Ping timeout: 264 seconds]
tyfighter has quit [Quit: tyfighter]
fred909 has quit [Ping timeout: 246 seconds]
Ziioynx has quit [Quit: Leaving]
swex_ has quit [Ping timeout: 255 seconds]
cascalheira has joined #ruby
bradyl0ve has quit [Quit: Leaving...]
jenrzzz has quit [Ping timeout: 244 seconds]
cascalheira has quit [Client Quit]
taoru has joined #ruby
<jcrawford>
wow the course on codeacademy is actually pretty good, loving Ruby so far :)
<jcrawford>
just hope that it doesn't make me HATE PHP after using it for 15 years lmao
<ner0x>
@@myvar = somevar; somevar.gsub!( ... ); @@myvar has been changed because it's a reference correct?
<erichmenge>
jcrawford: 15 years of it didn't make you hate it on its own?
ikaros has quit [Quit: Ex-Chat]
nari has joined #ruby
* ner0x
just ponders.
<erichmenge>
ner0x: The bang ("!") in this case indicates that it is an in place modification of the string, yes.
alexim has quit [Quit: sleep]
sarmiena_ has joined #ruby
<jcrawford>
erichmenge: close but not quite, i like the newer stuff now that they are adding closures, namespace, etc/
<ner0x>
erichmenge: How do I fix that? A way to clone the first one? Or should I somevar = somevar.gsub(...); ?
<sarmiena_>
So I'm trying to setup God to manage a Mailman server. At first glance, it appears to be running it fine: " 501 22650 1 0 5:50PM ?? 0:01.59 ruby /repo/script/mailman_server"
<erichmenge>
ner0x: There is indeed a way to clone objects, see #dup and #clone in the Ruby docs. But just reassigning it is probably what you want in this case.
<sarmiena_>
however, the script isn't doing anything. i don't even know where to start
<ner0x>
erichmenge: One second I'll get you a paste.
<erichmenge>
jcrawford: Really? closures in PHP? It just seems like they've made a lot of poor design choices over the years.
<ner0x>
erichmenge: That's exactly what I'm trying to do.
voodoofish430 has quit [Quit: Leaving.]
savage- has quit [Remote host closed the connection]
<ner0x>
erichmenge: I was going to just save it totally numeric with the extension on the end, pull the first 10, any leftovers were an ext. Format accordingly.
<erichmenge>
ner0x: def phone_number=(string); super string.gsub(/\D/,''); end
<erichmenge>
ah, extensions...
statarb3 has quit [Ping timeout: 260 seconds]
apeiros_ has joined #ruby
ddd has quit [Quit: Leaving.]
ngoldman has quit [Remote host closed the connection]
<erichmenge>
The matter of extensions makes things a bit trickier I guess if you want it to be consistently formatted.
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
ddd has joined #ruby
tchebb has joined #ruby
<erichmenge>
ner0x: If it were me I guess I'd either just output whatever the user has entered and not care about what they've done to it, or I'd have them enter the extension in a different field.
ryannielson has quit [Quit: ryannielson]
maletor has quit [Quit: Computer has gone to sleep.]
ttt has joined #ruby
neiled has quit [Quit: Computer has gone to sleep.]
<ner0x>
erichmenge: I use that helper in the view I assume. If I'm doing a f.text_field :name how do I use the helper?
v0n has quit [Ping timeout: 260 seconds]
<erichmenge>
ner0x: You can use :value to set the value of the text field
<jcrawford>
erichmenge: nah they are very handy at times :D
dankest has quit [Quit: Leaving...]
Astral has joined #ruby
nga4 has quit [Ping timeout: 264 seconds]
Astral is now known as Guest14911
<jcrawford>
i agree with some of the bad decisions over the years
<jcrawford>
but i like closures and namespaces :D
<jcrawford>
things are only getting better and better :)
<ner0x>
erichmenge: Which would you prefer. Strip it and leave it as is or just expect ###-###-####? x#+
<jcrawford>
brg
seanstickle has joined #ruby
tyfighter has joined #ruby
<erichmenge>
ner0x: Well, it depends a bit on the app I think. If you think the phone numbers in the data base will often be called by real people and that these people are probably businesses that have extensions, I think maybe it would make sense to add an extension field.
<erichmenge>
ner0x: If this is a social media app or something just forget about extensions
cakehero has quit [Quit: Computer has gone to sleep.]
guns has joined #ruby
<ner0x>
erichmenge: Business so I *have* to have ext. Just wondering how to implement. Seems adding a phone_ext would be easiest.
<ner0x>
erichmenge: Should I pull out the phone into it's own table and just reference it?
<ner0x>
With a has_one ?
<erichmenge>
ner0x: Yeah I think that makes sense so you can validate the length of the phone number. If you're assuming they're entering an extension as well in that field typos could be turned into extensions, and so on.
<erichmenge>
ner0x: I don't think so, just another column on the user/company/whatever
darkphib_ has left #ruby ["Leaving..."]
<ner0x>
erichmenge: Alright. Easy to refactor later if need be.
<ner0x>
erichmenge: Thank you.
apeiros_ has quit [Ping timeout: 244 seconds]
<erichmenge>
ner0x: You're welcome.
<ner0x>
erichmenge: In this specific situation, it's an office number so no ext. The employees will have the ext option.
<erichmenge>
ner0x: one suggestion, instead of the before_validation I think it is nicer to write your own methods
<ner0x>
erichmenge: Elaborate?
sn0wb1rd has quit [Quit: sn0wb1rd]
manizzle has quit [Ping timeout: 264 seconds]
<erichmenge>
ner0x: Like my suggestion from earlier: def phone=(string) super string.gsub(/\D/, '') end
rondale_sc has joined #ruby
rakl has quit [Quit: sleeping]
<ner0x>
erichmenge: What exactly does that do?
pwelch has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<ner0x>
I mean, you can make a method with the exact name to do automatic conversions etc?
squidBits has quit [Ping timeout: 255 seconds]
<erichmenge>
ner0x: Yes, Rails 3 added some magic so the method chain works correctly. the super sends it up to the built in Rails method.
<erichmenge>
ner0x: It wouldn't work without the super :)
Nykolla has quit [Read error: Connection reset by peer]
wargasm has quit [Read error: Connection reset by peer]
<ner0x>
erichmenge: I see that. I'm not familiar with the =(string) syntax.
<erichmenge>
ner0x: Oh, that's all you're doing when you do office.phone = "something"
<erichmenge>
it is really office.phone=("something")
Nykolla has joined #ruby
<erichmenge>
the string is just the variable name in my example.
<ner0x>
So in this case it because the variable you can act upon.
<ner0x>
Yep. Nice.
<ner0x>
Now if I could figure out nested attributes in AR I'd be set. :)
banjara has quit [Quit: Leaving.]
<erichmenge>
ner0x: So you're just overriding the built in Rails method that is created for you, and the super sends it up the chain so that it still works properly
chessguy has joined #ruby
<erichmenge>
but I think that's a much nicer solution than a before_validation block like that.
wargasm has joined #ruby
<erichmenge>
keeps the individual methods isolated and simple.
<ner0x>
erichmenge: Right.
wargasm has left #ruby [#ruby]
<ner0x>
But I'm wondering how it works with nil.
KRF has quit [Quit: No Ping reply in 180 seconds.]
<erichmenge>
ner0x: Well, it won't ever be nil
habstinat has joined #ruby
kenneth has joined #ruby
<erichmenge>
or rather, shouldn't be unless nil was passed in.
KRF has joined #ruby
joeycarmello has joined #ruby
<erichmenge>
but I can't think of a situation that would happen off the top of my head. But you could add a check for that if you like.
<ner0x>
erichmenge: No, you're right.
Nykolla has quit [Read error: Connection reset by peer]
<erichmenge>
Rails won't call that method if it is missing from the form, and if it is on the form it will be an empty string
<erichmenge>
but of course if you did office.phone = nil you would have a problem
dmiller has joined #ruby
Nykolla has joined #ruby
<ner0x>
erichmenge: Right.
cakehero has joined #ruby
lolcatho1t has joined #ruby
lolcatho1t has quit [Client Quit]
lolcathost has quit [Read error: Connection reset by peer]
joeycarmello has quit [Ping timeout: 244 seconds]
cakehero has quit [Client Quit]
lolcathost has joined #ruby
cakehero has joined #ruby
cakehero has quit [Client Quit]
parus___ has quit [Quit: leaving]
jarjar_prime has quit [Quit: Sleep time.]
parus has joined #ruby
tvw has quit [Ping timeout: 272 seconds]
danieldocki has quit [Quit: Leaving...]
adamholt has quit [Ping timeout: 264 seconds]
nat2610 has joined #ruby
tvw has joined #ruby
aharris6 has joined #ruby
adamholt has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
<jrajav>
downcase! is the "dangerous" version of downcase - that is, rather than making a copy of the string and returning the downcased result, it downcases the original string. It doesn't return the string - it just returns nil if nothing was downcased
<jrajav>
Oh, actually it does return the string
<jrajav>
But only if it was "successful"
tris has joined #ruby
jenrzzz has joined #ruby
seanyo has quit [Ping timeout: 250 seconds]
bbloom has joined #ruby
mneorr has quit [Remote host closed the connection]
<postmodern>
tfittsy, just use --prefix=/usr/local
<postmodern>
tfittsy, instead of --prefix=/opt/rubies/...
<havenn>
^^
lolcathost has quit [Ping timeout: 248 seconds]
love_color_text has joined #ruby
iamjarvo has joined #ruby
havenn has quit [Remote host closed the connection]
DarthGandalf has quit [Ping timeout: 245 seconds]
joofsh has quit [Remote host closed the connection]
phelps_ has joined #ruby
phelps has quit [Ping timeout: 260 seconds]
phelps_ is now known as phelps
NiteRain has joined #ruby
headius has joined #ruby
eka has joined #ruby
ner0x has quit [Quit: Leaving]
headius has quit [Client Quit]
yshh__ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
apeiros_ has quit [Ping timeout: 246 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
headius has joined #ruby
eka has quit [Ping timeout: 272 seconds]
baroquebobcat has joined #ruby
mjolk has quit [Quit: returning some videotapes]
thams has joined #ruby
xyzodiac has joined #ruby
adeponte has joined #ruby
DarthGandalf has joined #ruby
art_man1 has quit [Quit: art_man1]
sandGorgon1 has joined #ruby
sandGorgon has joined #ruby
chessguy has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Leaving.]
jobicoppola has joined #ruby
iamjarvo has joined #ruby
jobicoppola has quit [Client Quit]
jlast has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
Spaceghostc2c has quit [Excess Flood]
iamjarvo has quit [Client Quit]
g_bleezy has quit [Remote host closed the connection]
Spaceghostc2c_ has joined #ruby
sayan has quit [Read error: Connection reset by peer]
seanyo_ has quit [Ping timeout: 260 seconds]
yshh__ has quit [Ping timeout: 272 seconds]
apeiros_ has joined #ruby
nat2610 has joined #ruby
yshh has joined #ruby
maletor has joined #ruby
mahmoudimus has joined #ruby
vlad_starkov has joined #ruby
thomasfedb has quit [Ping timeout: 246 seconds]
joeycarmello has quit [Ping timeout: 260 seconds]
jlast has quit [Ping timeout: 264 seconds]
pavelz_ has left #ruby [#ruby]
ryanf_ has quit [Ping timeout: 250 seconds]
daniel_hinojosa has quit [Ping timeout: 265 seconds]
DanBoy has quit [Quit: Leaving]
nat2610 has quit [Quit: Leaving.]
thomasfedb has joined #ruby
axl_ has quit [Quit: axl_]
nqe has joined #ruby
daniel_hinojosa has joined #ruby
apeiros_ has quit [Ping timeout: 256 seconds]
sayan has joined #ruby
nari_ has joined #ruby
robbyoconnor has joined #ruby
nari has quit [Ping timeout: 245 seconds]
dmiller has quit [Remote host closed the connection]
gabrielrotbart has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
kiyoura has quit [Quit: Leaving]
cableray has quit [Quit: cableray]
ebouchut has quit [Quit: This computer has gone to sleep]
emergion has joined #ruby
vlad_sta_ has quit [Ping timeout: 256 seconds]
Spaceghostc2c_ is now known as Spaceghostc2c
kenneth has quit [Quit: kenneth]
kenneth has joined #ruby
Bosma has joined #ruby
cyong has quit [Quit: Leaving.]
sandGorgon has quit [Ping timeout: 272 seconds]
sandGorgon1 has quit [Ping timeout: 272 seconds]
cableray has joined #ruby
mneorr has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
a_a_g has joined #ruby
jlast has joined #ruby
rakunHo has joined #ruby
sayan has quit [Read error: Connection reset by peer]
xAndy is now known as xandy
xandy is now known as xAndy
yacks has quit [Read error: Operation timed out]
brianpWins has joined #ruby
apeiros_ has joined #ruby
ryanf has joined #ruby
bradhe has joined #ruby
hemanth_ has joined #ruby
aces1up has joined #ruby
guns has quit [Quit: guns]
elsifaka has joined #ruby
<aces1up>
hey this seems like a dumb question, but i'm trying to create a method that returns an error if there was one else true meaning it was successful, the unfortunate thing is a i can't just do mymethod_is_ok? due to an error message and true both result in true evaluation... is there a way i can set up my method so I don't have to do something like mymethod_is_ok? == true
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
rakunHo is now known as rakuN
<slash_nick>
is rmagick the best solution for reading an image into an array?
<slash_nick>
w/ruby i mean
<heftig>
aces1up: use exceptions?
mockra_ has quit [Remote host closed the connection]
sandGorgon1 has joined #ruby
<heftig>
or throw a warning and return false
apeiros_ has quit [Ping timeout: 244 seconds]
sandGorgon has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
Guest14911 is now known as Astral
lowkey has quit [Disconnected by services]
Astral is now known as Guest5959
l0wkey has joined #ruby
<aces1up>
heftig nice, i will throw the warning good idea.
Guest5959 is now known as Astral__
huoxito has quit [Quit: Leaving]
mneorr has quit [Read error: Connection reset by peer]
sayan has joined #ruby
mneorr has joined #ruby
JohnBat26 has joined #ruby
apeiros_ has joined #ruby
cj3kim has joined #ruby
bradhe has quit [Remote host closed the connection]
PetePorty has quit [Read error: Connection reset by peer]
Iszak has quit [Excess Flood]
nomenkun has joined #ruby
QKO has quit [Ping timeout: 255 seconds]
PetePorty has joined #ruby
PetePorty has quit [Changing host]
PetePorty has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
berserkr has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
morf has joined #ruby
beiter has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
dankest is now known as dankest|away
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Virunga has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
PetePorty has quit [Remote host closed the connection]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
adeponte has joined #ruby
bradhe has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Vainoharhainen has joined #ruby
apeiros_ has joined #ruby
jlast has quit [Ping timeout: 252 seconds]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
atmosx has joined #ruby
sjhuang has quit [Ping timeout: 248 seconds]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
banister`sleep has quit [Remote host closed the connection]
sjhuang has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Xeago has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
ryanf has quit [Quit: leaving]
<atmosx>
Hello fellow ruby-ists
Iszak has joined #ruby
Iszak has quit [Excess Flood]
grzywacz has quit [Remote host closed the connection]
t_hash has joined #ruby
Iszak has joined #ruby
Iszak has quit [Excess Flood]
davidcelis has quit [Ping timeout: 250 seconds]
<atmosx>
To keep track of clients in a server-client app (IP add, data sent, data expecting to receive, etc) I need a db file right? Since the reply could take a while to come...
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
Iszak has joined #ruby
Iszak has quit [Excess Flood]
love_color_text has quit [Remote host closed the connection]
<MikeH>
Ok, It seems I had to add it to the gem spec and run some kind of bundle?
<waxjar>
ah, i see
<waxjar>
bundler (like rubygems) is a tool to install dependencies (gems)
elico has joined #ruby
<waxjar>
to install all dependencies for a project that uses bundler (any project with a Gemfile, basically) you can run bundle install
crackfu has joined #ruby
<waxjar>
you can also install dependencies manually with gem install <dependency>, which you'll probably have to do for Bundler first if you're on a fresh install
crackfu has quit [Remote host closed the connection]
jrajav has joined #ruby
schaerli has joined #ruby
hsbt has quit [Ping timeout: 265 seconds]
moos3 has joined #ruby
adkron has quit [Ping timeout: 256 seconds]
love_color_text has quit [Remote host closed the connection]
jlast has quit [Ping timeout: 252 seconds]
ToTo has quit [Ping timeout: 264 seconds]
<MikeH>
I'm getting there. My next question is that I'm using SimpleRSS and have something working with rss,entries.first.description. Is the .first. a function of ruby hashes/arrays?
<MikeH>
If so, how do I get a random one?
tommyvyo has joined #ruby
mikecmpbll has joined #ruby
uris has joined #ruby
crackfu has joined #ruby
<waxjar>
it's a method on Array, #sample gets you a random entry iirc
crackfu has quit [Remote host closed the connection]
pwelch has joined #ruby
pwelch has left #ruby [#ruby]
<MikeH>
waxjar: Just found that. THanks.
grzywacz has joined #ruby
freeayu has quit [Remote host closed the connection]
PragCypher has joined #ruby
lenovodroid has joined #ruby
bradhe has joined #ruby
wermel has joined #ruby
sonne has joined #ruby
sullenel has quit [Quit: Leaving.]
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
[eDu] has quit [Quit: [eDu]]
cjs226 has quit []
ttt has quit [Remote host closed the connection]
main has joined #ruby
ExeciN has joined #ruby
ExeciN has left #ruby [#ruby]
hsbt has quit [Ping timeout: 246 seconds]
mjolk has joined #ruby
jrist-afk is now known as jrist
mjolk is now known as Guest73771
pcarrier has joined #ruby
lolcathost has joined #ruby
kn330 has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
lenovodroid has quit [Ping timeout: 255 seconds]
nga4 has joined #ruby
yacks has quit [Read error: Connection reset by peer]
taoru has quit [Remote host closed the connection]
lolmaus has quit []
schaerli has quit [Remote host closed the connection]
jtharris has joined #ruby
habstinat has quit [Ping timeout: 248 seconds]
ryannielson has quit [Ping timeout: 272 seconds]
ryannielson_ is now known as ryannielson
Shamgar has quit [Read error: Connection reset by peer]
art_man1 has joined #ruby
sayan has joined #ruby
cascalheira has joined #ruby
art_man1 has quit [Client Quit]
cascalheira has quit [Client Quit]
Uranio has joined #ruby
rektide has joined #ruby
<rektide>
hi. i'd like to create a gem which is largely just a wsdl2ruby client
ryannielson has quit [Remote host closed the connection]
ttt has joined #ruby
ryannielson has joined #ruby
Shamgar has joined #ruby
<rektide>
anyone have any pointers for automating the use of soap4r to make the client?
<rektide>
at this stage, the fastest thing I'd know how to do is a Makefile that just runs the wsdl2ruby executable, but i'd like to hear what others would do
MrSnakeOil has joined #ruby
d2dchat has joined #ruby
Shrink has quit [Ping timeout: 248 seconds]
clocKwize has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
linuxman has joined #ruby
Jynx has joined #ruby
<linuxman>
HI all
<Jynx>
hello
clocKwize has joined #ruby
<linuxman>
I want 2 learn how to ruby.
jrajav has quit [Quit: I tend to be neutral about apples]
<clocKwize>
linuxman: do it!
<linuxman>
i wanna write mad rube scripts
<Jynx>
you can MSFCONSOLE HACKER ++
<linuxman>
is ruby good for rubyonrails?
<linuxman>
i wanna code another version of metasploit
<Jynx>
implemet all the nice script for MSFCONSOLE
<Jynx>
yes
ttt has quit [Ping timeout: 276 seconds]
<linuxman>
can any1 help me?
<clocKwize>
linuxman: sure, just type: rails new metasploit2 --template http://www.metasploit.com and it'll generate a new rails app from that web site
<linuxman>
what sort of rails
<clocKwize>
awesome ones
bradhe has joined #ruby
<linuxman>
are they long and made of steel ?
<Jynx>
Lolol
theRoUS_ has joined #ruby
<linuxman>
clockwize are they free of charge
<clocKwize>
they are made of stainless steel
<clocKwize>
but they aren't free of charge
<clocKwize>
it costs $500 and you can send it to clockwize@gmail.com by paypal
<linuxman>
so why should i get rails template
<clocKwize>
because its awesome and has new improved stainless steel rails
<clocKwize>
and it uses pixie 2.0 bundler
<clocKwize>
which is the best there is
tk__ has quit [Quit: ばいばい]
gyre007 has quit [Read error: Connection reset by peer]
<linuxman>
can i port my rails and ship to another country?
hsbt_away has joined #ruby
hsbt_away is now known as hsbt
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
Elhu has quit [Ping timeout: 265 seconds]
<clocKwize>
linuxman: rails lives in the cloud and can be accessible from all counties at the same time and will automagically translate all text in to the language and locale of the viewer
<clocKwize>
with no additional code
<clocKwize>
or any code at all
<clocKwize>
no code
rellin has joined #ruby
cjs226 has joined #ruby
Elhu has joined #ruby
thisirs has quit [Remote host closed the connection]
tagrudev has quit [Read error: Connection reset by peer]
<horrror>
I also need lucene engine to work parallely
<tangorri>
thanks ramblex++
<ramblex>
tangorri, np :)
<tangorri>
just that shell scripts make me blind :P
<shevy>
tangorri me too, I use ruby instead
<tangorri>
case …. esac huhuhu
sonne has joined #ruby
<shevy>
you can call methods in .rb files, so I dont even have to write new .rb files, I can just bundle those scripts in one (or few) file(s)
<tangorri>
I'll have a look
<tangorri>
this was for rbenv installation
<tangorri>
I guess I can do it using ruby
clocKwize has quit [Quit: clocKwize]
<shevy>
I consider rbenv only a minor step towards a RubyOS
browndawg has quit [Read error: Connection reset by peer]
<shevy>
without bash/zsh :P
<lectrick>
In order to create test isolation for unit tests, what techniques do people use to not "name" other classes (which creates instant dependencies)? I'm considering setting things like class attributes that can be swapped out in tests for stubs
vlad_starkov has quit [Remote host closed the connection]
<tangorri>
a ruby os would be nice
pavilionXP has joined #ruby
__BigO__ has joined #ruby
browndawg has joined #ruby
<tangorri>
a new c64/cpc computer like booting with irb would be cool :D
Guest25886 has quit [Quit: Guest25886]
<lectrick>
for instance, we have a Customer class that a lot of other things depend on and which itself has way too many dependencies and needs to be refactored. For my customer-related class I'm looking to def self.customer_class; Customer; end and then everywhere else in the class I can refer to self.class.customer_class instead of Customer directly, which is easily
<lectrick>
stubbed out
Zai00 has quit [Read error: Connection reset by peer]
Asher has quit [Quit: Leaving.]
carloslopes has joined #ruby
alexspeller has quit [Remote host closed the connection]
tungd has joined #ruby
<shevy>
tangorri, dont think it could be irb, the shell would have to be convenient to type too, and pure ruby code is not convenient enough
<shevy>
qt is cool, but the ruby bindings to it are like dead last time I tried
<codezombie>
question. I'm wondering if it's better to load files directly from memory into a zip, or, save them to disk first, and then compress them. I would think the former, would potentially be a memory issue if the file list was large, or contained some very large files.
<tangorri>
k
<Divinite>
Zombie + Code = Graveyard
<shevy>
the ruby bindings to qt4 were really awesome, much better looking than ruby-gnome
<shevy>
yeah Divinite :(
kdridi has quit [Ping timeout: 260 seconds]
Jesterman81 has joined #ruby
<shevy>
FXRuby died a few years ago, shoes died more or less the same time when _why left (even though they all say shoes is not dead...)
jjbohn|afk is now known as jjbohn
alexspeller has joined #ruby
brendan_ has joined #ruby
<Kovensky>
qt bindings to *any* language are dead
Uranio has quit [Remote host closed the connection]
<Kovensky>
even the java one, that was actually an official binding, is dead
jgrevich has joined #ruby
jkarayusuf has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
banisterfiend has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
kdridi has joined #ruby
phelps has quit [Ping timeout: 248 seconds]
kdridi_ has quit [Ping timeout: 272 seconds]
schaerli has joined #ruby
eldariof has quit [Ping timeout: 260 seconds]
schaerli has quit [Remote host closed the connection]
phelps has joined #ruby
<maetthew>
How do I require a library that is not a gem?
<codezombie>
maetthew: with require
<maetthew>
codezombie, i tried doing it but it still tries to search for a gem
<maetthew>
or something
carloslopes has joined #ruby
<codezombie>
maetthew: require doesn't have anything to do with gems. You need to make sure the library file is within the include path.
friskd has quit [Quit: friskd]
<maetthew>
codezombie, I'm working with this gem called steam-condenser (it's a gem for communicating with Valve's Steam Community). I filed an issue on github and the author replied saying the issue was fixed in 'master' repo but he hadn't got the time to release a new version. So I downloaded 'master' as a zip and tried putting it in a directory and running irb from there
x82_nicole has joined #ruby
<maetthew>
hmm include path
<maetthew>
will look at that
<codezombie>
maetthew: are you using rails?
<maetthew>
codezombie, no
<codezombie>
actually, are you using bundler?
<maetthew>
no
<maetthew>
:)
<maetthew>
i plan on using bundler though but i haven't read up enough on it yet
<maetthew>
i'm quite a ruby noob
jjbohn is now known as jjbohn|afk
<codezombie>
try require_relative '<full_path>'
tjbiddle has joined #ruby
<codezombie>
err relative path
<codezombie>
I recommend you use bundler though, you can point it to git repos.
<maetthew>
codezombie, kk will investigate a bit
<maetthew>
thanks
<maetthew>
though i think i've tried require_relative before with no luck
tungd has quit [Ping timeout: 252 seconds]
Divinite has quit [Quit: Divinite has left :(]
invisime has joined #ruby
Guest25886 has joined #ruby
markse has joined #ruby
elico has quit [Quit: Elico]
elsifaka has quit [Quit: Veloma e!]
andrewhl has joined #ruby
tungd has joined #ruby
io_syl has joined #ruby
tfittsy has joined #ruby
<markse>
Hello I have a very simple script to encrypt a string with openssl http://sprunge.us/HOAZ?ruby the problem is that I can encrypted the string afterwards because I do not have this IV thing required by openssl should I just store the IV unecrypted somewhere in the users home directory?
bradhe has joined #ruby
<markse>
s/can/can't/
banisterfiend has joined #ruby
<markse>
s/encrypted/decrypt/
xclite has joined #ruby
lenovodroid has quit [Ping timeout: 256 seconds]
<Xeago>
markse: IV's are usually known to the public
gyre007 has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
gyre007 has joined #ruby
tungd has quit [Quit: leaving]
baroquebobcat has joined #ruby
tvw has quit [Remote host closed the connection]
<maetthew>
codezombie, require_relative gives me some weird error
io_syl has quit [Quit: Computer has gone to sleep.]
sayan has quit [Read error: Connection reset by peer]
<maetthew>
codezombie, maybe it's because i'm using irb
darthdeus has quit [Quit: Leaving...]
<maetthew>
hold on
nwertman has joined #ruby
<codezombie>
maetthew: I use irb all the time with require, and require relative. You just have to make sure the files you're requiring are locatable by irb. I usually provide the full path.
<codezombie>
require '/path/to/file/from/root'
geeksir has joined #ruby
Jesterman81 has quit [Quit: Jesterman81]
apeiros_ has quit [Remote host closed the connection]
nwertman has quit [Ping timeout: 255 seconds]
friskd has joined #ruby
nwertman has joined #ruby
friskd has quit [Read error: Connection reset by peer]
friskd has joined #ruby
hoelzro|away is now known as hoelzro
Gues_____ has joined #ruby
ttt has joined #ruby
geeksir has left #ruby [#ruby]
<hoelzro>
shevy == shevegen from Reddit?
davidcelis has quit [Quit: K-Lined.]
havenn has joined #ruby
jeffsmykil has joined #ruby
mockra has joined #ruby
stat1x has joined #ruby
<jeffsmykil>
I am attempting to install tiny_tds but am getting a freetds is missing error and that it cant create a make file http://pastebin.com/TQPgZmKb
jjbohn|afk is now known as jjbohn
markse has quit [Quit: Page closed]
mockra has quit [Read error: Connection reset by peer]
<jeffsmykil>
actually trying to install mssql sorry
<jeffsmykil>
on a mac, any help would be appreciated
ttt has quit [Ping timeout: 245 seconds]
<hoelzro>
jeffsmykil: have you installed freetds?
<jeffsmykil>
it tells me it could not find a valid gem
<havenn>
jeffsmykil: brew install freetds
<jeffsmykil>
huh
stat1x has quit [Remote host closed the connection]
<hoelzro>
jeffsmykil: freetds is a library, not a gem
<jeffsmykil>
ooooooh
stat1x has joined #ruby
<havenn>
jeffsmykil: Are you using Homebrew package manager? (You should if you aren't, its awesome!)
sayan has joined #ruby
<jeffsmykil>
the brew command worked if thats what you mean
ltsstar has quit [Ping timeout: 255 seconds]
<havenn>
:)
includex has joined #ruby
zigomir has quit [Quit: zigomir]
<jeffsmykil>
Cowardly refusing to `sudo brew install'
<jeffsmykil>
ln: tsql: Permission denied
<jeffsmykil>
Error: The linking step did not complete successfully
<jeffsmykil>
==> Summary
<jeffsmykil>
You can try again using `brew link freetds'
<jeffsmykil>
The formula built, but is not symlinked into /usr/local
dustint has quit [Remote host closed the connection]
<jeffsmykil>
shit sorry for the spam
aharris6 has quit [Remote host closed the connection]
mengu is now known as mengume
<havenn>
jeffsmykil: Does `brew link freetds` work?
theRoUS_ has quit [Changing host]
theRoUS_ has joined #ruby
mengume is now known as mengu
theRoUS has quit [Disconnected by services]
<havenn>
jeffsmykil: Might want to check `brew doctor` and fix anything it mentions as well.
<jeffsmykil>
yeah with sudo it did
theRoUS_ is now known as theRoUS
<jeffsmykil>
trying the gem again
theRoUS_ has joined #ruby
<jeffsmykil>
i could have just come in here two weeks ago
<_sillymarkets>
Can someone help me out? I'm getting "undefined local variable or method 'i' " for this small telnet script: https://gist.github.com/4329647 .. I can't out how its out of scope
<hoelzro>
_sillymarkets: if I had to guess, I would say that i is only defined after that begin block
<hoelzro>
oh, nvm
* hoelzro
misread
<Virunga>
Is there a method that returns a copy of an array with a new element appended?
<hoelzro>
_sillymarkets: which line?
horrror is now known as hrr
<hoelzro>
Virunga: +
<jeffsmykil>
thanks again havenn have a good day
<_sillymarkets>
line 33
vlad_starkov has joined #ruby
jeffsmykil has left #ruby [#ruby]
<Virunga>
hoelzro: thanks
<_sillymarkets>
is my "end" for the rescue stretch killing my loop ?
tjbiddle has quit [Ping timeout: 272 seconds]
kenneth has quit [Quit: kenneth]
<waxjar>
i think so _sillymarkets.
NiteRain has joined #ruby
mafolz has quit [Remote host closed the connection]
<waxjar>
btw, you only need one rescue block, rescue without anything rescues all exceptions
nemesit has quit [Quit: Leaving...]
<hoelzro>
well, not all
<waxjar>
you can use ensure to make sure something happens after you rescued an exception
<hoelzro>
just StandardErrors
thatguycraig has joined #ruby
maesbn has quit [Remote host closed the connection]
<waxjar>
fair enough, all errors minus some that are not intended to be rescued
<_sillymarkets>
would, rescue --> ensure --> next .......... force it to go to the next iteration of telnetting to i? I've been trying to play with rescue to make it hop to the next iteration, but it errors on "next" for me, so I threw in "exit" at least
tjbiddle has joined #ruby
slash_nick has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<waxjar>
i'd probably do something like name.count..0.each { … } instead of using a counter _sillymarkets
yshh has joined #ruby
Goles has joined #ruby
yshh_ has joined #ruby
<waxjar>
and put your begin .. rescue .. ensure .. end block in that each block
rakl has joined #ruby
yshh has quit [Remote host closed the connection]
<_sillymarkets>
I see what you're saying
miskander has quit [Quit: miskander]
jlast_ has joined #ruby
_64k has quit [Ping timeout: 264 seconds]
nat2610 has joined #ruby
apeiros_ has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
dr_neek has quit [Quit: dr_neek]
sn0wb1rd has quit [Quit: sn0wb1rd]
jlast has quit [Ping timeout: 265 seconds]
Guest73771 is now known as mjolk2
havenn has quit [Read error: No route to host]
statarb3 has joined #ruby
art_man1 has joined #ruby
wnl_work has joined #ruby
<mjolk2>
is something like this: homeDir = "File.expand_path('~')"
<mjolk2>
not a thing in ruby?
havenn has joined #ruby
<mjolk2>
i want to use it later like nextDir = "#{homeDir}/code/"
<mjolk2>
for use in a vagrantfile
<wnl_work>
argh. fresh install on centos 6.3 with ruby 1.8.7 and gem 1.3.7 (which is what comes from the centos repo). mysql-devel is installed and /usr/include/mysql/mysql.h exists. but i still cant install any mysql-related gem: http://paste.lopsa.org/100
<wnl_work>
any ideas?
bradhe has joined #ruby
mjolk2 is now known as mjolk_brb
<havenn>
wnl_work: Yum (or apt-get for that matter) installs of Ruby are pretty broken.
<havenn>
wnl_work: Can you build yourself or use ruby-build or rvm to install a more modern Ruby?
* wnl_work
sighs
binaryplease has joined #ruby
<wnl_work>
well it needs to be 1.8.7 to be compatible with where the code will run eventually
<wnl_work>
which i suppose i could still do with rvm
<wnl_work>
so you think the rpm is broken or 1.8.7 is broken?
slainer6_ has quit [Remote host closed the connection]
nomenkun has quit [Remote host closed the connection]
<slash_nick>
wnl_work: can you not use rvm to install 1.8.7?
<havenn>
wnl_work: Hrm. You could double check you've got the build tools installed: sudo yum install -y gcc automake zlib-devel libyaml-devel openssl-devel gdbm-devel readline-devel ncurses-devel libffi-devel
<havenn>
wnl_work: And try gem again. Dunno?
<wnl_work>
okay, will try that
<wnl_work>
but it sure is acting like mkmf just isnt able to find the header files
vlad_starkov has quit [Ping timeout: 252 seconds]
Nimsical has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has joined #ruby
<havenn>
wnl_work: Oh, you have mysql installed, yeah?
<havenn>
yum install mysql mysql-server
<wnl_work>
so of that list, gcc, automake, gdbm-install, libyaml-devel, ncurses-devel, and readline-devel were not installed
<wnl_work>
yes, those are installed.
<wnl_work>
oh MAN
yacks has joined #ruby
slainer68 has joined #ruby
<wnl_work>
im betting because gcc was missing, mkmf was failing, and extconf was interpreting that as a missing header file
<wnl_work>
now....it works.
<havenn>
wnl_work: Yup.
<havenn>
wnl_work: Good deal. :)
<wnl_work>
gem needs to give better error messages. :-/
PragCypher has quit [Quit: Leaving]
yacks has quit [Max SendQ exceeded]
QKO has joined #ruby
yacks has joined #ruby
_nitti has quit [Remote host closed the connection]
<wnl_work>
thx
* wnl_work
needs to tuck away that list of pkgs for fuure gems
<internetishard1>
havenn: now I get "`report_final_status': undefined method `empty?" when I moved @errors = [] (on line 43) to `@errors = []`(on like 35)
lolcathost has joined #ruby
<havenn>
internetishard1: Can you paste another pastie?
thams has quit [Read error: Connection reset by peer]
<internetishard1>
havenn: ah that allows the rest of it to work. I was thinking "I've the bad files now, and I can just output those" but that won't work without that line. nvm!
cascalheira has joined #ruby
thams has joined #ruby
eldariof has joined #ruby
uris has quit [Ping timeout: 265 seconds]
xyzodiac has joined #ruby
adeponte has joined #ruby
<havenn>
internetishard1: You can reduce the line to `valid? script` if you don't want the successes to print.
ephemerian has quit [Quit: Leaving.]
<havenn>
internetishard1: No tildes :P
hello has joined #ruby
maesbn has joined #ruby
BoomCow has joined #ruby
joeycarmello has joined #ruby
mahmoudimus has joined #ruby
<hello>
hi
<havenn>
Hello: Hello
mneorr has quit [Read error: Connection reset by peer]
mneorr has joined #ruby
<hello>
any lady?
jso has joined #ruby
dankest is now known as dankest|away
pskosinski has left #ruby ["Learn Life's Little Lessons"]
lenovodroid has quit [Read error: Connection reset by peer]
timmow has quit [Ping timeout: 252 seconds]
francisfish has quit [Remote host closed the connection]
freakazoid0223 has quit [Quit: Leaving]
jkarayusuf has joined #ruby
rjmt___ has joined #ruby
<internetishard1>
havenn: yeah so for $?.exitstatus - will that look in the second half of the array?
Vainoharhainen has quit [Quit: Leaving...]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
<havenn>
internetishard1: You could check if the $?.success? and if so, add $?.exitstatus to the @errors Array.
c0rn has joined #ruby
c0rn has quit [Excess Flood]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
Gues_____ has quit [Quit: Computer has gone to sleep.]
Guest21567 has quit [Read error: Connection reset by peer]
io_syl has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
slainer68 has quit [Remote host closed the connection]
Guest21567 has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
dr_bob has left #ruby [#ruby]
browndawg has quit [Quit: Leaving.]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
madhadron has joined #ruby
joeycarmello has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
baroquebobcat has quit [Remote host closed the connection]
banisterfiend has quit [Read error: Connection reset by peer]
c0rn has joined #ruby
baroquebobcat has joined #ruby
c0rn has quit [Excess Flood]
samphippen has quit [Quit: Computer has gone to sleep.]
dr_neek has joined #ruby
banisterfiend has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
voodoofish430 has joined #ruby
axl_ has quit [Quit: axl_]
<internetishard1>
havenn: runcnd_script("#{script.lang} #{script.flag} #{script.filename}", {:raise_on_failure=>false}) well... this is the line before it. So I'm trying to take it from that array
pwpw has quit [Quit: pwpw]
davidcel- has joined #ruby
dr_neek has quit [Client Quit]
elaptics is now known as elaptics`away
davidcelis has quit [Quit: K-Lined.]
davidcel- is now known as davidcelis
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<madhadron>
Has anyone else had trouble getting SimpleCov to get to report method calls as covered?
joeycarmello has quit [Ping timeout: 264 seconds]
loofy2 has quit [Remote host closed the connection]
lolcathost has quit [Quit: leaving]
<havenn>
internetishard1: Can you paste a gist of where you check $?.success?
axl_ has joined #ruby
DaltonUS has quit [Quit: DaltonUS]
Elhu has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
bluenemo has joined #ruby
lolcathost has joined #ruby
uris has joined #ruby
mneorr has quit [Remote host closed the connection]
DaltonUS has joined #ruby
havenn has joined #ruby
nga4 has quit [Ping timeout: 255 seconds]
belga_ has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
nwertman has joined #ruby
darthdeus has quit [Quit: Leaving...]
a_a_g has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
dtwdb has quit [Quit: Page closed]
Banistergalaxy has quit [Remote host closed the connection]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
mneorr has joined #ruby
brianpWins has quit [Quit: brianpWins]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
belga_ has quit [Client Quit]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
mjolk2 has quit [Quit: Leaving]
QKO has quit [Read error: Operation timed out]
havenn has quit [Ping timeout: 265 seconds]
c0rn has joined #ruby
c0rn has quit [Excess Flood]
QKO has joined #ruby
c0rn has joined #ruby
c0rn has quit [Excess Flood]
cdt has joined #ruby
Dario_ has quit [Ping timeout: 248 seconds]
c0rn has joined #ruby
dougireton has quit [Quit: Leaving.]
matrixise has quit [Ping timeout: 264 seconds]
alexim has joined #ruby
samuel02 has joined #ruby
pcarrier has quit []
rdark has quit [Quit: leaving]
vlad_starkov has joined #ruby
arietis has joined #ruby
cdt has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 246 seconds]
nazty has quit [Read error: Connection reset by peer]
jlast has joined #ruby
dougireton has joined #ruby
NobbZ|away is now known as NobbZ
dougireton has quit [Client Quit]
blazes816 has joined #ruby
mhi^ has joined #ruby
Gues_____ has joined #ruby
ramblex has quit [Read error: Connection reset by peer]
the_jeebster has joined #ruby
FiveAcres has quit [Remote host closed the connection]
Nykolla has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
grzywacz has quit [Ping timeout: 255 seconds]
ttt has joined #ruby
Hanmac1 is now known as Hanmac
tangorri has left #ruby [#ruby]
nemesit has joined #ruby
_nitti has quit [Remote host closed the connection]
ianbishop has joined #ruby
ttt has quit [Ping timeout: 245 seconds]
mascool has joined #ruby
schaerli has joined #ruby
Solnse has joined #ruby
Russell^^ has joined #ruby
fred909 has joined #ruby
axl_ has quit [Quit: axl_]
bricker`away is now known as bricker
tvsutton has quit [Quit: Quit]
axl_ has joined #ruby
tvsutton has joined #ruby
answer_42 has quit [Remote host closed the connection]
tris has quit [Quit: Leaving]
answer_42 has joined #ruby
ewag has joined #ruby
mjbamford has joined #ruby
mascool has quit [Quit: WeeChat 0.3.9]
dougireton has joined #ruby
BoomCow has left #ruby ["Leaving"]
Dario_ has joined #ruby
dougireton has quit [Remote host closed the connection]
ryanf has joined #ruby
banjara has joined #ruby
includex has quit [Quit: Leaving...]
ebobby has joined #ruby
jarjar_prime has quit [Quit: Sleep time.]
vlad_starkov has joined #ruby
gordon1775|2 has quit [Ping timeout: 252 seconds]
brianpWins has joined #ruby
benmills has joined #ruby
kil0byte has quit [Remote host closed the connection]
jtharris is now known as jharris-lunch
Goles has quit [Ping timeout: 272 seconds]
Dario_ has quit [Ping timeout: 260 seconds]
axl_ has quit [Quit: axl_]
maesbn has quit [Remote host closed the connection]
nga4 has joined #ruby
kenneth has joined #ruby
zodiak has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
thmzlt` has joined #ruby
mrsolo has joined #ruby
Goles has joined #ruby
darthdeus has joined #ruby
thmzlt` has quit [Remote host closed the connection]
zodiak has joined #ruby
darthdeus has quit [Client Quit]
a_a_g has quit [Quit: Leaving.]
jenrzzz has joined #ruby
darthdeus has joined #ruby
DaltonUS has quit [Quit: DaltonUS]
tommylommykkkins is now known as tommylommykins
emmanuelux has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<voodoofish430>
so something that I'm not clear about, how can I find out the contents of an object, like what fields I can see?
<voodoofish430>
Example I guess would be for an http call using Net::HTTP
<hoelzro>
well, I guess it depends on which crypt algorithm that PHP used
<Tumulte>
I'm also considering a SSO solution
cakehero has joined #ruby
<hoelzro>
it seems to me (from a cursory glance at the crypt documentation) that PHP picks a crypt function
<hoelzro>
I would be surprised if Ruby didn't have support for whichever one PHP picked
<hoelzro>
you just need to figure out which one it is
<Tumulte>
Ok it should be bcrypt then
<Tumulte>
(as far as i've understood it)
ebouchut has joined #ruby
<oqa>
and salts & other things php might use
xyzodiac has quit [Quit: Computer has gone to sleep.]
dmiller has joined #ruby
dr_neek has joined #ruby
phelps has quit [Ping timeout: 250 seconds]
<Tumulte>
Ok, so cross language encryptions are possible
<hoelzro>
oqa: good point!
<hoelzro>
Tumulte: yes
ttt has joined #ruby
<Tumulte>
that is good to hear
gyre007 has quit [Remote host closed the connection]
Gues_____ has quit [Quit: Computer has gone to sleep.]
burgestrand has joined #ruby
mjbamford has quit [Quit: Leaving...]
phelps has joined #ruby
jxriddle has quit [Quit: jxriddle]
hrr has quit [Read error: Connection timed out]
mjbamford has joined #ruby
tfitts has quit [Ping timeout: 250 seconds]
ttt has quit [Ping timeout: 245 seconds]
joeycarmello has joined #ruby
seanyo has quit [Remote host closed the connection]
JDubs has quit [Remote host closed the connection]
gbchaosmaster has joined #ruby
jharris-lunch is now known as jtharris
horrror has joined #ruby
rondale__ has quit [Remote host closed the connection]
horrror has quit [Client Quit]
vikingly has joined #ruby
mercwithamouth has joined #ruby
thmzlt has quit [Remote host closed the connection]
dankest|away has quit [Ping timeout: 265 seconds]
chussenot has joined #ruby
agarie has joined #ruby
<danneu>
Question: I have a bunch of object instances that I want to be able to access an identical hash that's expensive to generate (I don't want to have to generate it in every instance). How do you handle this?
<hoelzro>
danneu: when you say 'hash', do you mean like a cryptographic hash?
<hoelzro>
and you want to generate it once, and share it between instances of a class?
includex has joined #ruby
Neomex1 has joined #ruby
<danneu>
hoelzro: I mean the data structure. a hash map
Neomex1 has quit [Client Quit]
zeade has joined #ruby
luckyruby has joined #ruby
<hoelzro>
danneu: so you want to share a Hash between multiple instances of the same class?
nomenkun has joined #ruby
fred909 has quit [Ping timeout: 265 seconds]
Neomex has quit [Ping timeout: 250 seconds]
alexspeller has joined #ruby
hotovson has quit [Remote host closed the connection]
_nitti has joined #ruby
vlad_starkov has joined #ruby
<danneu>
hoelzro: right. basically i have a rake task that loops through all the users and instantiates an object every iteration (one per user). And I want all the objects for the duration of that Rake task to access the same hash map that's built at the beginning (from DB).
miskander has quit [Quit: miskander]
<hoelzro>
danneu: stuff it in a class variable?
timonv has quit [Read error: Connection reset by peer]
xyzodiac has joined #ruby
<vikingly>
Hi! I want to express rules that generate facts from other facts in ruby. However, depending on a rule engine seems a bit heavy handed. Any advice?
<danneu>
hoelzro: This is a Rails app and I'm unsure of the boundaries when it comes to something like a class variable. Wouldn't a class variable persist beyond the Rake task?
Neomex has joined #ruby
Dario_ has joined #ruby
<danneu>
hoelzro: The hashmap is based on a snapshot of the database so I'd want to regenerate it every time the raketask is run.
bkzl has joined #ruby
<hoelzro>
danneu: I'm not terribly familiar with Rake, but if you put it in a class variable of the class implementing your custom task, that should work, right?
<apeiros_>
of course only makes sense if you don't actually recreate the set for every .include? check. this is just an illustration.
mengu has quit [Quit: Konversation terminated!]
Banistergalaxy has joined #ruby
<yfeldblum>
kenneth, depends on the size of the array
olrrai has joined #ruby
olrrai has quit [Read error: Connection reset by peer]
miskander has quit [Quit: miskander]
jxriddle has joined #ruby
ttt has quit [Ping timeout: 276 seconds]
danneu has quit [Quit: WeeChat 0.3.8]
<Dwarf>
Good evening folks, I tried to install the mysql gem but got an error instead, it said that I should check the mkmf.log for more details. Where can I find this?
pothibo has joined #ruby
<Dwarf>
Disregard that, found it.
<Hanmac>
Dwarf: you need to install the libmysqlclient-dev package
Beoran__ has quit [Read error: Connection reset by peer]
<Dwarf>
The gem or the package?
Beoran__ has joined #ruby
<Dwarf>
The package it seems
<Hanmac>
yeah the gem needs the package
<Dwarf>
Alright thanks a bunch mate
<Hanmac>
PS: my system has a "ruby-mysql" package
<Dwarf>
Heh. Got a different error this time around:
<Dwarf>
ERROR: Failed to build gem native extension.
<Dwarf>
Might as well install ruby-mysql
<Hanmac>
"ruby-mysql" package is the mysql gem in debian package form
<oqa>
Dwarf: you'll need the dev packages
<Dwarf>
Yea I installed ruby-mysql, going to see if it works now
<Hanmac>
Dwarf it is nearly the same, but the ruby-* packaged gems are not updated so often than the gems itself
<Dwarf>
Well I'm on debian so that's nothing new hehe
kdridi has quit [Quit: Leaving]
alex__c2022 has quit [Remote host closed the connection]
alex__c2022 has joined #ruby
mneorr has joined #ruby
aquaranto has quit [Remote host closed the connection]
ephekt has joined #ruby
alexspeller has quit [Ping timeout: 252 seconds]
theRoUS has quit [Ping timeout: 264 seconds]
danneu has joined #ruby
Dario_ has joined #ruby
axl_ has joined #ruby
Guest25886 has quit [Quit: Guest25886]
amysan has joined #ruby
ephekt has left #ruby [#ruby]
mneorr has quit [Remote host closed the connection]
Morkel_ has joined #ruby
buibex has joined #ruby
Dario_ has quit [Ping timeout: 252 seconds]
Solnse has quit [Ping timeout: 245 seconds]
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
buibex has quit [Remote host closed the connection]
saurb has joined #ruby
emergion has joined #ruby
nat2610 has quit [Quit: Leaving.]
nat2610 has joined #ruby
atno has quit [Ping timeout: 265 seconds]
jlast has quit [Ping timeout: 248 seconds]
carloslopes has quit [Remote host closed the connection]
pavilionXP has quit [Ping timeout: 272 seconds]
jxriddle has quit [Quit: jxriddle]
sepp2k1 has joined #ruby
_alejandro has joined #ruby
ryannielson has quit [Quit: ryannielson]
jmuniz has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
iaj_ has quit [Ping timeout: 256 seconds]
sepp2k has quit [Ping timeout: 272 seconds]
wermel has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
rakl has joined #ruby
<rking>
Hi guys. I'm drawing a blank. Is there a more idiomatic way of saying h[:key] = h[:key].m
mengu has joined #ruby
manizzle has quit [Remote host closed the connection]
mark_locklear has quit [Remote host closed the connection]
iaj has joined #ruby
<ryanf>
h[:key] .= m
<ryanf>
;)
jxriddle has joined #ruby
manizzle has joined #ruby
buibex has joined #ruby
Divinite has joined #ruby
<amysan>
hello. rails environment can be set to production/development in various different places, da? What to do if you can't figure out where the environment is being set to development?
<Divinite>
Check your gentile.
<amysan>
so far i can think of 3 possible places: bash, apache and .rb
<Divinite>
*Gemfile
<amysan>
My what? LOL
<amysan>
Well, it's not my VPS, i'm helping a customer
<amysan>
Who claims to have checked all locations where it can be set within Ruby itself
<amysan>
so i was wondering if there's a way to see where the variable is being set
sailias has quit [Quit: Leaving.]
jmuniz has quit [Quit: Later nerds!]
alexspeller has joined #ruby
cascalheira has joined #ruby
pothibo has quit [Quit: pothibo]
<shevy>
amysan hmm... if it would be a global variable, you could use set_trace_var
miskander has joined #ruby
<shevy>
I think Divinite meant to check your genitals
<amysan>
ahaha :)
<amysan>
i'm not a programmer but set_trace_var sounds promising
<shevy>
well it's limited :(
<shevy>
there is pry + pry-debug
<amysan>
i'll suggest it in a way that does not betray the fact that i know nothing about rails
<shevy>
all I know about rails is that it uses valid ruby code, so that should be enough
<Divinite>
shevy: Gentile = Old word for non-believer of god.
<shevy>
Senile?
<shevy>
Senile Genitals!!!
geekbri has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
tyfighter has joined #ruby
<amysan>
nono, it means uncircumcised
thmzlt has quit [Remote host closed the connection]
<Norrin>
no, it mean non-jew
<C0deMaver1ck>
Gentile == Not Jewish
atno has joined #ruby
<Hanmac>
shevy when i make an big extenable project i call the addons "briketts" :D
<C0deMaver1ck>
wait, this is #ruby right? lol
answer_42 has quit [Ping timeout: 276 seconds]
<amysan>
Norrin: that's what i said :D
<amysan>
sorry, retarded/disfunctional sense of humor
<shevy>
hmm brickets.... meat... yum
jxriddle has quit [Quit: jxriddle]
Divinite has quit [Ping timeout: 245 seconds]
<Norrin>
i was moreso addressing divinite though
Divinite has joined #ruby
mjbamford has quit [Quit: Leaving...]
Dario_ has joined #ruby
<shevy>
I am going to remember that word
<shevy>
ohh... german translation is "heidnisch"
<Divinite>
shevy: It's a tasty word
<shevy>
that's even worse than a non-believer... that's an EVIL non-believer ... the heide must be converted or killed :D
<shevy>
reminds me of monty python... that sketch where they were philosophizing about the sound of words
<slash_nick>
and black sheep... ro-ad... roe-add...road
<slash_nick>
not so much
<shevy>
lol
nomenkun has quit [Remote host closed the connection]
Divinite has quit [Ping timeout: 240 seconds]
Dario_ has quit [Ping timeout: 264 seconds]
mneorr has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
Godd2 has joined #ruby
eldariof has quit []
vlad_starkov has quit [Ping timeout: 265 seconds]
dmiller has quit [Read error: Connection reset by peer]
dmiller_ has joined #ruby
havenn has quit [Remote host closed the connection]
Goles has quit [Quit: Computer has gone to sleep.]
hotovson has quit [Remote host closed the connection]
PetePorty is now known as PolarPanda
beiter has quit [Quit: beiter]
timonv has quit [Remote host closed the connection]
[Neurotic] has joined #ruby
rondale_sc has quit [Quit: rondale_sc]
hotovson has joined #ruby
moshee has quit [Remote host closed the connection]
mmap has joined #ruby
Boohbah has joined #ruby
Tumulte has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
chessguy has joined #ruby
<mmap>
Greetings, ruby newbie here with a question. I'm reading a ruby tutorial that is talking about the use of %w{ ... } as a shortcut to create an array of words. My question is, I've observed that '@' introduces instance '@@' for class variables, and '$' seems to be the sigil for global variables. What does the beginning '%' signify, when used as '%w', if anything ?
<mmap>
Does it introduce the use of some intrinsic built-in function or something?
banisterfiend has quit [Ping timeout: 248 seconds]
speakingcode has quit [Ping timeout: 260 seconds]
<_sillymarkets>
Can someone help me out with my "rescue" command? https://gist.github.com/4332653 ... When I comment out rescue and the 2 lines below it, the code works perfectly. When i leave rescue in, it says "Connection reset by peer"
<bean>
are you really telnetting?
<bean>
o.o
<mmap>
thanks again bean
<bean>
np mmap
mmap has left #ruby [#ruby]
<_sillymarkets>
SSH, but wrapped in telnet pty
speakingcode has joined #ruby
invisime has quit [Quit: Leaving.]
burgestrand has joined #ruby
<bean>
_sillymarkets: i recommend rescuing a specific exception, not just Exception
ianbishop has joined #ruby
Divinite has joined #ruby
aaronmacy1 has joined #ruby
Dario_ has quit [Ping timeout: 244 seconds]
daniel_- has joined #ruby
postmodern has joined #ruby
aaronmacy has quit [Read error: Connection reset by peer]
gabrielrotbart has joined #ruby
dtwdb has quit [Quit: Page closed]
<_sillymarkets>
okay, Ill change it to SystemCallError. Any idea on why it stops and tries to rescue a "connection reset by peer" when its uncommented? There is no connection reset by peer when rescue is not in place
tommylommykins is now known as Morpheme
ttt has joined #ruby
saurb has left #ruby [#ruby]
twoism has joined #ruby
squidBits has joined #ruby
wnl_work has quit [Quit: Leaving]
tommyvyo_ has joined #ruby
Morpheme is now known as tommylommykins
nga4 has quit [Ping timeout: 246 seconds]
ttt has quit [Ping timeout: 276 seconds]
<apeiros_>
bean: rescue => e does not rescue Exception. it defaults on StandardError. on a related note: don't inherit from Exception directly, inherit from StandardError or more specific.
atno has quit [Ping timeout: 264 seconds]
<bean>
ah, correct, apeiros_. my brain isn't 100% today
statarb3 has quit [Quit: Leaving]
otters has joined #ruby
banisterfiend has joined #ruby
chussenot has joined #ruby
foohey has quit [Ping timeout: 246 seconds]
lenovodroid has joined #ruby
jrist is now known as jrist-afk
aaronmacy1 has quit [Read error: Connection reset by peer]
aaronmacy has joined #ruby
jekotia has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
Proshot has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
cakehero has joined #ruby
blacktulip has quit [Remote host closed the connection]
ackram has joined #ruby
jslowe has joined #ruby
alexspeller has joined #ruby
cakehero has quit [Client Quit]
<reactormonk>
I'll strangle everyone who rescues Exception just for fun with his favourite stuffed animal.
v0n has quit [Ping timeout: 255 seconds]
<UdontKnow>
reactormonk: or kenny.
gabrielrotbart has quit [Remote host closed the connection]
<C0deMaver1ck>
I don't think you can catch an exception with a stuffed animal
cakehero has joined #ruby
Goles has joined #ruby
<slash_nick>
you can stuff an exception in a caught animal
atno has joined #ruby
cakehero has quit [Client Quit]
<C0deMaver1ck>
o.0
* slash_nick
might be too nonsensical for a career in this field
<yfeldblum>
slash_nick, i'd recommend finding a subculture for the whimsicalist, such as ruby
Goles has quit [Read error: Connection reset by peer]
* slash_nick
doesn't have a whimcycle...
phelps has joined #ruby
<slash_nick>
but if I did... I'd go anywhere I could think of... just on a whim
cakehero has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
Goles has joined #ruby
snearch has quit [Quit: Verlassend]
cakehero has quit [Client Quit]
* C0deMaver1ck
straps on his lolerskates and rolls to his roflcopter
zodiak has quit [Ping timeout: 272 seconds]
Dario_ has joined #ruby
cakehero has joined #ruby
_nitti has quit [Remote host closed the connection]
havenn has joined #ruby
banisterfiend has quit [Ping timeout: 265 seconds]
cakehero has quit [Client Quit]
iamjarvo has quit [Quit: Leaving.]
<slash_nick>
nice
Dario_ has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
lenovodroid has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
nwertman has quit [Remote host closed the connection]
PolarPanda has quit [Ping timeout: 272 seconds]
alanp_ has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
cakehero has quit [Client Quit]
thmzlt has quit [Remote host closed the connection]
asteve has quit [Quit: Computer has gone to sleep.]
speakingcode has quit [Ping timeout: 248 seconds]
jslowe has quit [Quit: Leaving]
aajjbb has joined #ruby
dangerousdave has quit [Ping timeout: 264 seconds]
mercwithamouth has quit [Ping timeout: 250 seconds]
cakehero has joined #ruby
<yfeldblum>
whimcycle come in various shapes and sizes, but they always have a prime number of wheels
beneggett has joined #ruby
alanp has quit [Ping timeout: 255 seconds]
cakehero has quit [Client Quit]
lolcathost has quit [Quit: cya peepls]
beneggett has quit [Client Quit]
danieldocki has quit [Quit: Leaving...]
cakehero has joined #ruby
alexim has quit [Ping timeout: 252 seconds]
samuel02 has quit [Remote host closed the connection]
thams has quit [Read error: Connection reset by peer]
thams has joined #ruby
beneggett has joined #ruby
cantonic has joined #ruby
axl_ has quit [Quit: axl_]
cakehero has quit [Client Quit]
alexspeller has quit [Ping timeout: 252 seconds]
grzywacz has quit [Ping timeout: 265 seconds]
nari_ has joined #ruby
__BigO__ has quit [Remote host closed the connection]
lenovodroid has joined #ruby
cakehero has joined #ruby
zodiak has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
apeiros_ has quit [Remote host closed the connection]