cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
lytol has quit [Remote host closed the connection]
djbkd has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
harly has joined #ruby-lang
djbkd has quit [Ping timeout: 246 seconds]
hackeron has quit [Ping timeout: 256 seconds]
test45566 has joined #ruby-lang
Iskarlar has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 265 seconds]
ta_ has joined #ruby-lang
hackeron has joined #ruby-lang
<harly>
nooby returning to ruby qs: setting up a clean env again. using chruby and ruby-install. after i get a ruby/rails package, doing gem intsall bundler, then bundle install. that about right?
<harly>
package = a git checkout for example.
intinig has quit [Remote host closed the connection]
<womble>
harly: Yeah, that sounds about right in general.
intinig has joined #ruby-lang
<zenspider>
depends on the package... none of mine use bundler for example
<harly>
hmm. Well. There's a Gemfile.
<harly>
goal is to install what that specifies is needed. i sbundler the best way?
<zenspider>
its the ... popular way.
<harly>
:)
<harly>
how would you do it?
<zenspider>
I try my best not to
ta_ has quit [Ping timeout: 265 seconds]
<harly>
so you don't have a Gemfile? or you install the dependencies it specifies a different way?
<waxjar>
if it's distributed as a gem, it'll have a gemspec listing the dependencies
<harly>
ok. well this isn't. it has a Gemfile.
<harly>
it's also a rails app. maybe that restricts it further.
godd2 has quit [Ping timeout: 244 seconds]
<waxjar>
rails comes with bundler i believe
<pipework>
Rails depends on bundler.
<harly>
ok. not sure it's even installed railsyet. :)
<pipework>
harly: install bundler then bundle install, youer' right.
<pipework>
I prefer install bundler then bundle install over install rails then bundle install.
<zenspider>
inevitably it'll be different anyway. :)
amsi has quit [Quit: Leaving]
<zenspider>
the only thing I throw in there different is using ohmygems to create a new gem repo so I can nuke it when I'm done (and to keep everyone's garbage separate)
<pipework>
zenspider: Sometimes I keep a Gemfile in my ~/projects directory with the version of rails I want to generate new apps with.
test45566 has quit [Remote host closed the connection]
<pipework>
zenspider: In development?
<zenspider>
released as a gem.
<pipework>
Oh
<zenspider>
stupid tiny shell script
<zenspider>
eg: omg rails41
intinig has quit [Ping timeout: 276 seconds]
<zenspider>
bundle install
ta_ has joined #ruby-lang
<harly>
that looks handy.
<harly>
i've not run into problems yet with chruby's partitioning. but i've not done much either.
iamninja has quit [Quit: ZZZzzz…]
<waxjar>
that's neat zenspider
ta_ has quit [Ping timeout: 265 seconds]
fclausen has joined #ruby-lang
ta_ has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
ta has quit [Read error: Connection reset by peer]
skyrocker has quit [Read error: Connection reset by peer]
ta has joined #ruby-lang
skyrocker has joined #ruby-lang
ta_ has quit [Ping timeout: 265 seconds]
Aova has joined #ruby-lang
amclain has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
chills42 has joined #ruby-lang
David_H_Smith has joined #ruby-lang
martinbmadsen has joined #ruby-lang
yfeldblum has quit [Remote host closed the connection]
simi has joined #ruby-lang
amclain has quit [Quit: Leaving]
|jemc| has quit [Read error: Connection reset by peer]
amclain has joined #ruby-lang
|jemc| has joined #ruby-lang
intinig has joined #ruby-lang
ruby-lang171 has joined #ruby-lang
ruby-lang171 has quit [Client Quit]
fclausen has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
yfeldblum has joined #ruby-lang
ta_ has quit [Ping timeout: 244 seconds]
intinig has quit [Ping timeout: 245 seconds]
ddd has quit [Ping timeout: 245 seconds]
lytol has joined #ruby-lang
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
yellowgh0st has joined #ruby-lang
ur5us has joined #ruby-lang
pabloh has joined #ruby-lang
sankaber has joined #ruby-lang
lytol has quit [Read error: Connection reset by peer]
lytol has joined #ruby-lang
xsdg_ has quit [Ping timeout: 244 seconds]
xsdg has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
<pabloh>
hey,
<pabloh>
Does anyone knows if there's an API to look up for a file at ruby load's path without actually loading the file?
Aova has joined #ruby-lang
fet has joined #ruby-lang
tkuchiki has joined #ruby-lang
<fet>
hola alguien me ofria traducir chmops
<fet>
esa sentencia la uso
<fet>
para eliminar una linea
<fet>
al introducir variables
<fet>
ejemplo nombre = gets.chomp
<fet>
gets es otbener
<fet>
pero chomp ???
David_H_Smith has quit [Remote host closed the connection]
tunaCanBruh has joined #ruby-lang
marcdel has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 256 seconds]
hellome has joined #ruby-lang
<pabloh>
fet chomp, borra el ultimo salto de carro de la linea si esta present
<pabloh>
fet, y este es un canal en inglés :)
timanema has joined #ruby-lang
symm- has quit [Ping timeout: 272 seconds]
marcdel has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby-lang
<fet>
ok thank you
fet has quit [Quit: Leaving]
marcdel has joined #ruby-lang
lytol has quit [Remote host closed the connection]
roamingdog has quit []
djbkd has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
sferik has joined #ruby-lang
doobi-sham-96336 has joined #ruby-lang
tkuchiki has quit [Ping timeout: 265 seconds]
intinig has joined #ruby-lang
simi has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 272 seconds]
intinig has quit [Ping timeout: 246 seconds]
symm- has joined #ruby-lang
joast has quit [Quit: Leaving.]
David_H_Smith has joined #ruby-lang
gwendall has quit [Remote host closed the connection]
timanema has quit [Ping timeout: 276 seconds]
chinmay_dd has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
<ruby-lang775>
Hi everybody, I'm having problems with breaking out from a loop can someone help me with this? http://repl.it/95U/1
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cdtaylor>
ruby-lang775: Give me a moment
<weaksauce>
ruby-lang775 you are breaking but you are not breaking out of the outer loop
<ruby-lang775>
aye. I can break from the second loop but i dont know from where to break the outer loop from..
<weaksauce>
add a line after 23 and say break
<weaksauce>
and in line 8 put next
<weaksauce>
well actually that is not going to work. this is not the best ruby style
<cdtaylor>
That's what I'm scratching my head at.
<ruby-lang775>
weaksauce: I tried that too but if the name is caught by if/else of first loop the whole code will break.. it is possible to avoid that..
<weaksauce>
the loop do constructs are not the best idea
<ruby-lang775>
ohh, so I need to find an alternative for the script?
hendranata_ has quit [Ping timeout: 246 seconds]
<cdtaylor>
Are you familiar with functions?
<ruby-lang775>
You mean methods?
Lewix_ has quit [Remote host closed the connection]
<cdtaylor>
Does the keyword "def" mean anything to you?
<ruby-lang775>
def example; #so smth; end
<weaksauce>
methods function are almost synonyms
<weaksauce>
and*
crdpink has joined #ruby-lang
<weaksauce>
ruby-lang775 try using a while first_name == "" && last_name == "" as an outer loop
<ruby-lang775>
I'm still here.
crdpink2 has quit [Ping timeout: 265 seconds]
<weaksauce>
set first_name = "" when you get some info that you don't like
<ruby-lang775>
I'm trying.
willwish has joined #ruby-lang
<harly>
1) you can't 'break' out two levels. 2) if that's relaly needed, a try/catch is generally set up. 3) it's not needed here. 4) dont' have your last name as an inner loop. Just have it run after the outer loop finishes. 5) better is what weaksauce suggestted. You know when the loop will end; when you set a firstname. and when you set a lastname. so use that.
cantonic has quit [Quit: cantonic]
lytol has joined #ruby-lang
<ruby-lang775>
Okay thanks
<ruby-lang775>
Are variables defined inside a loop only local to the loop??? :o
<harly>
yes.
<harly>
define them before the loop if you want them outside the loop.
nisstyre has quit [Changing host]
nisstyre has joined #ruby-lang
<ruby-lang775>
Alright
lytol has quit [Ping timeout: 264 seconds]
skade has joined #ruby-lang
__butch__ has quit [Quit: Leaving.]
Aova has quit [Read error: Connection reset by peer]
ruby-lang775 has quit [Ping timeout: 246 seconds]
Aova has joined #ruby-lang
Vivex_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
dvorkbjel has quit [Excess Flood]
Kero has quit [Ping timeout: 255 seconds]
Kero has joined #ruby-lang
Vivex has quit [Ping timeout: 255 seconds]
kyb3r_ has quit [Ping timeout: 255 seconds]
dvorkbjel has joined #ruby-lang
iamninja has joined #ruby-lang
kyb3r_ has joined #ruby-lang
skade has quit [Quit: Computer has gone to sleep.]
oddmunds has quit [Read error: Connection timed out]
yfeldblum has quit [Ping timeout: 264 seconds]
dellavg_ has joined #ruby-lang
oddmunds has joined #ruby-lang
willwish has left #ruby-lang [#ruby-lang]
skade has quit [Quit: Computer has gone to sleep.]
oddmunds has quit [Ping timeout: 246 seconds]
skade has joined #ruby-lang
skade has quit [Client Quit]
oddmunds has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
j0n3 has joined #ruby-lang
lytol has quit [Remote host closed the connection]
Iskarlar has joined #ruby-lang
oddmunds has quit [Ping timeout: 255 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
_djbkd has quit [Quit: My people need me...]
Aova has quit [Read error: Connection reset by peer]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has joined #ruby-lang
amclain has quit [Quit: Leaving]
oddmunds has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 265 seconds]
chussenot has joined #ruby-lang
j4cknewt has quit [Ping timeout: 255 seconds]
canton7 has joined #ruby-lang
gwendall has joined #ruby-lang
godd2 has joined #ruby-lang
gwendall has quit [Ping timeout: 276 seconds]
tunaCanBruh has joined #ruby-lang
ta_ has joined #ruby-lang
apeiros_ has joined #ruby-lang
Bwild has joined #ruby-lang
j4cknewt has joined #ruby-lang
wmoxam has quit [Ping timeout: 245 seconds]
wmoxam has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 240 seconds]
ta_ has quit [Ping timeout: 276 seconds]
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
skade has joined #ruby-lang
ta_ has joined #ruby-lang
aarshpatel has joined #ruby-lang
chussenot has quit [Quit: chussenot]
<aarshpatel>
Hey guys. I just started learning ruby a couple of weeks ago andI feel like I have the basics down. I want to move on to intermediate topics. What should i learn next?
<aarshpatel>
And I was wondering how you guys got better at programming?
wprice has quit [Quit: wprice]
simi has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
<apeiros_>
aarshpatel: practice :)
<harly>
what have you done so far?
skade has quit [Quit: Computer has gone to sleep.]
<ljarvis>
aarshpatel: write code
intinig has joined #ruby-lang
ledestin has quit [Quit: ledestin]
wallerdev has quit [Quit: wallerdev]
havenwood has quit [Remote host closed the connection]
aarshpatel has quit [Ping timeout: 246 seconds]
Bwild has quit [Ping timeout: 272 seconds]
ShawnHill has left #ruby-lang [#ruby-lang]
Bwild has joined #ruby-lang
intinig has quit [Remote host closed the connection]
<apeiros_>
"There's a wild unshaved yak in front of you, what do you do?"
<apeiros_>
"Go west"
<apeiros_>
"You have been killed by a ranting yorick"
<apeiros_>
I think it's obvious why I still haven't made a game yet :(
priodev has joined #ruby-lang
gix has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
<harly>
i'd play that game
Aova has joined #ruby-lang
gwendall has joined #ruby-lang
ta_ has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
kyb3r_ has quit [Read error: Connection reset by peer]
stamina has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
futilegames has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 256 seconds]
banister has joined #ruby-lang
oleo is now known as Guest84095
oleo__ has joined #ruby-lang
<yorickpeterse>
apeiros_: hi
Guest84095 has quit [Ping timeout: 255 seconds]
<apeiros_>
howdy yorickpeterse
aef has joined #ruby-lang
<yorickpeterse>
totally nailed the timing
<yorickpeterse>
~12 minutes for Q/A
futilegames has quit [Quit: futilegames]
<apeiros_>
<apeiros_>
aaaah, yes, of course:
<apeiros_>
$ css2sass -h
<apeiros_>
/Users/apeiros/.rvm/gems/ruby-2.2.0/gems/css2sass-0.0.10/bin/css2sass:14:in `each': No such file or directory @ rb_sysopen - -h (Errno::ENOENT)
gwendall has quit [Remote host closed the connection]
<apeiros_>
yorickpeterse: you're a rubinius core dev?
aef has joined #ruby-lang
martinbmadsen has joined #ruby-lang
<yorickpeterse>
No I pretend I am for internet points
<yorickpeterse>
(but yes, I'm a core dev)
martinbmadsen has quit [Ping timeout: 245 seconds]
<apeiros_>
I need to start fiches on ruby people :D
Aova has quit [Read error: Connection reset by peer]
kramsee has quit [Ping timeout: 264 seconds]
Aova has joined #ruby-lang
ta_ has joined #ruby-lang
kramsee has joined #ruby-lang
ledestin has joined #ruby-lang
ledestin has quit [Ping timeout: 240 seconds]
mnngfltg has joined #ruby-lang
ta_ has quit [Read error: Connection timed out]
ta_ has joined #ruby-lang
gwendall has joined #ruby-lang
gix has quit [Ping timeout: 255 seconds]
skade has joined #ruby-lang
skade has quit [Client Quit]
gwendall has quit [Remote host closed the connection]
gwendall has joined #ruby-lang
gwendall has quit [Client Quit]
gix has joined #ruby-lang
tkuchiki has joined #ruby-lang
Voker57 has quit [Remote host closed the connection]
dorei has joined #ruby-lang
skade has joined #ruby-lang
djbkd has quit [Ping timeout: 264 seconds]
skade has quit [Client Quit]
ledestin has joined #ruby-lang
stamina has quit [Quit: WeeChat 1.1.1]
araujo has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby-lang
Aova has joined #ruby-lang
intinig has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
araujo has joined #ruby-lang
araujo has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 255 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
chussenot has joined #ruby-lang
ta_ has joined #ruby-lang
chussenot has quit [Quit: chussenot]
fclausen has joined #ruby-lang
ta_ has quit [Ping timeout: 240 seconds]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
arBmind1 has quit [Read error: Connection reset by peer]
aef has quit [Remote host closed the connection]
aef has joined #ruby-lang
arBmind has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 255 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has joined #ruby-lang
simi has quit [Ping timeout: 264 seconds]
sankaber has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
chinmay_dd has joined #ruby-lang
qba73 has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
Miphix has joined #ruby-lang
cornerma1 has joined #ruby-lang
Aova has joined #ruby-lang
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cornerman has quit [Ping timeout: 265 seconds]
cornerma1 is now known as cornerman
chussenot has joined #ruby-lang
qba73 has quit [Remote host closed the connection]
timanema has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
ledestin has quit [Quit: ledestin]
Forgetful_Lion has quit [Quit: indeed]
tunaCanBruh has quit [Ping timeout: 255 seconds]
mnngfltg has quit [Quit: This computer has gone to sleep]
ta_ has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
symm- has joined #ruby-lang
arBmind has quit [Quit: Leaving.]
ta_ has quit [Ping timeout: 265 seconds]
timanema has quit [Quit: Lost terminal]
oleo__ has quit [Quit: Verlassend]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
oleo has joined #ruby-lang
yfeldblum has joined #ruby-lang
arBmind has joined #ruby-lang
intinig has quit [Ping timeout: 240 seconds]
j4cknewt has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby-lang
unsymbol has quit [Ping timeout: 246 seconds]
sarkyniin has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 264 seconds]
face has joined #ruby-lang
unsymbol has joined #ruby-lang
elia has joined #ruby-lang
qba73 has joined #ruby-lang
faces has quit [Ping timeout: 246 seconds]
arBmind has quit [Ping timeout: 245 seconds]
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
djinni` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
arBmind has joined #ruby-lang
arBmind has left #ruby-lang [#ruby-lang]
intinig has joined #ruby-lang
jgpawletko has joined #ruby-lang
ta_ has joined #ruby-lang
djinni` has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
ta_ has quit [Ping timeout: 264 seconds]
tunaCanBruh has quit [Ping timeout: 246 seconds]
harly has quit [Quit: Leaving]
red_menace has joined #ruby-lang
Pugsley_ has joined #ruby-lang
qba73 has quit []
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
martinbmadsen has joined #ruby-lang
Integralist has joined #ruby-lang
clamstar has quit [Ping timeout: 264 seconds]
martinbmadsen has quit [Ping timeout: 240 seconds]
intinig has quit [Ping timeout: 245 seconds]
Integralist has quit [Client Quit]
clamstar has joined #ruby-lang
intinig has joined #ruby-lang
djinni` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
djinni` has joined #ruby-lang
rikkipitt has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
SuMo_D has joined #ruby-lang
roamingdog has joined #ruby-lang
symm- has quit [Ping timeout: 245 seconds]
djinni` has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 255 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
SuMo_D_ has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
intinig has quit [Ping timeout: 264 seconds]
kapil__ has quit [Quit: Connection closed for inactivity]
tkuchiki has quit [Ping timeout: 272 seconds]
intinig has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
tunaCanBruh has quit [Ping timeout: 256 seconds]
ta_ has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
ta_ has quit [Ping timeout: 265 seconds]
mcclurmc_ has joined #ruby-lang
mcclurmc has quit [Ping timeout: 272 seconds]
diegoviola has quit [Quit: WeeChat 1.1.1]
symm- has joined #ruby-lang
Aova has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SuMo_D_ has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
tekacs has quit [Ping timeout: 272 seconds]
tekacs has joined #ruby-lang
SuMo_D has quit [Ping timeout: 264 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
SuMo_D has joined #ruby-lang
<|jemc|>
yorickpeterse: nice gif :)
Voker57|2 has joined #ruby-lang
intinig has quit [Ping timeout: 245 seconds]
brixen has quit [Ping timeout: 256 seconds]
malev has quit [Ping timeout: 264 seconds]
sindork has quit [Ping timeout: 276 seconds]
intinig has joined #ruby-lang
sindork has joined #ruby-lang
xybre has quit [Ping timeout: 256 seconds]
brixen has joined #ruby-lang
djinni` has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
roamingdog has joined #ruby-lang
Miphix has quit [Quit: Leaving]
roamingdog has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby-lang
fedexo has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
Voker57|2 has quit []
ta_ has quit [Ping timeout: 244 seconds]
tunaCanBruh has joined #ruby-lang
havenwood has joined #ruby-lang
Aova has joined #ruby-lang
hinbody-mobile has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 264 seconds]
yellowgh0st has joined #ruby-lang
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
yfeldblum has joined #ruby-lang
banister has joined #ruby-lang
aarshpatel has joined #ruby-lang
mnngfltg has joined #ruby-lang
yfeldblum has quit [Ping timeout: 246 seconds]
<aarshpatel>
Hey guys. How did you guys get better at programming in ruby. Any tips?
Iskarlar has joined #ruby-lang
ta_ has joined #ruby-lang
<red_menace>
just do something
<aarshpatel>
like what
araujo has quit [Ping timeout: 276 seconds]
Lewix has joined #ruby-lang
Lewix has joined #ruby-lang
<red_menace>
like an application or script that does something
<red_menace>
you will usually run into stuff that you have done wrong (it doesn't work), so you look up how to do it correctly, and then you remember (theoretically)
araujo has joined #ruby-lang
[H]unt3r has joined #ruby-lang
banister is now known as banisterfiend
mattyohe has joined #ruby-lang
<jhass>
aarshpatel: if the result's small enough, once you're done, post it here for review
<jhass>
seeing alternate versions of things you already thought through is a quite good learning experience IMO
ta_ has quit [Ping timeout: 246 seconds]
<aarshpatel>
are there any essential books thtat I can read
<aarshpatel>
to get better
<bougyman>
SICP
<tobiasvl>
SICp is a great book but not sure if it's recommended in this case
<tobiasvl>
although it helps you think in the functional paradigm
[H]unt3r has quit [Read error: Connection reset by peer]
[H]unt3r has joined #ruby-lang
<tobiasvl>
aarshpatel: just code a lot of ruby I guess! have some projects and look up stuff all the time
wallerdev has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
__butch__ has joined #ruby-lang
__butch__ has quit [Client Quit]
[H]unt3r has quit [Quit: Leaving]
aarshpatel has quit [Ping timeout: 246 seconds]
SuMo_D has quit [Remote host closed the connection]
martinbmadsen has joined #ruby-lang
roamingdog has joined #ruby-lang
SuMo_D has joined #ruby-lang
SuMo_D has quit [Remote host closed the connection]
SuMo_D has joined #ruby-lang
djbkd has joined #ruby-lang
martinbmadsen has quit [Ping timeout: 245 seconds]
roamingdog has quit [Ping timeout: 245 seconds]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
MartynKeigher has joined #ruby-lang
lytol has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
Aova has joined #ruby-lang
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MartynKeigher>
hey all... wondering if some could help me out. I'm try to run PUMA (webserver) as a daemon. right now i am able to run it from command - sudo bunlde exec puma - and it runs fine. I just need it to STAY running, and if poss, run on startup. http://i.imgur.com/kHhZhKy.png
[H]unt3r has joined #ruby-lang
<MartynKeigher>
^ youi can ignore the issue about twitter. its unrelated.
intinig has quit [Ping timeout: 264 seconds]
<epitron>
MartynKeigher: that looks like windows to me
<epitron>
No wait
<epitron>
Just the font
<epitron>
:)
<epitron>
You could integrate it into your distribution's init system
tunaCanBruh has quit [Ping timeout: 246 seconds]
<epitron>
Or just make a bash script that loops forever, starting it whenever it quits
<epitron>
Or use one of those process manager things
<MartynKeigher>
epitron, ... looks like windows???
hinbody-mobile has quit [Ping timeout: 272 seconds]
<MartynKeigher>
oh. its a screenshot of the linux vm on an esx host
matju has joined #ruby-lang
intinig has joined #ruby-lang
[H]unt3r has quit [Read error: Connection reset by peer]
[H]unt3r has joined #ruby-lang
oleo has quit [Quit: Verlassend]
aemeredith has joined #ruby-lang
rikkipitt has joined #ruby-lang
lytol has quit [Remote host closed the connection]
xybre has joined #ruby-lang
oleo has joined #ruby-lang
roamingdog has joined #ruby-lang
Iskarlar has joined #ruby-lang
amclain has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
mnngfltg has quit [Quit: Leaving]
roamingdog has joined #ruby-lang
mnngfltg has joined #ruby-lang
mnngfltg has quit [Client Quit]
mnngfltg2 has joined #ruby-lang
intinig has quit [Remote host closed the connection]
mnngfltg2 has quit [Client Quit]
mnngfltg2 has joined #ruby-lang
intinig has joined #ruby-lang
fedexo has quit [Read error: Connection reset by peer]
chills42 has joined #ruby-lang
oleo has quit [Quit: Verlassend]
spuk has quit [Ping timeout: 245 seconds]
lytol has joined #ruby-lang
oleo has joined #ruby-lang
spuk has joined #ruby-lang
intinig has quit [Ping timeout: 272 seconds]
intinig has joined #ruby-lang
chills42 has quit [Remote host closed the connection]
<jhass>
MartynKeigher: the other term for the thing you want to use/google is supervisor or process supervisor. These come as stand alone program or your init system might already be one
Iskarlar_ has joined #ruby-lang
oleo has quit [Quit: Verlassend]
Iskarlar has quit [Ping timeout: 265 seconds]
sarkyniin has joined #ruby-lang
nathanstitt has joined #ruby-lang
Aova has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
oleo has joined #ruby-lang
Aova has joined #ruby-lang
aemeredith has quit [Remote host closed the connection]
oleo has quit [Read error: Connection reset by peer]
oleo has joined #ruby-lang
mcclurmc has joined #ruby-lang
intinig has quit [Remote host closed the connection]
SuMo_D has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 245 seconds]
oleo has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 265 seconds]
tunaCanBruh has quit [Ping timeout: 256 seconds]
oleo has joined #ruby-lang
oleo has quit [Client Quit]
mcclurmc_ has quit [Ping timeout: 245 seconds]
oleo has joined #ruby-lang
oleo has joined #ruby-lang
mnngfltg2_ has joined #ruby-lang
yellowgh0st has quit [Quit: yellowgh0st]
Iskarlar_ has quit [Ping timeout: 240 seconds]
mnngfltg2 has quit [Ping timeout: 276 seconds]
lytol has quit [Remote host closed the connection]
sudoubuntu has joined #ruby-lang
hahuang62 has joined #ruby-lang
hahuang62 has quit [Client Quit]
hahuang61 has joined #ruby-lang
lytol has joined #ruby-lang
mnngfltg2_ has quit [Ping timeout: 245 seconds]
arBmind has joined #ruby-lang
futilegames has joined #ruby-lang
lytol has quit [Remote host closed the connection]
pabs has quit [Ping timeout: 245 seconds]
pabs has joined #ruby-lang
djbkd has quit [Quit: Leaving...]
rikkipitt has quit [Quit: Leaving...]
rikkipitt has joined #ruby-lang
symm- has joined #ruby-lang
simi has joined #ruby-lang
ta_ has joined #ruby-lang
djbkd has joined #ruby-lang
malev has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
intinig has joined #ruby-lang
matju has quit [Ping timeout: 245 seconds]
yellowgh0st has joined #ruby-lang
mnngfltg2_ has joined #ruby-lang
drewdavis_ is now known as drewdavis
ta_ has joined #ruby-lang
Voker57 has joined #ruby-lang
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aova has quit [Read error: Connection reset by peer]
matju has joined #ruby-lang
j4cknewt has joined #ruby-lang
ta_ has quit [Ping timeout: 265 seconds]
Aova has joined #ruby-lang
Iskarlar has joined #ruby-lang
ta_ has joined #ruby-lang
iamninja has joined #ruby-lang
roamingdog has quit [Remote host closed the connection]
intinig has quit [Remote host closed the connection]
intinig has joined #ruby-lang
ta_ has quit [Ping timeout: 276 seconds]
oleo has quit [Quit: Verlassend]
oleo has joined #ruby-lang
intinig has quit [Ping timeout: 256 seconds]
roamingdog has joined #ruby-lang
hagabaka has quit [Ping timeout: 246 seconds]
oleo has quit [Quit: Verlassend]
oleo has joined #ruby-lang
oleo has quit [Read error: Connection reset by peer]
trajing|Mobile has joined #ruby-lang
trajing|Mobile has quit [Read error: Connection reset by peer]
malconis has joined #ruby-lang
chussenot has joined #ruby-lang
oleo has joined #ruby-lang
mnngfltg2 has joined #ruby-lang
chills42 has joined #ruby-lang
martinbmadsen has joined #ruby-lang
mnngfltg2_ has quit [Ping timeout: 255 seconds]
chills42 has quit [Ping timeout: 265 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
martinbmadsen has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby-lang
lytol has joined #ruby-lang
tunaCanBruh has joined #ruby-lang
mnngfltg2 has quit [Remote host closed the connection]
kyb3r_ has joined #ruby-lang
yfeldblum has quit [Ping timeout: 246 seconds]
malconis_ has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 246 seconds]
Aova has quit [Read error: Connection reset by peer]
malconis has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Read error: Connection reset by peer]
Aova has joined #ruby-lang
banister has joined #ruby-lang
[H]unt3r has quit [Quit: Leaving]
yfeldblum has joined #ruby-lang
red_menace has quit [Quit: ...zzzZZZzzz...]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
yfeldblu_ has joined #ruby-lang
intinig has joined #ruby-lang
yfeldblum has quit [Ping timeout: 272 seconds]
ta_ has joined #ruby-lang
mksm has joined #ruby-lang
<mksm>
Hi. How can I convert "0xaa" (String) to 0xaa (Integer)?
<mksm>
It is the same. But not for activerecord when writing to a binary column.
<heftig>
mksm: what are you seeing and what do you expect?
<womble>
mksm: A lot of time could have been saved if you'd mentioned the *entire* problem up-front.
Iskarlar has joined #ruby-lang
<womble>
(And what is a "binary column" in activerecord, anyway?)
<apeiros_>
blob
wallerdev has joined #ruby-lang
<womble>
apeiros_: That doesn't make sense, though... BLOBs don't care about hex vs integer.
<mksm>
I'm trying to save a MD5 hexdigest string to a BINARY(16) MySQL column through activerecord
<apeiros_>
womble: they do care if you think you could store binary data as hex
<apeiros_>
at least that's what I suspect is happening here
matrisking has joined #ruby-lang
<womble>
apeiros_: Fair enough.
<apeiros_>
mksm: so let me guess, that MD5 hexdigest is 16 bytes large? (32 hex digits)
<mksm>
When I try to save "653bb75f2bf95d447ce2ebce958c52f4", it converts to x'3635336262373566326266393564343437636532656263653935386335326634', which is what mysql expects but it's not 16 bytes
<apeiros_>
and womble just showed you how to convert hex data to binary
<apeiros_>
(which your driver will then dutifully convert back to hex to push it over to the db…)
futilegames has quit [Quit: futilegames]
<mksm>
I understand the diff between hex and binary (and pack/unpack), just trying to make the conversions work with AR reading/saving from the DB
<mksm>
Thanks for the help :D
<apeiros_>
AR expects a binary encoded string
<apeiros_>
not a hex decoded string
<womble>
apeiros_: Why would the driver re-encode the binary blob into hex to put it over the wire?
<apeiros_>
womble: 23:00 mksm: … it converts to x'363…
<apeiros_>
because that's what it seems to use.
<apeiros_>
I'd got to check, but I think pg wants it that way too, even with bind params
mqt_ has quit [Ping timeout: 246 seconds]
mqt has joined #ruby-lang
<apeiros_>
yepp, does
<womble>
apeiros_: The x'<stuff>' string looks like Python notation; that's just a different representation of the string "653bb<etc>"
<apeiros_>
womble: no
ta_ has quit [Ping timeout: 276 seconds]
dzejrou has joined #ruby-lang
<apeiros_>
pg.escape_bytea("hi") # => "\\x6869"
intinig has joined #ruby-lang
<apeiros_>
and you execute a query like: pg.exec_params("INSERT INTO foo VALUES($1)", [pg.escape_bytea("hi")])
thang has quit [Ping timeout: 240 seconds]
<apeiros_>
so you literally pass '\x6869'. i.e., the data is converted to a hex representation. and I'd not be surprised if that got reencoded as binary before it actually goes over the wire.
<apeiros_>
and people wonder why I think sql is a stupid idea for machine/machine communications…
<hackeron>
hey, I have a bizzare issue, when I run bundle install I get 'Bundler::GemspecError: Could not read gem at /home/deployer/timeagent/shared/bundle/ruby/2.2.0/cache/nokogiri-1.6.6.2.gem. It may be corrupted' - when I run gem install nokogiri -v '1.6.6.2' - it installs fine. Despite being installed, if I re-run the bundle command, it fails to install it with the same error, any ideas?
thang has joined #ruby-lang
hackeron was kicked from #ruby-lang by apeiros_ [when cross-posting, at least inform all channels that you cross post.]
tunaCanBruh has joined #ruby-lang
hackeron has joined #ruby-lang
<womble>
apeiros_: pg does the escaping transparently: db.exec_params("INSERT INTO blobby VALUES ($1)", ["ohai"]) does the same thing as db.exec_params("INSERT INTO blobby VALUES ($1)", [db.escape_bytea("ohai")]) (puts the same string into the DB)
<womble>
select * from blobby returns \x6f686169 twice
xsdg has quit [Ping timeout: 265 seconds]
<apeiros_>
have you tried with binary data?
<apeiros_>
I admit, I haven't tried bind params with unescaped data.
<womble>
That *is* "binary data"
xsdg has joined #ruby-lang
<apeiros_>
womble: I mean control codes and other fun stuff
<apeiros_>
0x00-0x19 and 0x80-0xff
Bwild has joined #ruby-lang
karma_ has joined #ruby-lang
tunaCanBruh has quit [Ping timeout: 265 seconds]
<karma_>
Hello all, I have a problem I can't find a solution for in the docs
Aova has quit [Read error: Connection reset by peer]
<karma_>
using Time I can't seem to get ruby to understand that the time I have is in UTC, it uses my local time instead
<womble>
karma_: How do you have the time you have?
<karma_>
I scrape a site with mechanize, use Time.parse
<womble>
Let me be more specific: what is the format of the time that you have.
<karma_>
2015-01-31 12:34:43
Forgetful_Lion has joined #ruby-lang
<karma_>
That is what I get from the site
<womble>
karma_: Tack " UTC" on the end of it
<karma_>
so that would be the correct way to do it?
<womble>
.parse (and .strptime) all expect local time.
<apeiros_>
womble: doesn't seem to like it
<womble>
<shrug> It's the way I've always done it.
<karma_>
ok, that is how I was going to do it, but I thought there would be a way to more tell Ruby what it was but could not find anything
<karma_>
Now I know why then :)
<karma_>
Thanks for your help
<womble>
karma_: Alternately, you can set ENV["TZ"] = "UTC", but that's rather excessively brutal.
<karma_>
Yeah, that seemed like a huge thing to do to solve a "simple" problem
<apeiros_>
so does not seem like it handles it transparently
Aova has joined #ruby-lang
<karma_>
once again, thanks :)
<womble>
karma_: Also, as a "safety net", you might want to use .strptime with a format of "%F %T %Z", just to make sure you're not getting fed misformatted dates
<apeiros_>
womble: so unless you use bytea for values which don't need bytea, you definitively want to have that fun of converting binary to hex and back half a dozen times :)
<karma_>
ok, I'll look into that
<womble>
Time.parse tries to deal with ambiguities sometimes, and doesn't always get it quite right. When you're dealing with times you've scraped off the Internet...
yellowgh0st has quit [Quit: yellowgh0st]
izietto has joined #ruby-lang
ta_ has joined #ruby-lang
rikkipitt has quit [Remote host closed the connection]
lytol has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 276 seconds]
rbpd5015 has joined #ruby-lang
dzejrou has quit [Ping timeout: 246 seconds]
dzejrou has joined #ruby-lang
<rbpd5015>
hey everyone, I am trying to parse an HRML page with NOKOGIRI and got a small problem