jimbach has quit [Remote host closed the connection]
jimbach has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
ki0 has joined #ruby
kenneth has joined #ruby
blackmesa has joined #ruby
jimbach has quit [Ping timeout: 244 seconds]
msmith_ has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
ki0 has quit [Ping timeout: 258 seconds]
neonixcoder has joined #ruby
moritzschaefer has joined #ruby
jimbach has joined #ruby
jamto11 has joined #ruby
msx is now known as ig0rr
wethu has joined #ruby
ig0rr is now known as msx
blackmesa has quit [Ping timeout: 240 seconds]
neonixcoder has quit [Client Quit]
justinmburrous has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
sepp2k has quit [Ping timeout: 272 seconds]
sepp2k1 has joined #ruby
charliesome has joined #ruby
jdj_dk has joined #ruby
aspires has quit []
lw has joined #ruby
ghostmoth has joined #ruby
Haiiro has quit [Read error: Connection reset by peer]
Haiiro has joined #ruby
ferr has quit [Remote host closed the connection]
endash has joined #ruby
msmith_ has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
ferr has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
YamakasY has quit [Ping timeout: 260 seconds]
GriffinHeart has joined #ruby
jamto11 has joined #ruby
Inv1s1ble has quit [Remote host closed the connection]
coderdad has joined #ruby
jdj_dk has quit [Ping timeout: 255 seconds]
aspires has joined #ruby
michaelchum_ has quit [Quit: Connection closed for inactivity]
Spami has joined #ruby
GriffinHeart has quit [Ping timeout: 272 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
gtrak has joined #ruby
jobewan has quit [Quit: Leaving]
devdazed has joined #ruby
coderdad has quit [Ping timeout: 244 seconds]
sevvie has quit [Ping timeout: 244 seconds]
devdazed has quit [Client Quit]
BadQuanta has quit [Ping timeout: 260 seconds]
robustus has quit [Ping timeout: 255 seconds]
marr has quit []
robustus|Off has joined #ruby
robustus|Off is now known as robustus
msmith_ has joined #ruby
msmith_ has quit [Remote host closed the connection]
sevenseacat has joined #ruby
RichardLitt has quit [Ping timeout: 258 seconds]
rshetty has joined #ruby
cubicme has quit [Read error: Connection reset by peer]
jamto11 has quit [Ping timeout: 255 seconds]
davasaurous has quit [Remote host closed the connection]
codeurge has joined #ruby
lemur has joined #ruby
davasaurous has joined #ruby
cubicme has joined #ruby
insaneinside has quit [Ping timeout: 245 seconds]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thoolihan has joined #ruby
krisquigley has joined #ruby
YamakasY has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
<tewlz>
I
danijoo has joined #ruby
neonixcoder has joined #ruby
davasaurous has quit [Ping timeout: 240 seconds]
davedev24_ has quit [Read error: Connection reset by peer]
<tewlz>
I'm writing a ruby script and trying to handle logging. Should I just make a module for MyLogger and pass around the logger instance?
davedev24_ has joined #ruby
krisquig_ has joined #ruby
<tewlz>
right now it's just a rake task and two classes, so not sure what idiomatic ruby would do
<tewlz>
s/rake task/Rakefile/
krisquigley has quit [Read error: Connection reset by peer]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamto11 has joined #ruby
dope has joined #ruby
agjacome has quit [Quit: leaving]
krisquigley has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gizmore>
i have a database and what to create a string stream/line iterator ... like
ghostmoth has quit [Quit: ghostmoth]
<gizmore>
EnumCreate { Records.find_each(user: foo) do |record| "record.date record.text" }
<gizmore>
so there is not much mem overhead... i hope it´s clear what i mean
krisquig_ has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
<tewlz>
gizmore: so what's the problem? Sounds like you know what you want to do.
codemonkey010101 has joined #ruby
<gizmore>
tewlz: i am not sure how the technique is called and where to get an example
lukekhamilton has joined #ruby
Avahey has joined #ruby
<tewlz>
gizmore: well I presume you would call the records using activerecord and you could create a StringIO to stream in the text and then do w.e. you want with it. I'm not sure if that's the best solution, but it should work
krisquig_ has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
krisquigley has joined #ruby
<gizmore>
tewlz: i am not sure how to achieve that :(
chrishough has joined #ruby
<Fire-Dragon-DoL>
mhh guys are there any way to perform CSV.foreach on a string file? I have a big csv file in memory but would like to avoid parsing it all at once
<Fire-Dragon-DoL>
however, foreach accepts only a path =\
rikai has quit [Quit: No Ping reply in 180 seconds.]
codemonkey010101 has quit [Client Quit]
<gizmore>
same stuff... Fire-Dragon-DoL i got some rails example for this
<tewlz>
gizmore: which part are you not sure about?
monkeypatch has joined #ruby
<gizmore>
tewlz: i return a new iterator using the AR.find_each stuff?
<Fire-Dragon-DoL>
gizmore: send me them! :p
<tewlz>
Fire-Dragon-DoL: check out CSV class, it can take in a string and you can tell it what the delimiters are then do things with it like turn it into an array that looks like a csv file
lemur has quit [Remote host closed the connection]
northfurr has joined #ruby
<tewlz>
Fire-Dragon-DoL: ugh I was scrolled up somehow didn't read all of what you asked
lemur has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
krisquig_ has joined #ruby
govg has joined #ruby
<tewlz>
I would think CSV has something for parsing row by row, in fact I'm pretty sure I've seen a tutorial on it before.
rikai has joined #ruby
<Fire-Dragon-DoL>
tewlz: yes I know that, the problem is that I would like to parse the csv line by line, much like CSV.foreach is doing, instead of creating a HUGE array all at once, with all data parsed
<gizmore>
oh... mine is for generating csv... i suppose csv.open do |row| or something exists
<Fire-Dragon-DoL>
tewlz: CSV.foreach does it for sure, but it's for file only <.<
<Fire-Dragon-DoL>
I don't have a file
<Fire-Dragon-DoL>
:S
<Fire-Dragon-DoL>
and no I can't write on a file <.<
<Fire-Dragon-DoL>
(screw a lot of things)
<gizmore>
Fire-Dragon-DoL: probably open file do |line|
<tewlz>
Fire-Dragon-DoL: ahh so you're creating a CSV with an IO and want to parse row by row?
<Fire-Dragon-DoL>
exactly
<gizmore>
sry... i mean StringIO.open(string) or something
<Fire-Dragon-DoL>
if you do by line without csv parsing, you may end up parsing some \n IN column
<Fire-Dragon-DoL>
looks like CSV.foreach is implemented as open <something>
<tewlz>
does IO have some sort of read until "\n"?
<Fire-Dragon-DoL>
no wait, it accepts a file only ARGH
krisquig_ has quit [Read error: Connection reset by peer]
<Fire-Dragon-DoL>
tewlz: yes there is .readlines if I'm not wrong
fabrice31 has joined #ruby
<tewlz>
Fire-Dragon-DoL: so could you readline, make it CSV, do work, throw away CSV, repeat?
<tewlz>
I imagine you'll have to snag the headers outta there before doing that
slyv has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
lemur has quit [Ping timeout: 272 seconds]
krisquig_ has joined #ruby
lemur has joined #ruby
<Fire-Dragon-DoL>
mhhh yes tewlz but I think you misunderstood: I have a csv file (a big string, not a CSV instance), I want to convert it to a CSV but line by line instead of all at once, so I can parse every row as an array and do stuff with it (sorry, not sure if you understood that point, I don't think you are stupid, don't hate me)
<tewlz>
Fire-Dragon-DoL: sounds like you can do exactly what I just said, just don't close the CSV instance and keep writing into it
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krisquigley has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
<tewlz>
I'm very inexperienced with all of this, so basically I'm just bouncing ideas around hoping you'll answer your own question. I know that's how I usually find answers :p
<Fire-Dragon-DoL>
tewlz: oh maybe I understood what you mean
krisquigley has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
hellangel7 has joined #ruby
<tewlz>
:p
dannybit has joined #ruby
<tewlz>
that's what I'm here for. To rubber duck with peple so that emotionall they think I answered their question and over time people start thinking I know what I'm talkign about
Azure has joined #ruby
dannybit has left #ruby [#ruby]
krisquig_ has joined #ruby
dannybit has joined #ruby
Wolland has joined #ruby
justinmburrous has quit [Remote host closed the connection]
lemur has quit [Remote host closed the connection]
<dannybit>
Whats a good gem for ADB(Andorid debug bridge)
krisquigley has quit [Read error: Connection reset by peer]
lemur has joined #ruby
krisquig_ has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
j_mcnally has joined #ruby
dannybit has left #ruby [#ruby]
levisbakalinsky has joined #ruby
jdj_dk has quit [Ping timeout: 272 seconds]
aspires has quit []
patrick99e99 has joined #ruby
davasaurous has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
<Hanmac>
shevy hm for wxwidgets you might need to configure it again ... normally it does detect that do not have gst and them does not add it to wx ...
<Hanmac>
ujjain: that mixlib is not compatible with your old ruby, and shouldnt even been possible to installed on your system
sevenseacat has quit [Remote host closed the connection]
<zmyrgel>
the log output shows "Making sure necessary ..." lines but shows "All done" line only once
<zmyrgel>
so it seems it runs through the script once and later runs terminate too early or am I missing something
<shevy>
$omh_dir = Pathname.new("M:/")
cina has quit [Client Quit]
cina has joined #ruby
jimbach has joined #ruby
alem0lars has joined #ruby
<zmyrgel>
shevy: ?
ad_boot has joined #ruby
goodenough has quit [Remote host closed the connection]
<shevy>
that codebase man
rshetty has quit [Remote host closed the connection]
workmad3 has joined #ruby
rshetty has joined #ruby
cina has quit [Client Quit]
arup_r has quit [Remote host closed the connection]
cina has joined #ruby
yfeldblum has joined #ruby
jimbach has quit [Ping timeout: 260 seconds]
ta has quit [Read error: Connection reset by peer]
bal has quit [Ping timeout: 255 seconds]
ta has joined #ruby
<zmyrgel>
any ideas why the first run seems to work with the script but not the latter ones?
Hobogrammer has quit [Ping timeout: 260 seconds]
rshetty has quit [Ping timeout: 246 seconds]
yfeldblu_ has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
<shevy>
how shall people debug this when you don't give error messages
AlSquire has joined #ruby
wildroman2 has joined #ruby
<Hanmac>
zmyrgel: hm maybe the status file does not exist? did you checked that?
rafadc has joined #ruby
<zmyrgel>
Hanmac: if the status file is missing, the code should skip to end and print the "All done" to log
cina has quit [Quit: leaving]
<zmyrgel>
now I only see one All done in the log file but multiple lines with "Making sure necessary..." and nothing else
alem0lars has quit [Quit: AFK..]
<zmyrgel>
shevy: there are no error messages to show
pibby has quit [Ping timeout: 255 seconds]
<zmyrgel>
the script is run from task scheduler every 30min to check if the remote server has pushed the zip file and the done.txt to the incoming dir
jdj_dk has joined #ruby
startupality has joined #ruby
bMalum has joined #ruby
mijicd has joined #ruby
bal has joined #ruby
Advocation has quit [Quit: Advocation]
patrick99e99 has joined #ruby
Takle has quit [Remote host closed the connection]
ringaroses2 has joined #ruby
ringaring has quit [Read error: Connection reset by peer]
GeorgesLeYeti has joined #ruby
<shevy>
yeah
<shevy>
your code is not simple to debug
patrick99e99 has quit [Ping timeout: 240 seconds]
rbrs has joined #ruby
<zmyrgel>
it should monitor incoming dir for ASCII*.zip files and done.txt file, if both are found, it should extract the selected files from ASCII zip and move them to ote / omh dirs and remove the done.txt
rshetty has joined #ruby
<zmyrgel>
and also move the processed ASCII zip files to backup dir
Takle has joined #ruby
<zmyrgel>
the script seemed to work just fine when testing from command line but the scheduled runs seem to have some issue
arup_r has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
garethrees has joined #ruby
txdv has joined #ruby
mengu has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
rafadc has quit []
jdj_dk has quit [Ping timeout: 255 seconds]
emmesswhy has joined #ruby
blackmesa has joined #ruby
bMalum has quit [Quit: bMalum]
txdv has quit [Ping timeout: 245 seconds]
tokik has joined #ruby
mike32 has quit [Ping timeout: 272 seconds]
alem0lars has joined #ruby
skand has joined #ruby
narcan has joined #ruby
Hightower_ has quit [Quit: Given the choice between you, I'll take the sea-sick crocodile.]
coderdad has joined #ruby
Hightower_ has joined #ruby
havenwood has joined #ruby
krisquigley has quit []
ramfjord has quit [Ping timeout: 260 seconds]
Hightower_ has quit [Client Quit]
emmesswhy has quit [Quit: This computer has gone to sleep]
Hightower_ has joined #ruby
GriffinHeart has joined #ruby
<zmyrgel>
as I get "Making sure " lines in the log file, the script is running at correct times
andrewh has joined #ruby
coderdad has quit [Ping timeout: 255 seconds]
joonty has joined #ruby
<zmyrgel>
what is curious is, that I don't get matching "all done" or "Error running script" lines to log
<zmyrgel>
shouldn't the 'rescue Exception' cover all exceptions?
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 264 seconds]
krisquigley has joined #ruby
alem0lars has quit [Quit: AFK..]
gr33n7007h has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
<shevy>
yes
<shevy>
the logical conclusion is that your code would not raise an exception
<Hanmac>
zmyrgel: hm replace it with "rescue => e "
Phrogz has joined #ruby
epsylon has joined #ruby
<Hanmac>
"rescue Exception" is to critical because it also catchs syntax error in your script
<zmyrgel>
shevy: but shouldn't it log "All done" if no exception was raised?
<shevy>
zmyrgel what happens when you remove the begin rescue statement
<shevy>
zmyrgel that depends on whether the object logger works or not
txdv has joined #ruby
<zmyrgel>
I get the "Making sure necessary directories exist" lines in the log file every 30min
<zmyrgel>
so it would seem logger work
msmith_ has joined #ruby
<shevy>
see
<zmyrgel>
s/work/works/
<shevy>
you have one check called: if $status_file.exist?
dfcbeb has joined #ruby
<shevy>
that code is such a spaghetti mess
emmesswhy has joined #ruby
<shevy>
no clear separation of concerns, no module, classes or methods, global variables used everywhere when there is no need, and Pathname
alem0lars has joined #ruby
{xenomorph} is now known as xenomorph
<zmyrgel>
shevy: all which are pretty pointless to job this simple and small
<shevy>
what should happen if "if $status_file.exist?" is false by the way?
<shevy>
it is not pointless because you have an error you can not debug
<zmyrgel>
shevy: it should log "all done"?
<shevy>
zmyrgel how do you know that should happen?
<tobiasvl>
why are all the variables except logger global
<tobiasvl>
:P
<shevy>
because he is new to programming
Phrogz has quit [Ping timeout: 272 seconds]
sandelius has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
now see, that is how errors should be shown
GinoMan has joined #ruby
zarubin has joined #ruby
yfeldblum has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 246 seconds]
jdj_dk has joined #ruby
<shevy>
This is how I would restructure this code:
<shevy>
- all global variables get thrown away
<shevy>
- elimination of Pathname
yfeldblum has joined #ruby
<gr33n7007h>
shevy, why not just rescue => error
andrewh has quit [Quit: leaving]
jottr_ has joined #ruby
<shevy>
- write a class or a module that provides logging, in a toggleable way - one way for Logger, one for normal default console output
pemes has joined #ruby
pemes has left #ruby [#ruby]
<shevy>
gr33n7007h <Hanmac> zmyrgel: hm replace it with "rescue => e "
<shevy>
gr33n7007h Hanmac suggested that code, not me
andrewh has joined #ruby
sprihodko has joined #ruby
pemes has joined #ruby
AFKGeek has quit [Quit: Leaving]
qba73 has joined #ruby
jimbach has quit [Ping timeout: 272 seconds]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
penzrgb has joined #ruby
yfeldblum has quit [Ping timeout: 255 seconds]
penzrgb has quit [Client Quit]
mrgrieves has joined #ruby
fabrice31 has quit [Remote host closed the connection]
sandelius has joined #ruby
fabrice31 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Deejay_ has quit [Quit: Computer has gone to sleep.]
bal has quit [Ping timeout: 255 seconds]
jacobat has quit [Ping timeout: 246 seconds]
pemes has quit [Remote host closed the connection]
bal has joined #ruby
fabrice31 has quit [Ping timeout: 260 seconds]
<mrgrieves>
hi, wonder if someone can guide me. I'm writing a method, part of the method is to iterate over an array and create new hashes which names will come from the array item but not sure how to handle the hash creation ...
tvw has joined #ruby
<_lazarevsky>
mrgrieves: try hash = {}
<_lazarevsky>
:)
zarubin has quit [Remote host closed the connection]
mengu has quit [Ping timeout: 272 seconds]
<_lazarevsky>
mrgrieves: or even Hash.new
<apeiros>
mrgrieves: a hash does not have a name - so what do you mean by names?
<mrgrieves>
links.each do |link|\n link = Hash.new\n end
<_lazarevsky>
mrgrieves: d'ye wanna create new entries in the hash for each of the element in the array?
<_lazarevsky>
mrgrieves: or do you need to create a separate hash for each of the elements
<apeiros>
mrgrieves: you mean the name of the local variable? don't abuse the local variable name system as a hash.
<_lazarevsky>
give us the pseudo code
<mrgrieves>
_lazarevsky: exactly a separate hash for each element
<shevy>
mrgrieves sounds as if you want to use .map
<mrgrieves>
apeiros: yes I think my problem is handling variables
<apeiros>
mrgrieves: care to show the full method? because dynamically creating lvars is just plain wrong.
adac has joined #ruby
arup_r_ has joined #ruby
<apeiros>
(but I can't show you a better way without knowing what you try to achieve)
<adac>
I'm trying to 'convert' a datetime so I can save it in a DB: https://gist.github.com/anonymous/a5c554764f792780f73a however as you can see In the gist, this does not convert the time, but only the date. How to also convert the ime in this example?
boombadaroomba has joined #ruby
sprihodko_ has joined #ruby
bal has quit [Ping timeout: 255 seconds]
<apeiros>
mrgrieves: ok, that doesn't show me how you want to use those local variables afterwards
* apeiros
brb
jdj_dk has quit [Ping timeout: 260 seconds]
fabrice31 has joined #ruby
<apeiros>
adac: DateTime.strptime, not Date
arup_r has quit [Ping timeout: 260 seconds]
<mrgrieves>
apeiros: but even in the interpreter I don't seem to have access to the variables
uxp has quit [Read error: Connection reset by peer]
<adac>
apeiros, ahh thanks!
uxp has joined #ruby
bal has joined #ruby
<mrgrieves>
but the idea is to return another array similar to this
<mrgrieves>
all the items of this second array are coming from processing the first one
<mrgrieves>
I'm pretty sure there's an easier way to accomplish this :(
boombadaroomba has quit [Ping timeout: 255 seconds]
agjacome has joined #ruby
<apeiros>
mrgrieves: yes, you don't. because that's not how it works
* apeiros
back
<apeiros>
mrgrieves: the only way to set a local variable is to *literally* write the variable name out in an assignment.
roolo has quit [Remote host closed the connection]
<apeiros>
only exception: if you use a binding object to later evaluate (think template systems), then you can use Binding#local_variable_set
jacobat has joined #ruby
<shevy>
mrgrieves usually a super simple workaround is to use an Array to store your "variables"
roolo has joined #ruby
<mrgrieves>
apeiros: got the literall part ...
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy>
mrgrieves ruby itself does not really care about the names of variables, they are just pointers to ObjectSpace respectively their object_id effectively
<apeiros>
correct. variable names are for humans. machines have more efficient ways to deal with data. so every time you force it to go via names, you let it do extra work.
Advocation has joined #ruby
nfk has joined #ruby
smilansky is now known as somethingelse
roolo has quit [Ping timeout: 240 seconds]
somethingelse is now known as smilansky
yfeldblum has joined #ruby
<mrgrieves>
thanks guys, so how do you suggest I start building the hashes so I can then add then to this second array?
<shevy>
huh I am digging in ancient ruby code that I once wrote
<apeiros>
mrgrieves: as said - show the full method
<shevy>
COST["#{x}"] <-- that is effectively the same as COST[x.to_s] or?
<apeiros>
mrgrieves: riddling what you might want to do with it won't help much.
rshetty has quit [Remote host closed the connection]
<mrgrieves>
apeiros: I haven't strted writing and was just playing on the interpreter looking for ideas
<apeiros>
mrgrieves: then write it the way you'd write it if you could dynamically assign lvars
<shevy>
mrgrieves really, I was at that point in the past too, use an Array or a Hash to keep track of these :) or, write a class and @ivars
<shevy>
mrgrieves btw I just wanna check if my assumption is correct - do you know what .map does when applied to an Array?
<shevy>
emmesswhy there you say that the variable called rest will contain all but the first element
<shevy>
whereas name will be the first element of that Array
<shevy>
say/see
jdj_dk has quit [Ping timeout: 244 seconds]
bmurt has quit []
phutchins has joined #ruby
nonks has quit [Ping timeout: 240 seconds]
tlarevo has joined #ruby
culturelabs_ is now known as culturelabs
<Hanmac>
apeiros: one of the funniest things: WX::Color.new(255,0,0) == "red" #=> true
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
BombStrike has quit [Ping timeout: 245 seconds]
babak1 has joined #ruby
brendenb has joined #ruby
northfurr has joined #ruby
bmurt has joined #ruby
bmurt has quit [Client Quit]
bmurt has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
beef-wellington has joined #ruby
BombStrike has joined #ruby
sepp2k has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
kirun has joined #ruby
spastorino has joined #ruby
Alina-malina has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
dumdedum has joined #ruby
Maxdamantus has joined #ruby
emmesswhy has joined #ruby
<Maxdamantus>
Is left recursion the intensional behaviour of Enumerable.reduce? Is there a standard right-recursive (and left-recursive, if the answer to the first question is no) operation?
penzrgb has quit [Quit: This computer has gone to sleep]
cina has joined #ruby
GinoMan has quit [Ping timeout: 255 seconds]
babak1 has quit [Quit: Leaving]
<banister>
Maxdamantus it's a foldl ya
<banister>
Maxdamantus no foldr
<Maxdamantus>
Yeah, I've noticed that's how it behaves.
<banister>
Maxdamantus i thought foldr was only really useful in a lazy language like haskell?
<Maxdamantus>
dunno if that's considered standard or something in some sense—is it usual to rely on it being left?
<Maxdamantus>
banister: I don't think laziness has much to do with it.
arya_ has quit [Ping timeout: 260 seconds]
<banister>
Maxdamantus well in haskell i think it does, cos if foldr wasn't lazy in haskell you couldn't use it with infinite lists
<Maxdamantus>
the distinction is important when you're working with things that aren't monoidal.
cina has quit [Client Quit]
<Hanmac>
Maxdamantus: in ruby if you have "true || some_func" it does return true and simply ignore "some_func" ... it even does not raise an error if some_func does not exist
ldnunes has joined #ruby
<Maxdamantus>
and actually, I think right folds tend to be the more useful one, when there is a distinction.
<zmyrgel>
seems that it doesn't iterate the directory entries in monitor method for some reason
Macaveli has quit [Read error: Connection reset by peer]
northfurr has quit [Quit: northfurr]
coderdad has joined #ruby
bmurt has quit [Ping timeout: 246 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
klmlfl has joined #ruby
Macaveli has joined #ruby
marlonandrade has joined #ruby
<isxek>
hello, is there really no built-in way to check which platform the ruby script is running in? the stackoverflow suggested answers point to either a Config module, an RbConfig module, and a 3rd-party module called 'os'
coderdad has quit [Ping timeout: 244 seconds]
nonks has quit [Ping timeout: 240 seconds]
VanillaGoat_ has joined #ruby
jdj_dk has quit [Ping timeout: 240 seconds]
manzo has joined #ruby
zarubin has quit [Quit: Leaving.]
VanillaGoat__ has quit [Ping timeout: 246 seconds]
rshetty has quit [Remote host closed the connection]
Phrogz has joined #ruby
fsapo has joined #ruby
Imofftopic has joined #ruby
<sol_>
when i install taglib-ruby on ruby 2 on windows i get taglib_base.so (LoadError) with require 'taglib'
msmith_ has joined #ruby
Advocation has quit [Quit: Advocation]
<sol_>
anyone was able to install or compile it successfully?
jottr_ has quit [Quit: WeeChat 1.0]
apeiros has joined #ruby
jottr has joined #ruby
ringarin has quit [Read error: Connection reset by peer]
ringaring has joined #ruby
Takle has quit [Remote host closed the connection]
rshetty has joined #ruby
<zmyrgel>
hmm, isn't following a proper way to iterate files in dir:
<zmyrgel>
Dir.entries(@monitored) do |file| ... end
Phrogz has quit [Ping timeout: 272 seconds]
startupality has quit [Quit: startupality]
apeiros has quit [Remote host closed the connection]
<zmyrgel>
the log output line before that lists @monitored as it should but .entries doesn't seem to return anything
jamto11 has joined #ruby
it0a has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
DaniG2k has joined #ruby
msmith_ has quit [Ping timeout: 272 seconds]
brahmadpk has joined #ruby
JeffBonds has quit [Quit: JeffBonds]
arup_r has quit [Remote host closed the connection]
axilla has left #ruby [#ruby]
jamto11 has quit [Ping timeout: 272 seconds]
rshetty has quit [Remote host closed the connection]
jacobat has quit [Ping timeout: 258 seconds]
iiinzg has quit [Ping timeout: 244 seconds]
claymore has joined #ruby
mijicd has quit [Ping timeout: 250 seconds]
rshetty has joined #ruby
compuser has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AtumT has joined #ruby
mijicd has joined #ruby
krisquigley has quit [Remote host closed the connection]
gr33n7007h has quit [Ping timeout: 244 seconds]
aclearman037 has joined #ruby
yfeldblum has joined #ruby
krisquigley has joined #ruby
startupality has joined #ruby
isxek has quit [Quit: Page closed]
<shevy>
zmyrgel here is what I would do: write methods that do simple actions
<shevy>
then combine these methods
DaniG2k has quit [Ping timeout: 240 seconds]
<shevy>
rather than Dir.entries, I would use Dir[@monitored], but from a method. I would store intermediary results in proper @instance_variables of a class, and let the class solve the tasks at hand
<shevy>
you also have to handle the case when that result returns no entries
<shevy>
then you can omit the code below at line 64
<shevy>
and just use:
<shevy>
FileMonitor.new(monitored_path).monitor
fella5s has joined #ruby
ringaring has quit [Ping timeout: 245 seconds]
spacemud has quit [Ping timeout: 240 seconds]
<shevy>
oops
<shevy>
and just use:
<shevy>
FileMonitor.new.monitor
<shevy>
and if you move the method monitor() inside def initialize, you no longer have to call it manually there
<shevy>
so you could just do:
QKO has joined #ruby
<shevy>
FileMonitor.new
PaulePanter has quit [Ping timeout: 245 seconds]
IotaSpencer has quit [Ping timeout: 245 seconds]
ZYPP has quit [Ping timeout: 245 seconds]
<shevy>
it is much better now with a class though
parus has quit [Ping timeout: 240 seconds]
ahri has joined #ruby
PaulePanter has joined #ruby
ccooke has quit [Ping timeout: 245 seconds]
inukshuk has quit [Ping timeout: 245 seconds]
DefV has quit [Ping timeout: 245 seconds]
hamakn has quit [Remote host closed the connection]
<zmyrgel>
shevy: it depends if it runs properly
regedarek has quit [Ping timeout: 245 seconds]
<shevy>
this here confuses me a bit:
<shevy>
"#{@@backup_dir/file}"
parus has joined #ruby
<shevy>
should it not usually be this instead?
hamakn has joined #ruby
<shevy>
oh no wait
<zmyrgel>
shevy: already replaced with File.join
reinaldob has joined #ruby
ccooke has joined #ruby
gregf_ has quit [Ping timeout: 245 seconds]
DefV has joined #ruby
<shevy>
ah you learn fast, so ruby can't be your first language
jdj_dk has joined #ruby
inukshuk has joined #ruby
<zmyrgel>
like few other parts to get full path
regedarek has joined #ruby
cajone has quit [Ping timeout: 240 seconds]
otherj has joined #ruby
<shevy>
I usually query whether a dir exists like so
<ahri>
i'm making a rakefile that should prefer to depend on existing executables on the system, but that will download and build those executables, and obviously on re-run be happy to use those built executables -- how can i do this? it seems like i want conditional task execution but that feels wrong for rake
gregf_ has joined #ruby
inukshuk has quit [Client Quit]
Iota-Spencer has joined #ruby
<shevy>
this_dir = '/tmp/bla/'; if Dir.exist? this_dir; puts 'it exists!'; else; puts 'it does not exist!'; end
rshetty_ has joined #ruby
oo_ has joined #ruby
ZYPP has joined #ruby
<zmyrgel>
I'm still getting used to ruby idioms
iaj has quit [Ping timeout: 245 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
ringaring has joined #ruby
Imofftopic has quit [Quit: Leaving]
inukshuk has joined #ruby
ringaroses2 has quit [Read error: Connection reset by peer]
<ddv>
zmyrgel: like?
<zmyrgel>
ddv: what do you mean?
workmad3 is now known as wm3|away
<ddv>
zmyrgel: I'm still getting used to ruby idioms
spacemud has joined #ruby
iaj has joined #ruby
<zmyrgel>
blocks instead of for loops for starters
<zmyrgel>
what classes to use etc.
<jhass>
ahri: My first intuition would be to do a local bin/ with tasks to build your deps there, bin/whatever. The building tasks then would first check if a system wide version is available, if it is they would just symlink it there, if it isn't they would build it and symlink the built version
_5kg has quit [Ping timeout: 272 seconds]
rshetty_ has quit [Remote host closed the connection]
rshetty has quit [Ping timeout: 258 seconds]
<ddv>
zmyrgel: you never worked with closures before?
krisquigley has joined #ruby
rshetty has joined #ruby
<zmyrgel>
ddv: yeah, but switching languages isn't straighforward even if it supports same features
blackmesa has joined #ruby
alem0lars has joined #ruby
<shevy>
zmyrgel well it feels natural when you start to think in OOP terms
<shevy>
zmyrgel take for loops
<shevy>
if you have an array, it is easier to use .each on it directly
agjacome has quit [Quit: leaving]
<shevy>
it is like a container, a backpack in old MUD terminology "backpack, iterate over .each item you got there" @backpack.each {|item| item.name }
AlexRussia has quit [Ping timeout: 246 seconds]
agjacome has joined #ruby
abuzze_ has quit [Remote host closed the connection]
<shevy>
and blocks are like extra (optional) arguments to every method you get for free
ringaroses2 has joined #ruby
ringaring has quit [Read error: Connection reset by peer]
<shevy>
in ruby you have to select which features you want and which ones you don't want to
<shevy>
you can still use several for loops, some C coders do that especially when they initially matrices/multidimensional arrays
<shevy>
*initialize
AlexRussia has joined #ruby
<shevy>
classes are easy to use and help separate concerns; they can often help in readability too, though of course you get a similar thing with methods alone
<shevy>
def backup vs. class Backup
<shevy>
or Backup.backup
<shevy>
or a module!
abuzze has joined #ruby
<shevy>
include Backup; backup() # () just for demo purpose, people tend to omit the () in ruby especially when there are no arguments to them
afhammad has joined #ruby
Maxdamantus has quit [Ping timeout: 260 seconds]
<zmyrgel>
seems just that methods and classes would be overkill for small specific scripts
afhammad has quit [Client Quit]
<shevy>
dunno
<shevy>
I group things together as much as possible
<shevy>
like, create a .rb file
<canton7>
if I'm writing a 20-line shell script, chances are it won't have any methods or classes
<shevy>
put one class into it that solves a given task
<shevy>
then write a method in another .rb file that only calls that .rb file
<shevy>
and then invoke that method via an alias
<shevy>
for instance:
<shevy>
fix_pidgin: rinvoke fix_pidgin
<shevy>
where rinvoke simply invokes the method there in a .rb file
<crome>
it needs more than a 20 line script to fix pidgin
<shevy>
lol
<ddv>
just always use classes
<shevy>
yeah \o/
<shevy>
ddv how about modules
cajone has joined #ruby
<ddv>
when I have to group related classes
mleone has joined #ruby
arup_r has joined #ruby
<ddv>
anyway the hardest thing is sometimes naming/structuring stuff
<ddv>
never satistified
<ddv>
my perfectionism gets in the way somtimes and I have tendency to overengineer stuff
<crome>
maybe that's why some people use one letter labels for everything
<crome>
no more time wasted on coming up with proper names
rshetty has quit [Remote host closed the connection]
<canton7>
there are 2 hard computer science problems: cache invalidation, naming things, and off-by-one errors
<ddv>
you just said 3 things
<crome>
hehe
<canton7>
whoosh
mleone has quit [Ping timeout: 240 seconds]
<crome>
ddv: update your humour parser
<ahri>
jhass: symlinking is a great idea, thanks for that!
emmesswhy has joined #ruby
pandaant has joined #ruby
timonv_ has quit [Remote host closed the connection]
jdj_dk has quit [Ping timeout: 258 seconds]
<banister>
ddv I'm late to the party but -- lol
<txdv>
lets get the party started
klmlfl has quit [Remote host closed the connection]
<ddv>
:)
bal has quit [Read error: Connection reset by peer]
jao1337 has joined #ruby
livingstn has joined #ruby
bal has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
mengu__ has joined #ruby
wethu has joined #ruby
hellangel7 has joined #ruby
mengu has quit [Read error: Connection reset by peer]
emocakes has quit [Ping timeout: 258 seconds]
autonomousdev has joined #ruby
DaniG2k has joined #ruby
anaeem1 has quit [Remote host closed the connection]
GPH|work has quit [Read error: Connection reset by peer]
tlarevo_ has quit [Remote host closed the connection]
renderfu_ has quit [Remote host closed the connection]
AlSquire has quit [Ping timeout: 240 seconds]
moritzschaefer has joined #ruby
paulfm has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
sk87 has joined #ruby
drawingthesun has quit [Read error: Connection reset by peer]
moritzschaefer has quit [Ping timeout: 245 seconds]
drawingthesun has joined #ruby
ursooperduper has joined #ruby
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
zlude has joined #ruby
<j2p2>
remove surrounding quotes
<j2p2>
mrgrieves ^
iamjarvo has joined #ruby
<mrgrieves>
j2p2: Thank You!
<zlude>
I'm beginning in ruby/rails/sinatra, and i add csrf protection to my application, and now my view appears <input type="hidden" name="_csrf" value="txaL6JCSHtRBeMoLXaeXw1IZXpkrDVZHbNAhnUAKd9Q=" /> and the souce code, what it's really do? how csrf is protected? someone can explain to me?
dblessing has joined #ruby
msmith_ has joined #ruby
klmlfl has joined #ruby
jdj_dk has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
mr_blue has joined #ruby
<mr_blue>
hi all
dolf has joined #ruby
dolf is now known as Freeaqingme|
vimer has quit [Quit: leaving]
klaut has joined #ruby
<mr_blue>
I have an array = [1,2,3,4,5,6,7] what i want is to convert into a new array with values grouped at 3 like in : [[1,2,3], [4,5,6], [7]] any ideas ?
Advocation has quit [Quit: Advocation]
hellangel7 has quit [Remote host closed the connection]
<Freeaqingme|>
Hi folks, I've got the following string '/f/oo/bar/foobar'. I'm not sure hwat the best way to get the following output: [ '/f', '/f/oo', '/f/oo/bar', '/f/oo/bar/foobar' ] . I'm thinking Ruby must have some built-in stuff I could use, but I cannot find any of it (other than the obvious string.split. Any clues?
Spami has quit [Quit: This computer has gone to sleep]
<Freeaqingme|>
tobiasvl, true. I figured if there was an ascend, there had to be a descend as well. Lets see if I can turn that output into an array of strings...
GriffinHeart has joined #ruby
C0deMaver1ck_ has joined #ruby
jacobat_ has quit [Ping timeout: 245 seconds]
anarang has quit [Quit: Leaving]
<tobiasvl>
a = []; Pathname.new('/f/oo/bar/foobar').descend {|p| a << p.to_s }
<tobiasvl>
or something
<mrgrieves>
j2p2: the only problem I'm having is that in a similar scenario I need to do string interpolation ...
C0deMaver1ck_ is now known as C0deMaver1ck
<mrgrieves>
that's why I added the surronding quotes initially ...
<Freeaqingme|>
tobiasvl, ntx
<Freeaqingme|>
*tnx
<DaniG2k>
tobiasvl: nice solution
livathinos has quit [Ping timeout: 240 seconds]
<tobiasvl>
\o/
klaut has quit [Remote host closed the connection]
<tobiasvl>
mrgrieves: you can interpolate inside %x( )
brahmadpk has joined #ruby
livathin_ has quit [Ping timeout: 272 seconds]
akemrir has quit [Quit: WeeChat 1.0.1]
bal has quit [Ping timeout: 255 seconds]
Spami has joined #ruby
emocakes has quit [Ping timeout: 255 seconds]
hellangel7 has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alem0lars has joined #ruby
GriffinHeart has quit [Ping timeout: 255 seconds]
Kricir has joined #ruby
iamjarvo has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
bal has joined #ruby
jdj_dk has quit [Ping timeout: 255 seconds]
emocakes has joined #ruby
livathinos has joined #ruby
livathinos has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
tylersmith has joined #ruby
jottr_ has joined #ruby
_2easy has joined #ruby
dyu has joined #ruby
stunder has joined #ruby
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
yfeldblum has joined #ruby
entrenador has joined #ruby
freerobby has joined #ruby
himsin has quit [Quit: himsin]
entrenador has quit [Client Quit]
slester|away has joined #ruby
IceDragon has joined #ruby
mary5030 has joined #ruby
entrenador has joined #ruby
wsmoak_ has joined #ruby
wsmoak_ has quit [Changing host]
wsmoak_ has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
tbrock has joined #ruby
techsethi has quit [Quit: techsethi]
wsmoak has quit [Ping timeout: 245 seconds]
wsmoak_ is now known as wsmoak
Darryl has quit [Quit: Connection closed for inactivity]
yfeldblum has quit [Ping timeout: 255 seconds]
moritzschaefer has joined #ruby
slester|away is now known as slester
jobewan has joined #ruby
slester has quit [Quit: Quitte]
slester has joined #ruby
Spami has quit [Quit: Leaving]
ta has quit [Remote host closed the connection]
mengu__ has quit []
weemsledeux has joined #ruby
weemsledeux has quit [Changing host]
weemsledeux has joined #ruby
lmickh has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
jerematic is now known as jerematic|work
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
monkeypatch has joined #ruby
starkhalo has joined #ruby
toretore has joined #ruby
schaerli has quit [Remote host closed the connection]
boombadaroomba has joined #ruby
gsd has joined #ruby
jnollett_ has joined #ruby
tylersmith has quit [Ping timeout: 240 seconds]
Spami has joined #ruby
axl_ has joined #ruby
terlar has joined #ruby
Xiti has quit [Quit: Leaving]
moritzschaefer has quit [Ping timeout: 245 seconds]
hendricius has quit [Remote host closed the connection]
speaking1ode is now known as speakingcode
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hendricius has joined #ruby
ejnahc has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slawrence00 has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
arup_r has joined #ruby
jdj_dk has quit [Ping timeout: 246 seconds]
<mrgrieves>
tobiasvl: thanks, had to define a variable with the right command syntax (dealing with the quotation there) and then did the simple %x( #{cmd} ) interpolation
bal has quit [Quit: bal]
it0a has joined #ruby
abuzze has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
hendricius has quit [Ping timeout: 260 seconds]
<garethrees>
xiq_ I think `expect(@lib.books).to have(5).items` should work
beef-wellington has quit [Ping timeout: 260 seconds]
abuzze has joined #ruby
ejnahc has quit [Remote host closed the connection]
kobain has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
<garethrees>
oh, you're right, looks like its gone
fsapo has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 246 seconds]
rkalfane has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
GriffinHeart has quit [Ping timeout: 240 seconds]
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ta has quit [Remote host closed the connection]
apeiros has joined #ruby
momomomomo has joined #ruby
<xiq_>
now I just have to figure out how to make capy 2.4 work with RSpec 3.1
<xiq_>
i'm getting errors all over the place, already switched to :features, required Capybara::DSL etc. etc.
artmann has quit [Read error: Connection reset by peer]
artmann has joined #ruby
adac has quit [Ping timeout: 250 seconds]
_2easy has quit [Quit: leaving]
_2easy has joined #ruby
_2easy has quit [Changing host]
_2easy has joined #ruby
lukevinc has quit [Quit: ChatZilla 0.9.91 [Firefox 24.8.0/20000101000000]]
wm3|away has joined #ruby
wm3|away is now known as workmad3
olivier_bK has quit [Ping timeout: 250 seconds]
DaniG2k has quit [Ping timeout: 258 seconds]
banister has joined #ruby
aganov has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
nb_bez___ has joined #ruby
nouranology has quit [Quit: ChatZilla 0.9.91 [Firefox 32.0.3/20140924083558]]
<_2easy>
:q
Channel6 has joined #ruby
_2easy has quit [Client Quit]
DaniG2k_ has quit [Ping timeout: 245 seconds]
_2easy has joined #ruby
_2easy has joined #ruby
_2easy has quit [Changing host]
_2easy has quit [Client Quit]
dte has joined #ruby
_2easy has joined #ruby
_2easy has quit [Changing host]
_2easy has joined #ruby
dte is now known as mxrguspxrt
_2easy has quit [Client Quit]
beef-wellington has quit [Ping timeout: 255 seconds]
_2easy has joined #ruby
_2easy has quit [Changing host]
_2easy has joined #ruby
patrick99e99 has quit [Ping timeout: 255 seconds]
GriffinHeart has joined #ruby
_2easy has quit [Client Quit]
tylersmith has quit [Remote host closed the connection]
Macaveli has quit [Ping timeout: 260 seconds]
tylersmith has joined #ruby
brahmadpk has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
gsd has joined #ruby
rbrs has joined #ruby
BadQuanta has joined #ruby
slawrence00 has joined #ruby
beef-wellington has joined #ruby
livathinos has joined #ruby
_2easy has joined #ruby
livathinos has quit [Remote host closed the connection]
tylersmith has quit [Ping timeout: 240 seconds]
_2easy has quit [Client Quit]
aspires has joined #ruby
hmsimha has quit [Ping timeout: 240 seconds]
afhammad has joined #ruby
slester has quit [Ping timeout: 260 seconds]
jottr_ has joined #ruby
Xeago has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
Fudus has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
pu22l3r_ has joined #ruby
Kricir_ has joined #ruby
DaniG2k has joined #ruby
abuzze has quit [Remote host closed the connection]
Kricir has quit [Read error: Connection reset by peer]
lw has joined #ruby
compuser has quit [Ping timeout: 260 seconds]
lw has quit [Max SendQ exceeded]
tlarevo has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
lw has joined #ruby
lw has quit [Max SendQ exceeded]
schaerli has joined #ruby
timgauthier has joined #ruby
multi_io has joined #ruby
lw has joined #ruby
lw has quit [Max SendQ exceeded]
Xeago has joined #ruby
jottr_ has quit [Ping timeout: 272 seconds]
pu22l3r has quit [Ping timeout: 255 seconds]
lw has joined #ruby
Fudus has left #ruby [#ruby]
govg has quit [Ping timeout: 272 seconds]
havenwood has quit [Remote host closed the connection]
troyready has joined #ruby
Alayde has joined #ruby
sevenseacat has quit [Remote host closed the connection]
stunder has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
multi_io_ has quit [Ping timeout: 245 seconds]
tlarevo has quit [Ping timeout: 260 seconds]
St_Marx has quit [Remote host closed the connection]
centrx has joined #ruby
Channel6 has quit [Quit: Leaving]
St_Marx has joined #ruby
ghostmoth has joined #ruby
joonty has quit [Quit: Leaving]
Deele has quit [Ping timeout: 260 seconds]
<Alayde>
This may be a dumb question, but is there any particular reason someone would want to install the json gem via 'yum install rubygem-json' rather than a 'gem install json'?
goodenough has quit [Remote host closed the connection]
brahmadpk has joined #ruby
jimms has quit []
tlarevo has joined #ruby
govg has joined #ruby
hendricius has joined #ruby
Alina-malina has quit [Read error: Connection reset by peer]
ta has joined #ruby
Dude007 has joined #ruby
Alina-malina has joined #ruby
claymore has quit [Ping timeout: 260 seconds]
<centrx>
Alayde, Looks like it might be intended for use with JRuby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Dude007 has left #ruby [#ruby]
<Alayde>
centrx: Hm..good to know. Though it seems the team that needs this is just using Ruby 1.8, I don't think they're using jruby.
freezey has joined #ruby
fasdfa has joined #ruby
<Alayde>
I think it's more coming down to the fact that the jenkins slaves we're using were poorly architected, and therefor don't make use of RVM or gemsets
<Alayde>
s/therefor/therefore
<headius>
Alayde: folks who are married to using rpm package management for everything prefer to use the rpms
<centrx>
Alayde, Yes, it is needed in Ruby 1.8
_2easy has joined #ruby
<headius>
that's about it though
<Alayde>
headius: Probably hit the nail on the head better than I did
hendricius has quit [Ping timeout: 255 seconds]
<centrx>
Ruby 1.8 is ancient
EMoreth has quit [Quit: (null)]
<Alayde>
Unfortunately so
<Alayde>
Alas we're not quite 'bleeding edge'
skolman has joined #ruby
{xenomorph} is now known as xenomorph
neoxquick has joined #ruby
claymore has joined #ruby
Hightower666 has quit [Ping timeout: 258 seconds]
thagomizer has joined #ruby
roolo has quit [Remote host closed the connection]
_2easy has quit [Client Quit]
enebo has joined #ruby
noop has quit [Ping timeout: 245 seconds]
jimmyhoughjr has joined #ruby
Darryl has joined #ruby
roolo has joined #ruby
stunder has joined #ruby
_2easy has joined #ruby
_2easy has quit [Changing host]
_2easy has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<toretore>
i can imagine supporting ?c introduces some complexity to the interpreter
brandonshowers has joined #ruby
pu22l3r_ has joined #ruby
<eam>
>> :?a
<eval-in_>
eam => /tmp/execpad-0b97928972b1/source-0b97928972b1:2: syntax error, unexpected tCHAR, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END (https://eval.in/205454)
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skolman_ has joined #ruby
GriffinHeart has joined #ruby
hellangel7 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
GriffinHeart has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
ringaring has quit [Read error: Connection reset by peer]
mr_blue has quit [Ping timeout: 240 seconds]
zwischenzug2 has quit [Quit: Leaving]
weemsledeux has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
qwyeth has joined #ruby
skolman_ has quit [Ping timeout: 260 seconds]
jrafanie has joined #ruby
startupality has quit [Quit: startupality]
GriffinHeart has joined #ruby
{xenomorph} is now known as xenomorph
jrafanie has left #ruby [#ruby]
Synthead has quit [Remote host closed the connection]
paulfm has joined #ruby
mikecmpbll has joined #ruby
jottr_ has joined #ruby
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
ad_boot has quit [Remote host closed the connection]
revoohc has quit [Quit: revoohc]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
sarandosklikizos has joined #ruby
sarandosklikizos is now known as sklik
qba73 has quit [Ping timeout: 245 seconds]
sklik has quit [Client Quit]
sklik has joined #ruby
fschuindt has joined #ruby
User458764 has quit [Ping timeout: 258 seconds]
klmlfl has quit [Ping timeout: 250 seconds]
GriffinHeart has quit [Remote host closed the connection]
<fschuindt>
Guys, what's the better way to analyze a big string and count the occurences number of determined tags inside it? Like how many times the word 'love' appears in determined text.
<wasamasa>
is there something more general out there than case?
<wasamasa>
asides from writing if-cascades
<wasamasa>
something like cond from lisp
Aaaal has quit [Quit: Aaaal]
alem0lars has quit [Quit: AFK..]
mxrguspxrt has quit [Remote host closed the connection]
tylersmith has quit []
mercwithamouth has quit [Ping timeout: 244 seconds]
danijoo has quit [Read error: Connection reset by peer]
last_staff has quit [Read error: Connection reset by peer]
last_staff has joined #ruby
mxrguspxrt has joined #ruby
danijoo has joined #ruby
havenwood has quit [Remote host closed the connection]
claw_ has quit [Write error: Connection reset by peer]
claw_ has joined #ruby
<fschuindt>
the problem is that either this: "I love you and you love me." (must return 2) and also this: "Iloveyouandyouloveme." (must also return 2) :(
klaut has quit [Ping timeout: 255 seconds]
lolmaus has quit [Quit: Konversation terminated!]
klmlfl has joined #ruby
claw_ has quit [Read error: No route to host]
claw_ has joined #ruby
marlonandrade has quit [Ping timeout: 240 seconds]
Scotteh has joined #ruby
<fschuindt>
That seems to work...
<fschuindt>
>> ("I love you and you love me.").scan(/love/).count
<apeiros>
the scan variant was supposed for multiple words in one go
<akkad>
if I have an array of items I want to add to a string say cmd = "gpg --no-default-keyring " and I've got a users array of recipients. users.inject("gpg --no-default-keyring") {|x| << " --recipient #{x}" } ? So if users has "foo@bar.com" it would => gpg --no-default-keyring --recipient foo@bar.com ...
<jgt>
in RSpec, is it possible to disregard the text in an anchor and just match against the href and/or class?
sol_ has left #ruby [#ruby]
<jgt>
like, have_link /*/, "/some-path"
<banister>
jgt idk
<jgt>
I have a link that looks like <a href="/some-path"><i class="fa fa-plus"></i></a>
lmickh has quit [Remote host closed the connection]
skolman has quit [Ping timeout: 255 seconds]
jerius has joined #ruby
<epitron>
banister: THIS GUY IS INSPIRING
<epitron>
I WANT TO TAKE PART IN THE INTERNET OF HUMANS WITH 10X THE LIFE
Synthead has quit [Remote host closed the connection]
<benzrf>
creppy
bthesorceror has joined #ruby
Macaveli has joined #ruby
sevvie has joined #ruby
JoshGlzBrk has joined #ruby
jottr_ has joined #ruby
choke has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
ringaring has joined #ruby
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Kricir has joined #ruby
OffTheRails has joined #ruby
anaeem___ has joined #ruby
anaeem1_ has quit [Ping timeout: 246 seconds]
rkalfane has joined #ruby
Trieste has joined #ruby
<Trieste>
Hi, how do I install executable gems? When I do "gem install bundler" as my normal user, it says I don't have permissions to write under /usr/lib/ruby/gems, etc, and when I run it as superuser, it installs the binary in /root/
aspires has joined #ruby
ringarin has quit [Ping timeout: 258 seconds]
emmesswhy has quit [Quit: Leaving]
jottr_ has quit [Ping timeout: 258 seconds]
roger_rabbit has quit [Quit: WeeChat 0.3.8]
Hightower666 has joined #ruby
<epitron>
banister: is that troll actually you? :)
<Hanmac>
Trieste: seems your system is fucked up, how did you install ruby?
<Trieste>
Hanmac: "pacman -S ruby"
Haiiro has joined #ruby
wallerdev has joined #ruby
<epitron>
Trieste: when you install the ruby package, it actually tells you how to fix that
<epitron>
try reinstalling it -- it should display some instructions when it's finished
musl has quit [Ping timeout: 240 seconds]
<havenwood>
epitron: i like the humanhumanhuman subdomain
dbslone has joined #ruby
<havenwood>
banister: 6
<Trieste>
epitron: I'm afraid it doesn't
<epitron>
havenwood: it is the new language of emoji!!!
<epitron>
humanhumanhuman == :D:D:D
<havenwood>
^ (uhhg, my left shift key is dying :()
iamjarvo has joined #ruby
Kricir has quit [Remote host closed the connection]
alex-i_ is now known as bankair
jimms has joined #ruby
klaut has quit [Remote host closed the connection]
Kricir has joined #ruby
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bankair>
Hey, mates: A small question for you: assuming that I want to use several redis sets for several instances of a worker (on heroku). Does anyone know a way/gem/magic formula to manage this kind of setup ?
<havenwood>
can get rid of first strip if you're gunna map'n'strip
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
deject3d_laptop has joined #ruby
mekhami has joined #ruby
<mekhami>
is this a valid way to comment just the end of a line in ruby? https://gist.github.com/mekhami/8dec0021cdec277358a5 i wanted to comment out the last value because it's not working yet but have it in there for now...
skand has left #ruby [#ruby]
tbrock has quit [Client Quit]
<epitron>
hmm. not sure why this doesn't work properly:
<epitron>
>> "a,b,c, that's all\, folks!,just kidding\, this is all".split(/(?<!\\),/).map(&:strip)
<eam>
ruby's regex engine diverges from perlre in a few places
<epitron>
it's okay perlre is better!
agjacome has joined #ruby
deject3d_ has joined #ruby
deject3d_ has quit [Remote host closed the connection]
deject3d_laptop has quit [Ping timeout: 240 seconds]
TripTastic has left #ruby ["Leaving"]
<monsieurp>
eam: I'm sure it does but I'm not discussing the differences :) just what (?:) is about
<eam>
oh, that's a non-capturing group
<havenwood>
mekhami: just separate it into multiple lines - makes it easier to follow what's going on that the disallowed inline comment
<havenwood>
s/that/than/
<havenwood>
mekhami: commented on your gist
<mekhami>
thanks :)
<monsieurp>
epitron: well.. perl regex engine has been copied over to other languages :) so I prefer looking at perl doc first when it comes to regexes
wallerdev has quit [Quit: wallerdev]
<epitron>
banisterfiend: oh, is yield for the filters?
kaspertidemann has joined #ruby
<monsieurp>
and THEN look for the language's spec for subtleties re eam :)
<omosoj>
besides web dev, what kind of work do ruby devs do?
segmond has quit [Ping timeout: 245 seconds]
jimbach has quit [Remote host closed the connection]
<eam>
because it's not actually defined as pcre, so it differes sometimes and there's no clear path towards convergence
<monsieurp>
epitron: I've read the wikipedia article too
<eam>
it's just another syntax
<epitron>
monsieurp: oic
tier_ has quit [Remote host closed the connection]
<eam>
with weird gotchas like line anchors or multiline behaviors
<epitron>
i didn't realize wikipedia was so bleeding edge :)
MeMoCooL has quit []
tier has joined #ruby
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
weeb1e has joined #ruby
arescorpio has joined #ruby
ghostmoth has joined #ruby
yetanotherdave has quit [Ping timeout: 272 seconds]
marlonandrade has quit [Ping timeout: 245 seconds]
tbrock has quit [Quit: Computer has gone to sleep.]
marlonandrade has joined #ruby
momomomomo has quit [Quit: momomomomo]
yfeldblu_ has joined #ruby
beneggett has joined #ruby
zlude has joined #ruby
geekbri has joined #ruby
rj46 has joined #ruby
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
weeb1e has joined #ruby
dbslone has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noop has quit [Ping timeout: 255 seconds]
ad_boot has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
weeb1e has quit [Client Quit]
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
naftilos76 has joined #ruby
<rj46>
hi what could cause that `bash: ./scripts/install: /usr/bin/env: bad interpreter: No permission` ?
<rj46>
I try to install rvm
agent_white has joined #ruby
<rj46>
i'd like to avoid root permissions
<eam>
rj46: is scripts/install executable?
<rj46>
eam: its all from `\curl -sSL https://get.rvm.io | bash -s stable`
altamic has quit [Quit: altamic]
<epitron>
rj46: do you not have permission to /usr/bin/env?
crazydiamond has joined #ruby
<rj46>
epitron: actually I have
<agent_white>
Afternoon!
<epitron>
rj46: what does the first line of scripts/install say?
<epitron>
hello special agent white
<havenwood>
#!/usr/bin/env bash
<havenwood>
agent_white: helloooo
<epitron>
no permission to bash? o_O
<agent_white>
havenwood: \o
<eam>
hopefully bash isn't installed
<havenwood>
rj46: are you bashless?
<naftilos76>
hi, i am trying to use net-ssh on my remote server where i can see that the net-ssh gem is installed but when i do require 'net/ssh' i get an error that the file cannot be found. I installed the gem in my laptop and it worked fine. Can anybody make a guess?
<rj46>
havenwood: there is permission
<rj46>
and i have bash
<rj46>
which bash => /bin/bash
<epitron>
rj46: what happens when you type "env bash"
<rj46>
havenwood: GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)
<epitron>
ok, no problem there
<sterns>
Hello, I'm having difficulty with arrays and hashes. I would like to pass an array of hashes from my model to controller. My array is myarray and the hash is myhash, when I do myarray << myhash it seems to overwrite the array or something. Is there a better solution?
chipotle has joined #ruby
<epitron>
o_O
<rj46>
guys its really weird, at the beginning i thought it was some little permission issue
<sterns>
epitron: the array is getting passed. my array is a list of jobs. I would like each job to be a hash like {:jobtitle => "blah", :description=>"blah"} after doing myarray << myhash, myarray[x][:jobtitle] is the same for all values of x
druznek has quit [Ping timeout: 245 seconds]
ht__th has quit [Read error: Connection reset by peer]
<epitron>
ah
<epitron>
it sounds like you're reusing your hash
<epitron>
you have to make a new hash for every job
<havenwood>
epitron: aye shockable
<sterns>
myhash.clear won't work (that's what I'm doing)
<audy>
epitron magic variable
<epitron>
havenwood: and his IP address is unmasked ^_^
<audy>
epitron I want to see which byte CSV is on from CSV.fromeach
<audy>
*foreach
User458764 has joined #ruby
thagomizer has quit [Quit: Leaving.]
<audy>
so I can add a progress bar :D
<epitron>
sterns: that's not copying a hash, no :)
<naftilos76>
Hi, i am trying to use gem net-ssh on my remote server but even though the gem is installed i get a "LoadError: no such file to load -- net/ssh" error when i do "require 'net/ssh' ". However it works fine on my laptop. Can anybody help?
klaut has quit [Read error: Connection reset by peer]
<naftilos76>
and i did
chrishough has joined #ruby
<naftilos76>
at the moment i have to stay with 1.8.7
<jhass>
naftilos76: okay, let's verify where ever you run the require, you have the same environment, there do p $LOAD_PATH and p RUBY_DESCRIPTION and show me the output
monkeypatch has quit [Client Quit]
Panicky has quit [Remote host closed the connection]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
naftilos76: just be aware that the next security issue discovered in it likely won't get patched. But I guess you don't care anyway since that patchlevel has known security issues
<naftilos76>
jhass: sorry man, i am really following you. Write exactly what in the terminal?
pu22l3r has joined #ruby
<naftilos76>
$LOAD_PATH seems to be empty
<naftilos76>
i did echo $LOAD_PATH and no output was produced
abuzze has joined #ruby
<shevy>
man
jko_ has quit [Ping timeout: 246 seconds]
<jhass>
naftilos76: mmh, right, 1.8.7 times... did you require 'rubygems' ?
<shevy>
echo sounds like a shell command
klaut_ has quit [Read error: No route to host]
monkeypatch has joined #ruby
<shevy>
but $LOAD_PATH is a ruby variable
<naftilos76>
let me do it from the start
<jhass>
naftilos76: and I was talking about the place where you run require 'net/ssh' and it fails
klaut has joined #ruby
<naftilos76>
i do that in irb
x77686d has joined #ruby
startupality has quit [Quit: startupality]
monkeypatch has quit [Client Quit]
<naftilos76>
ok i did => p $LOAD_PATH in irb and i got: ["/usr/lib/ruby/site_ruby/1.8", "/usr/lib/ruby/site_ruby/1.8/x86_64-linux", "/usr/lib/ruby/site_ruby", "/usr/lib/ruby/vendor_ruby/1.8", "/usr/lib/ruby/vendor_ruby/1.8/x86_64-linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.8", "/usr/lib/ruby/1.8/x86_64-linux", "."]
pu22l3r_ has quit [Ping timeout: 260 seconds]
ptrrr has quit [Quit: ptrrr]
aspires has quit []
skolman__ has joined #ruby
<naftilos76>
also p RUBY_DESCRIPTION gave me => "ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]"
monkeypatch has joined #ruby
monkeypatch has quit [Max SendQ exceeded]
<jhass>
as said, make sure to require 'rubygems' first
<naftilos76>
jhass: ok
<ericwood>
that hasn't been necessary since 1.8 iirc
<jhass>
your local computer probably has a sane ruby version where it happens automatically
beef-wellington has quit [Ping timeout: 244 seconds]
monkeypatch has joined #ruby
Panicky has joined #ruby
abuzze has quit [Ping timeout: 255 seconds]
anaeem___ has quit [Remote host closed the connection]
<jhass>
ericwood: in 1.8 it's necessary, 1.9 made it implicit
thagomizer has quit [Quit: Leaving.]
hmsimha has joined #ruby
<naftilos76>
after doing require'rubygems' i got p $LOAD_PATH => ["/usr/lib/ruby/site_ruby/1.8", "/usr/lib/ruby/site_ruby/1.8/x86_64-linux", "/usr/lib/ruby/site_ruby", "/usr/lib/ruby/vendor_ruby/1.8", "/usr/lib/ruby/vendor_ruby/1.8/x86_64-linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.8", "/usr/lib/ruby/1.8/x86_64-linux", "."]
<jhass>
naftilos76: does require 'net/ssh' work now though?
aspires has joined #ruby
anaeem1_ has joined #ruby
timonv_ has joined #ruby
skolman_ has quit [Ping timeout: 255 seconds]
startupality has joined #ruby
<naftilos76>
jus did it : LoadError: no such file to load -- net/ssh
blackmesa has joined #ruby
<jhass>
awesome, I call historic stuff I have no idea about
thagomizer has joined #ruby
_2easy has quit [Remote host closed the connection]
<jhass>
I guess it fails to pick up the gem_home from your gemrc for some reason
soxet has joined #ruby
djbkd has joined #ruby
<naftilos76>
but it does for gem 'rubygems' right?
ndrei has joined #ruby
Guest14066 has joined #ruby
<naftilos76>
or whatever require 'rubygems' means
Deejay_ has quit [Quit: Computer has gone to sleep.]
anaeem1_ has quit [Ping timeout: 240 seconds]
<jhass>
`gem 'rubygems'`? never saw that before, where did you pick that up?
<jhass>
require 'rubygems' means `require 'rubygems'`
govg has quit [Ping timeout: 240 seconds]
Aaaal has joined #ruby
<naftilos76>
sorry i meant the => require 'rubygems'
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JeffBonds has joined #ruby
<naftilos76>
not any gem called 'rubygems'
Ulrike_Rayne has joined #ruby
brahmadpk has joined #ruby
<jhass>
rubygems is rubys package manager, require 'rubygems' loads it
wjimenez_ has quit [Read error: Connection reset by peer]
<naftilos76>
thanks man, i am still learning :-)
<jhass>
I guess you're inside some kind of silly webhost?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wjimenez5271 has joined #ruby
<naftilos76>
well it is A2Hosting
<jhass>
go complain to them that it doesn't work
<naftilos76>
yea i will do that
<jhass>
you're not doing anything wrong
<naftilos76>
probably the best thing to do
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
gem install net-ssh; ruby -r'net/ssh'; should just work in any proper setup these days
Notte has quit [Remote host closed the connection]
<naftilos76>
thought it was me but it's got to be them...
spyderman4g63 has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
iamjarvo has joined #ruby
akitada__ has joined #ruby
mary5030 has joined #ruby
jrunning has joined #ruby
renderful has quit [Remote host closed the connection]
kevinfagan has joined #ruby
x77686d has joined #ruby
Kabaka has joined #ruby
Guest70443 has quit [Ping timeout: 272 seconds]
sbar_ has quit [Ping timeout: 258 seconds]
skolman__ has quit [Remote host closed the connection]
goodenough has joined #ruby
ggherdov has joined #ruby
skolman_ has joined #ruby
jottr_ has joined #ruby
agent_white has quit [Quit: bbl]
mikecmpbll has quit [Quit: i've nodded off.]
emocakes has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
Eiam has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
weemsledeux has quit [Changing host]
weemsledeux has joined #ruby
Morkel has quit [Quit: Morkel]
renderful has joined #ruby
northfurr has joined #ruby
rikai has joined #ruby
elaptics`away is now known as elaptics
mikecmpbll has joined #ruby
RaCx has joined #ruby
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
peteyg has joined #ruby
peteyg has left #ruby [#ruby]
Alina-malina has joined #ruby
lolmaus has quit [Remote host closed the connection]
monkeypatch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
garbanotas has joined #ruby
lolmaus has joined #ruby
jdj_dk has quit [Ping timeout: 260 seconds]
NoNMaDDeN has joined #ruby
skolman__ has joined #ruby
skolman_ has quit [Read error: Connection reset by peer]
zorak8 has joined #ruby
msmith_ has joined #ruby
skolman_ has joined #ruby
skolman__ has quit [Read error: Connection reset by peer]
skolm____ has joined #ruby
Soda has quit [Remote host closed the connection]
neonixcoder has joined #ruby
naftilos76 has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
lolmaus has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
monkeypatch has joined #ruby
zorak8 has quit [Ping timeout: 245 seconds]
skolman_ has quit [Ping timeout: 244 seconds]
cina has joined #ruby
wethu has joined #ruby
GPH|work has quit [Ping timeout: 260 seconds]
jobewan has quit [Quit: Leaving]
skolm____ has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
klmlfl has joined #ruby
fabrice31 has joined #ruby
skolman_ has joined #ruby
xymbol_ has joined #ruby
xymbol has quit [Ping timeout: 240 seconds]
monkeypatch has quit [Client Quit]
c107 has joined #ruby
jleishman has joined #ruby
monkeypatch has joined #ruby
coderdad_ has quit [Remote host closed the connection]
skolman_ has quit [Ping timeout: 244 seconds]
monkeypatch has quit [Client Quit]
cina has quit [Quit: leaving]
fabrice31 has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
pork_clips has joined #ruby
ursooperduper has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pork_clips is now known as _cake
mxrguspxrt has quit [Remote host closed the connection]
skolman has joined #ruby
mxrguspxrt has joined #ruby
monkeypatch has joined #ruby
TeresaP has joined #ruby
zorak8 has joined #ruby
freerobby has quit [Quit: Leaving.]
<TeresaP>
Hey all, I'm trying to do system("export DYLD_LIBRARY_PATH=\"$DYLD_LIBRARY_PATH:#{/Users/TeresaP/libsfolder}\"") via my Ruby code and I don't think that variable is getting set. Am I setting it wrong?
<TeresaP>
The real code is this: system("export DYLD_LIBRARY_PATH=\"$DYLD_LIBRARY_PATH:#{LIBIMOBILEDEVICE_FOLDER_PATH}\"")
<TeresaP>
I realize the first line has a syntax issue with the path, but the real line is hard to read
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
TeresaP: that line will do nothing
<TeresaP>
:-|
emmesswhy has quit [Quit: This computer has gone to sleep]
<eam>
it will create a sub-shell, set the env var in that subshell, then the subshell will exit
<centrx>
So what you're saying is, it does something
<TeresaP>
OH right!
<eam>
you would have to do something like: system "export XXXX; exec mycmd"
<TeresaP>
yes thank you, I knew I was missing something obvious
jonr22 has joined #ruby
<TeresaP>
:)
<eam>
centrx: zero work
klaut has quit [Remote host closed the connection]
freerobby has joined #ruby
<centrx>
if you insist
<eam>
TeresaP: I'd recommend doing something like this btw: