<Aeyrix>
every time I go past it looks like even the vandalisers have tapped out
shuber_ has quit [Ping timeout: 255 seconds]
<Radar>
It's inner city. It's safe.
<Aeyrix>
Rad.
<sevenseacat>
its not like its Footscray or anything.
<Aeyrix>
S'alright, my fedora will protect me either way.
<Aeyrix>
Oh wow shots fired.
* Aeyrix
lives out that way.
<sevenseacat>
I grew up in Footscray. I'm allowed.
scripore has joined #ruby
<Aeyrix>
It's not a horrible area. Just a lot of VU students.
Brozo has quit [Quit: Leaving...]
jstanton has quit [Ping timeout: 256 seconds]
rubie has joined #ruby
arescorpio has joined #ruby
DerisiveLogic has joined #ruby
DerisiveLogic has quit [Remote host closed the connection]
DerisiveLogic has joined #ruby
dorei has quit []
<Aeyrix>
Radar: do i have to bring some minerals as a sacrifice or what?
<Aeyrix>
s/sacrifice/offering
nettoweb has quit [Excess Flood]
<Radar>
Aeyrix: Bring your body.
<Aeyrix>
;-;
<Aeyrix>
You'll probably recognise me immediately like
<Aeyrix>
"That's that guy who does nothing but shittalk in #ruby."
Brozo has joined #ruby
<sevenseacat>
that pommy bastard eh
<Aeyrix>
I tend to hide my accent around people I don't know.
<sevenseacat>
j/k
nettoweb has joined #ruby
<Aeyrix>
Years of being taunted for it at public schools has taught me the art of sounding like I rode a kangaroo to wherever I am and have four cork hats in my swag.
<Radar>
I get told I am much nicer in person than on the internet.
<sevenseacat>
I'm a lot quieter in person.
cirn0 has joined #ruby
ferz_ has quit [Quit: Leaving]
DynamicMetaFlow has joined #ruby
nettoweb has quit [Max SendQ exceeded]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
juanpaucar has joined #ruby
cirn0 has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
darkf has joined #ruby
shuber_ has joined #ruby
<Aeyrix>
I get told I'm not the person I am on the Internet.
<Aeyrix>
Mainly because I can't shitpost verbally.
EasyCo has joined #ruby
tubuliferous has joined #ruby
TheNet has joined #ruby
juanpaucar has quit [Ping timeout: 265 seconds]
tyfighter has joined #ruby
nettoweb has quit [Client Quit]
DevastatingDave has quit [Ping timeout: 265 seconds]
umgrosscol has joined #ruby
sinequanon has quit [Remote host closed the connection]
umgrosscol has quit [Read error: Connection reset by peer]
tubuliferous has quit [Ping timeout: 244 seconds]
<baweaver>
Aeyrix: I tend to make up a new accent around people I don't know
<Aeyrix>
baweaver: Hmm?
<baweaver>
earlier post
<baweaver>
18:34 Aeyrix: I tend to hide my accent around people I don't know.
<Aeyrix>
Ah.
<Aeyrix>
Different accent for different people?
<Aeyrix>
like some people think you're from SF, some from TX?
<EllisTAA>
so i can just find that on github right?
<MrBeardy>
most have a link to their official source code, but as long as you install the gem with "gem install <name>", you'll have access to the distributed source in your gem folder
oo_ has joined #ruby
<EllisTAA>
cool how do i access the gem folder? via text editor? or do i have to find the folder on my comp?
oo__ has quit [Ping timeout: 272 seconds]
<MrBeardy>
you can find information by running "gem environment" in the command line
<MrBeardy>
it'll list where gems are installed under the "GEM PATHS" heading
<EllisTAA>
ty
<sevenseacat>
you can also use `gem open gemname` which will open the gem in your default $EDITOR
<MrBeardy>
that's pretty cool, I don't get that luxury using a VM though :(
<EllisTAA>
wooooo
<EllisTAA>
when u go in to read the sourccode, what is your approach? do u always read the readme first? what’s the important stuff?
umgrosscol has joined #ruby
shuber_ has quit [Remote host closed the connection]
umgrosscol has quit [Read error: Connection reset by peer]
<Coraline>
I generally look over the classes first to get a sense of how it's organized, then I trace the workflows.
_blizzy_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
bb010g has joined #ruby
charliesome has quit [Quit: zzz]
oo_ has quit [Remote host closed the connection]
<pipework>
sevenseacat: hi
<sevenseacat>
pipework: happy monday! \o/
<pipework>
sevenseacat: it's Sunday!
<sevenseacat>
pipework: stop living in the past, man!
<pipework>
sevenseacat: Happy Memorial day though
tjbiddle has joined #ruby
<pipework>
sevenseacat: Stop it with the spoilers, you future-person
<sevenseacat>
pipework: what does Memorial Day commemmorate?
<EllisTAA>
coraline: ty i will write that down
ddarkpassenger has joined #ruby
<EllisTAA>
so i heard the liskov principle means the base class (i think that means subclass) should be able to use the class’s blueprint w/o the class knowing about the sublcass? can someone help me udnerstand what this means
fabrice31 has joined #ruby
<pipework>
sevenseacat: The dead!
<sevenseacat>
all of them?
_blizzy_ has quit [Ping timeout: 256 seconds]
<pipework>
sevenseacat: Specifically, those who have died in service to the great nation of twinkies.
<sevenseacat>
if I had a twinkie, I would eat it in honour of them.
* sevenseacat
knows a twinkie is some sort of sugary junk food
<EllisTAA>
coraline: what does it mean to trace the workflows?
iwishiwerearobot has joined #ruby
<pipework>
sevenseacat: If you had a twinkie, you'd probably make more money. har har har. :(
<sevenseacat>
oh snap
<sevenseacat>
i shouldn't be laughing at that but I am -_-
robbyoconnor has quit [Read error: Connection reset by peer]
oo_ has joined #ruby
<pipework>
I laugh to stop myself from crying.
<pipework>
Until I cry from laughing too hard, and then I just feel silly.
wildroman2 has joined #ruby
robbyoconnor has joined #ruby
fabrice31 has quit [Ping timeout: 258 seconds]
fedexo has quit [Ping timeout: 265 seconds]
DynamicMetaFlow has quit [Ping timeout: 244 seconds]
dseitz has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
iwishiwerearobot has quit [Ping timeout: 252 seconds]
<Coraline>
EllisTAA: like see how the gem is invoked and follow the commands through
<MrBeardy>
try adding /usr/local/bin to your path: export PATH=$PATH:/usr/local/bin
<EllisTAA>
so i found pry in my gems folder … it looks like a i have 2 folders …. called 2.0.0
<EllisTAA>
is it possible i installed 2.0.0 twice and computer is getting confused?
tyfighter has quit [Ping timeout: 246 seconds]
pdoherty has quit [Quit: Leaving]
tagrudev has joined #ruby
<EllisTAA>
so in my .rbenv folder i have a versions folder that only has one version 2.0.0-p481, does that refer to ruby or a version of rbenv?
<sevenseacat>
ruby.
<EllisTAA>
so when i click on that version folder, then on lib, then on ruby, there is a folder clled 2.0.0, then a folder called gems which contains a folder called 2.0.0 …. pry is in the second 2.0.0 folder but not the first …
zreisman has quit [Read error: Connection reset by peer]
tubuliferous has joined #ruby
<MrBeardy>
the first is just for ruby source, the second is for gems
<MrBeardy>
well, the second inside the gems/ folder, that is
<EllisTAA>
ok i think i need to change my gem path … i think that’s what u were saying. how do i do that?
chinmay_dd has joined #ruby
<MrBeardy>
you shouldn't need to change your gem path, everything seems fine
<EllisTAA>
then what’s wrong
<MrBeardy>
EllisTAA: cd into /usr/local/bin and see if you see a pry executable, then echo $PATH and make sure /usr/local/bin is in your path
tyfighter has joined #ruby
juanpaucar has joined #ruby
ravenreborn has joined #ruby
<EllisTAA>
i did that and this is what i got /usr/local/bin:/usr/local/sbin:~/bin:/Users/Ellis/.rbenv/bin:/Users/Ellis/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/opt/ImageMagick/bin
<shevy>
on #nim they begin to remind me of #haskell
juanpaucar has quit [Ping timeout: 264 seconds]
<shevy>
so perhaps that's one thing that ruby lacks here - the complex metadiscussions
jbomo has left #ruby [#ruby]
irobevjodu has joined #ruby
<EllisTAA>
why isn’t pry in my usr/local/bin folder?
<MrBeardy>
I was just assuming it should have been in there since that's where mine was, but for you it may be in /Users/Ellis/.rbenv/bin, since you're using rbenv
tubuliferous_ has quit [Ping timeout: 246 seconds]
kp666 has joined #ruby
cirn0 has joined #ruby
<EllisTAA>
mrbeardy: i don’t have a .rbenv/bin folder, my .rbenv folder only has a shims and versions folder
sandelius has joined #ruby
<MrBeardy>
just out of interest, can you try running rbenv exec pry and see if that works
<EllisTAA>
oh but in versions > 2.0.0 > bin there is a pry executable
<EllisTAA>
k ill run it
sandelius has quit [Client Quit]
<EllisTAA>
didn’t work, it looks like it is looking for the gem in a folder that doesn’t really contain anything
bruno- has joined #ruby
sandelius has joined #ruby
mjuszczak has joined #ruby
cirn0 has quit [Ping timeout: 265 seconds]
cirn0 has joined #ruby
bruno- has quit [Ping timeout: 252 seconds]
x44x45x41x4E has joined #ruby
Ropeney has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
aganov has joined #ruby
jenrzzz has quit [Quit: Lost terminal]
hsps_ has joined #ruby
jenrzzz has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
rubie has quit [Remote host closed the connection]
JohnBat26 has quit [Ping timeout: 246 seconds]
shuber_ has quit [Remote host closed the connection]
shuber_ has joined #ruby
ICantCook has joined #ruby
casadei has quit [Remote host closed the connection]
zotherstupidguy has joined #ruby
zotherstupidguy1 has joined #ruby
neanderslob has quit [Remote host closed the connection]
sent1nel has joined #ruby
carneiro has quit [Quit: carneiro]
Limix has quit [Ping timeout: 255 seconds]
zotherstupidguy1 has quit [Client Quit]
krz has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Client Quit]
krz has joined #ruby
zotherstupidguy has joined #ruby
al2o3-cr is now known as gr33n7007h_pp
werelivinginthef has quit []
kp666 has joined #ruby
gr33n7007h_pp is now known as al2o3-cr
ramfjord has joined #ruby
sent1nel has quit [Ping timeout: 255 seconds]
arietis has joined #ruby
Deele has quit [Quit: User excited]
CaptainCibai has quit [Ping timeout: 258 seconds]
Limix has joined #ruby
selu has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
ixti has quit [Ping timeout: 256 seconds]
GriffinHeart has joined #ruby
cirn0 has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 244 seconds]
arietis has quit [Quit: Leaving.]
ravenreborn has quit [Ping timeout: 246 seconds]
ahmetkapikiran has joined #ruby
zotherstupidguy has joined #ruby
djbkd has quit [Remote host closed the connection]
fabrice31 has joined #ruby
Neomex has joined #ruby
bruno- has joined #ruby
iwishiwerearobot has joined #ruby
dopie has joined #ruby
Neomex has quit [Read error: Connection reset by peer]
asmodlol has joined #ruby
djbkd has joined #ruby
Musashi007 has joined #ruby
zotherstupidguy has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 256 seconds]
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
iwishiwerearobot has quit [Ping timeout: 256 seconds]
bruno- has quit [Ping timeout: 256 seconds]
<al2o3-cr>
!google ruby
bigmac has joined #ruby
<al2o3-cr>
oops wrong buffer
<Aeyrix>
ebonics: oh lol
<Aeyrix>
i knew i recognised your name
unshadow has quit [Quit: leaving]
<ebonics>
haha
scripore has quit [Quit: This computer has gone to sleep]
HotCoder has quit [Ping timeout: 272 seconds]
oo_ has quit [Ping timeout: 258 seconds]
kp666 has quit [Ping timeout: 258 seconds]
oo_ has joined #ruby
haxrbyte_ has joined #ruby
djbkd has quit []
Bosnia is now known as bosma
haxrbyte has quit [Ping timeout: 244 seconds]
Kricir has joined #ruby
craigp has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
haxrbyte_ has quit [Quit: Leaving...]
baweaver has quit [Remote host closed the connection]
cina has joined #ruby
kaspernj has joined #ruby
arup_r has joined #ruby
longfeet has quit [Ping timeout: 272 seconds]
<cina>
question regarding compression -- I have been compressing a file stream using Zlib::GzipWriter, but Windows XP doesn't recognize GZIP, is there an alternative compression method (e.g. ZIP) in with good Ruby support that hopefully Windows XP understands?
kp666 has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
pengin has joined #ruby
jmhmccr has quit [Quit: Connection closed for inactivity]
ahmetkapikiran has joined #ruby
arup_r has quit [Ping timeout: 258 seconds]
<xxneolithicxx>
hmm so i figured out for my above issue is that my monkey patch for Gem::Specification is wrong, since if i remove it completely I can then build the gem
haxrbyte has quit [Ping timeout: 272 seconds]
<xxneolithicxx>
any ideas what the correct way to monkey patch that class would be?
<ebonics>
arup_r, but if you're making your rails app block you know that it will take a long time for people to get a response
arup_r_ has quit [Ping timeout: 252 seconds]
tubuliferous has quit [Read error: Connection reset by peer]
chinmay_dd has quit [Remote host closed the connection]
<arup_r>
ebonics: each user request is composed of multiple tasks(fetch from FTP, unzip, import to db, export from db as a csv using a business logic query, and then email, clean tables) .. so when N requests will come,, I want N req to queue.. and service them one by one.
<arup_r>
suckerpuch is dong it async way... with multiple threads
<ebonics>
arup_r, then you need a queue
<adaedra>
queuing HTTP requests?
<ebonics>
arup_r, consider beanstalkd
<ebonics>
no
<adaedra>
you'll hit timeout
<ebonics>
you queue it on beanstalk for example
colorisco has quit [Quit: colorisco]
mercerist has quit [Quit: Leaving...]
<ebonics>
arup_r, or you can use a db queue.. but that's suboptimal
<ebonics>
beanstalk is your best choice imo
<arup_r>
ebonics: I have a class Userrquest which will wrap all other tasks as I said inside the object.. and submit the UserRequest objects.......
<arup_r>
let me see beanstalk..
<ebonics>
arup_r, so serialize it, store it in redis and then when you're ready to process it pop it out
sina has quit [Quit: leaving]
Beoran_ has joined #ruby
<arup_r>
ebonics: didn't get you what to serialize
<ebonics>
arup_r, ?
arup_r_ has joined #ruby
<arup_r_>
Am I visible ?
<arup_r_>
I hv network issue here
<ebonics>
yes
attlasbot has joined #ruby
<arup_r_>
ok
<arup_r_>
so serialize it ... what to serialize ?
<arup_r_>
I didn't get ths
<ebonics>
arup_r_, you said you had a UserRequest object?
arup_r has quit [Ping timeout: 256 seconds]
<arup_r_>
Ok
<arup_r_>
Yes
<arup_r_>
That object will wrap other tasks objects........ which I had mentioned..
<arup_r_>
so serializing how it helps.
<ebonics>
it's better to decouple all your tasks instead of wrap them
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ebonics>
you can have multiple queues for all different tasks
<arup_r_>
Just asking..
krz has joined #ruby
<arup_r_>
but.. tasks for each object oN has to be performed synchronously..... like T1..Tn order..
<ebonics>
ok then keep them wrapped
<arup_r_>
When O1 is processing.. then no the other Oi should start....
<arup_r_>
because resources can't be shared as per current situation
<arup_r_>
ok
<arup_r_>
let me think it.
waxjar is now known as Lingo
terlar has quit [Quit: WeeChat 1.2]
fabrice31 has joined #ruby
ravenreborn has quit [Ping timeout: 252 seconds]
iwishiwerearobot has joined #ruby
<arup_r_>
ebonics: Why it is good over a normal Ruby stdlib Queue ? Asking for knowledge.
<arup_r_>
I meant beanstalk
<ebonics>
arup_r_, because if you use ruby then you need to put more strain on your http server
<ebonics>
you just push it to the queue and then finish the http request
<ebonics>
and process it on the backend
<arup_r_>
ok.. beanstalk does serial processing.. right ..?
<ebonics>
serial processing?
<arup_r_>
synchronous I meant
fabrice31 has quit [Ping timeout: 256 seconds]
<ebonics>
it has many options
<arup_r_>
No 2 jons will interfare each other..
<arup_r_>
one job at a time ?
<ebonics>
you can make it a pull queue
cirn0 has joined #ruby
<ebonics>
you will have a separate application for processing out of beanstalk
<ebonics>
so your http server will push it to beanstalk
<arup_r_>
No.. for now synchronous processing is enough.
<ebonics>
?
iwishiwerearobot has quit [Ping timeout: 276 seconds]
<ebonics>
your http server will push the task to beanstalk, then your other app will pull it from beanstalk and process them one at a time
<arup_r_>
got you
kp666 has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
<arup_r_>
from controller action I need to submit UserRequest object to Redis.. like you said userrequest -> serialize -> redis.put(jobid, reqobj) -> beanstalk.put(jobid)
<ebonics>
yep
<ebonics>
thats all your http will do
<arup_r_>
last question... may I ?
<ebonics>
ok
<arup_r_>
Why redis? not directly submitting to beanstalk
<arup_r_>
?
shuber_ has quit [Remote host closed the connection]
<ebonics>
you can do that if you want, but beanstalk is not meant to store data
<arup_r_>
ok...
<ebonics>
like i would encode my userrequest into json, put it into redis
<ebonics>
then on the worker beanstalk will pass me the job id, redis.get(jobid), and you will get your json
<ebonics>
instead of having to process the beanstalk response and parse it
<ebonics>
if your server is shit then go ahead and put it all in beanstalk
<ebonics>
but for max scalability you want to decouple that
<arup_r_>
so.. ebonics:
Alina-malina has quit [Ping timeout: 272 seconds]
terlar has joined #ruby
irobevjodu has quit [Ping timeout: 245 seconds]
Alina-malina has joined #ruby
<arup_r_>
using a loop { } I will get data from Redis and inser those into beanstalk.. right?
<ebonics>
no
<arup_r_>
then ?
<ebonics>
-_-
<ebonics>
beanstalk holds only your job id
<ebonics>
redis holds your userrequest, and use the jobid as the key
<ebonics>
so you say hey beanstalk give me another job to do
<ebonics>
and its like ok, do this job..
<ebonics>
so then you say hey redis i need the data for this job, bro
Rollabunna has quit [Quit: Leaving...]
<ebonics>
then you do whatever you want
<arup_r_>
hehe.. cool.. still confused.. :/ wait a minute.. let me have a cup of tea
<ebonics>
probably i would not use any loops
<ebonics>
i would have only 2 cases where i need to ask for a new job from beanstalk
<ebonics>
a) on a new http request and b) after i finished a job
<ebonics>
in the case that there is currently no jobs, you could just send the job info directly to your worker
<arup_r_>
I am confused Redis knows jobids.. how redis will ask to give job id from beanstalk
<ebonics>
.
<ebonics>
do you know what a map is
<arup_r_>
ebonics: can you give some sample code.. If I see code.. I will understand the communications..
decoponio has joined #ruby
<arup_r_>
yes, Array#map
cibs has quit [Ping timeout: 272 seconds]
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r_>
ebonics: thanks ..let me see.. Internet is too slow here
attlasbot has quit [Quit: Leaving]
<arup_r_>
ebonics: thanks.. got the idea
<ebonics>
arup_r_, np gl
cirn0 has quit [Remote host closed the connection]
<arup_r_>
Now,, need to check if ActiveJob allows mutile backgrouns backend settings.. I already used suckerpunch ...
<arup_r_>
multiple**
<ebonics>
arup_r_, this looks exactly like what you need
<arup_r_>
yes..
<arup_r_>
it is
<arup_r_>
Need to integrate with ActiveJob is Rails..
<arup_r_>
looking for the port.. reading the guide
<ebonics>
i dont use rails sry
<arup_r_>
np
<arup_r_>
thanks for the ideas although
<ebonics>
i use that pattern i gave you for every service basically
chinmay_dd has quit []
<ebonics>
except ive never had a case where it needs to be processed in order, except for with games
<ebonics>
usually i just get lazy and user iron.io for my queue
<arup_r_>
ok
c0m0 has joined #ruby
Tux_007__ has quit [Quit: Connection closed for inactivity]
<arup_r_>
ebonics: thanks.. again.. heading for lunch..
arup_r_ has quit []
Dakuan has quit [Remote host closed the connection]
juanpaucar has joined #ruby
Dakuan has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
despai has joined #ruby
lidenskap has joined #ruby
lkba has joined #ruby
tubuliferous has joined #ruby
jack_rabbit has quit [Ping timeout: 244 seconds]
GriffinHeart has quit [Remote host closed the connection]
juanpaucar has quit [Ping timeout: 272 seconds]
Spami has joined #ruby
mtakkman has joined #ruby
tubuliferous has quit [Ping timeout: 276 seconds]
quimrstorres has joined #ruby
ki0 has joined #ruby
cibs has joined #ruby
ebonics has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
platzhirsch has joined #ruby
<daxroc>
Anyone know a library for creating ISO images win/linux ?
hectortrope has joined #ruby
hectortrope has quit [Client Quit]
gauke has joined #ruby
khebbie has joined #ruby
hectortrope has joined #ruby
Alina-malina has quit [Ping timeout: 256 seconds]
Alina-malina has joined #ruby
bronson has quit [Remote host closed the connection]
shuber_ has joined #ruby
rippa has joined #ruby
zotherstupidguy has quit [Ping timeout: 256 seconds]
zly has joined #ruby
zly has quit [Changing host]
shuber_ has quit [Ping timeout: 265 seconds]
iamninja has quit [Read error: Connection reset by peer]
lidenskap has quit [Remote host closed the connection]
lidenskap has joined #ruby
Sarchasm has joined #ruby
exadeci has joined #ruby
lidenskap has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
iamninja has joined #ruby
doublemalt_ has quit [Ping timeout: 276 seconds]
lidenska_ has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
Spami has quit [Quit: This computer has gone to sleep]
lidenskap has quit [Ping timeout: 272 seconds]
mengu has quit [Remote host closed the connection]
doublemalt_ has joined #ruby
marr has joined #ruby
bruno- has joined #ruby
lidenskap has joined #ruby
lordkryss has joined #ruby
einarj has quit [Remote host closed the connection]
einarj has joined #ruby
charliesome has joined #ruby
lidenska_ has quit [Ping timeout: 250 seconds]
lidenskap has quit [Ping timeout: 264 seconds]
mtakkman has quit [Ping timeout: 244 seconds]
bruno- has quit [Ping timeout: 264 seconds]
Sarchasm has quit [Ping timeout: 246 seconds]
Sarchasm has joined #ruby
charliesome has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
serivich has joined #ruby
AlphaAtom has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevenseacat has quit [Quit: Me dun like you no more.]
craigp has quit []
phutchins has quit [Ping timeout: 272 seconds]
fabrice31 has joined #ruby
iwishiwerearobot has joined #ruby
centrx has joined #ruby
sandelius has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
nichtdiebohne has joined #ruby
iwishiwerearobot has quit [Ping timeout: 258 seconds]
Outlastsheep has joined #ruby
<Outlastsheep>
Hi, I have a quick question. I have an array containing multiple objects. And I need to invoke those objects' methods. What would be the syntax for invoking method 'mth' on object 'obj' inside of array 'arr' (With the index of '1' if one wants to be picky)
<MrBeardy>
arr[1].call("mth")?
<adaedra>
you want to invoke for each object or only one object at given index?
<Outlastsheep>
Only one object of a given index.
<adaedra>
arr[1].mth
<Outlastsheep>
Gotcha, thanks.
<adaedra>
Array#[] just return the object on which you can do what you want
startupality has joined #ruby
SouL_|_ has joined #ruby
<Outlastsheep>
Got it, thanks ^^
Rickmasta has joined #ruby
workmad3 has joined #ruby
arup_r has joined #ruby
tenseiten has joined #ruby
seitensei has quit [Ping timeout: 272 seconds]
platzhirsch has quit [Quit: Leaving.]
djellemah has joined #ruby
Leef_ has joined #ruby
bronson has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
shuber_ has joined #ruby
lxsameer has quit [Ping timeout: 272 seconds]
CloCkWeRX has left #ruby [#ruby]
bronson has quit [Ping timeout: 258 seconds]
shuber_ has quit [Ping timeout: 252 seconds]
sevenseacat has joined #ruby
eightyeights has joined #ruby
bogdanteleaga has quit [Remote host closed the connection]
Aswebb_ has joined #ruby
mengu has quit [Remote host closed the connection]
juanpaucar has joined #ruby
lkba_ has joined #ruby
A205B064 has quit [Ping timeout: 272 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
despai has quit [Quit: This computer has gone to sleep]
_JohnBat26_ has quit [Ping timeout: 255 seconds]
ldnunes has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Ping timeout: 245 seconds]
jt__ has joined #ruby
jt__ is now known as Guest35510
edwinvdgraaf has joined #ruby
<Guest35510>
hi
nszceta has quit [Read error: Connection reset by peer]
fella5s has quit [Read error: Connection reset by peer]
xehbit has joined #ruby
dorei has quit [Ping timeout: 244 seconds]
fabrice31 has joined #ruby
roshanavand has joined #ruby
<Guest35510>
could anybody give me a what the operator '<<-' does? I am using in thor for long descriptions "long_desc <<-LONGDESC blablabl LONGDESC". '<<' looks like it is coming from something called singleton classes, but I don't know what the rest does.
gagrio has quit [Ping timeout: 240 seconds]
<Guest35510>
just one or two words to search for would be helpful
bruno- has quit [Quit: Lost terminal]
<jhass>
Guest35510: in this instance it's called heredoc
Dakuan has quit [Remote host closed the connection]
<jhass>
so if you're on Ruby 2+ (and you should), __dir__ should work
ChoiKyuSang_ has joined #ruby
<Lingo>
strange that they decided not to let __FILE__ have the same behaviour, would've been a good opportunity.
fella5s has joined #ruby
scripore has joined #ruby
startupality has quit [Quit: startupality]
<jhass>
I guess __FILE__ is very old and it slipped back then and never got changed for backwards compatibility
<forgot>
im on ruby2.0.0, is there a problem?
<Lingo>
I mean 2.0 would have been a good opportunity for a backwards incompatible fix :)
<forgot>
imho __FILE__ shouldn't do magic
<forgot>
the resolving should be done by bundler generated stub
<Lingo>
then neither should __dir__, but that being introduced later, it seems like the magic is actually preferred
ChoiKyuSang has quit [Ping timeout: 244 seconds]
<jhass>
so you can edit the stub to take out one .. in the expand calls and use __dir__ instead of __FILE__
<jhass>
should be two simple sed's
<forgot>
that should work
<forgot>
im kinda surprised that there isn't an existing solution for isolated script installation
<jhass>
there probably is
<jhass>
one someones github somewhere ;P
<jhass>
*on
ChoiKyuSang_ is now known as ChoiKyuSang
ChoiKyuSang has quit [Changing host]
ChoiKyuSang has joined #ruby
roshanavand has joined #ruby
tris has joined #ruby
arup_r has joined #ruby
gagrio has quit [Ping timeout: 264 seconds]
pengin has joined #ruby
bonhoeffer_ has joined #ruby
workmad3 has joined #ruby
segfalt has quit [Ping timeout: 244 seconds]
segfalt has joined #ruby
sinkensabe has joined #ruby
jusa has joined #ruby
lavros has joined #ruby
vivekananda has joined #ruby
einarj has joined #ruby
Musashi007 has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has joined #ruby
pengin has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
quimrstorres has joined #ruby
Deck` has quit [Ping timeout: 240 seconds]
Deck` has joined #ruby
pwattstbd has joined #ruby
edwinvdgraaf has joined #ruby
ZergCoder has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
bonhoeffer_ has quit [Quit: bonhoeffer_]
quimrstorres has quit [Ping timeout: 256 seconds]
HotCoder has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
kp666 has quit [Quit: Leaving]
jusa has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
quimrstorres has joined #ruby
simpyll has quit [Read error: Connection reset by peer]
nszceta has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simpyll has joined #ruby
bronson has joined #ruby
yqt has joined #ruby
vdamewood has joined #ruby
simpyll has quit [Read error: Connection reset by peer]
tesuji has quit [Read error: Connection reset by peer]
simpyll has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
yh__ has quit [Ping timeout: 265 seconds]
roshanavand has quit [Remote host closed the connection]
shuber_ has joined #ruby
dumdedum has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Quit: Musashi007]
Musashi007 has joined #ruby
shuber_ has quit [Ping timeout: 265 seconds]
krz has joined #ruby
dopie has joined #ruby
gagrio has joined #ruby
fabrice31 has joined #ruby
CustosLimen has quit [Read error: Connection timed out]
iwishiwerearobot has joined #ruby
Musashi007 has quit [Quit: Musashi007]
quimrstorres has quit [Read error: Connection reset by peer]
dumdedum has joined #ruby
CustosLimen has joined #ruby
Akagi201 has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
susmus has quit [Ping timeout: 240 seconds]
Akagi201_ has quit [Ping timeout: 255 seconds]
iwishiwerearobot has quit [Ping timeout: 276 seconds]
startupality has quit [Quit: startupality]
WajidKagzi has joined #ruby
gagrio has quit [Ping timeout: 256 seconds]
quimrstorres has joined #ruby
scripore has joined #ruby
bruno-_ has joined #ruby
_blizzy_ has joined #ruby
Pathfinder has quit [Ping timeout: 258 seconds]
olafurgud has joined #ruby
gambl0re has quit [Ping timeout: 265 seconds]
Goldfish has joined #ruby
michael_mbp has quit [Excess Flood]
Goldfish is now known as Guest54783
bruno- has quit [Ping timeout: 246 seconds]
Guest54783 is now known as Agoldfish
olafurgud has left #ruby [#ruby]
startupality has joined #ruby
pandaant has joined #ruby
simpyll has quit [Ping timeout: 264 seconds]
michael_mbp has joined #ruby
kobain has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
tagrudev has quit [Remote host closed the connection]
dain has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WajidKagzi has quit [Quit: WeeChat 1.1.1]
failshell has joined #ruby
someword has quit [Quit: Leaving.]
mrmargolis has joined #ruby
BTRE has quit [Quit: Leaving]
<failshell>
im reading logs from stdin. one event is split in 4 lines. what would be a good way to read those through $stdin.each and merge the 4 lines together?
startupality has quit [Quit: startupality]
<failshell>
considering i can't change the upstream app sending logs
zz_Outlastsheep is now known as Outlastsheep
Coldblackice has quit [Ping timeout: 258 seconds]
ixti has joined #ruby
<jhass>
$stdin.each_slice(4) perhaps
mrmargolis has quit [Ping timeout: 256 seconds]
Drewch has joined #ruby
Neomex has joined #ruby
<Lingo>
failshell: if these 4-line events are mixed with 1-line events, you could use an Enumerator instance directly. Just take 3 lines at a time when you recognize the 4-line event from it's first line?
<failshell>
jhass: looking into it
<jhass>
or for the mixed case, if you want to go a bit obscure, use a flip-flop
<Lingo>
finally, a use case! haha
<failshell>
didnt know that each_slice method. neat.
SouL_|_ has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
<failshell>
it's almost what i need. sometimes there's 5 lines.
haxrbyte has quit [Read error: Connection reset by peer]
<failshell>
there'
[k- has joined #ruby
<failshell>
s a special place in hell for the people who came up with those logs
haxrbyte has joined #ruby
<Lingo>
maybe you could use #scan / #grep ?
<Lingo>
i can never which belongs to which
<failshell>
i thought about reading stdin and adding that into a buffer. then read the buffer and remove each computed lines from it
<failshell>
which i think i won't have a choice. because every few events, a line with a timestamp is added. which messes each_slice(4)
quimrstorres has quit [Read error: Connection reset by peer]
hsps_ has quit [Ping timeout: 272 seconds]
startupality has joined #ruby
bMalum has quit [Quit: bMalum]
aganov has quit [Remote host closed the connection]
quimrstorres has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
Akuma has joined #ruby
fella5s has quit [Read error: Connection reset by peer]
fella5s has joined #ruby
ZergCoder has quit [Remote host closed the connection]
<Outlastsheep>
Hello again. I'm kinda new to ruby (I've only recently started my very first project with the language) and I wanted to ask if someone would be willing to look over my code and provide feedback.
unshadow has quit [Quit: leaving]
startupality has quit [Client Quit]
ChoiKyuSang_ has joined #ruby
tubuliferous has joined #ruby
<jhass>
failshell: slice_before or slice_after might be what you want then
ChoiKyuSang_ has quit [Client Quit]
<jhass>
less obscure version of what a flip flop would do
<jhass>
albeit slightly less efficient
<Outlastsheep>
I have a pastebin with the code right here: http://pastebin.com/A77WecsY if anyone is willing to look over it and provide general feedback/tips, I'd appreciate it ^^
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<Outlastsheep>
Huh, that is neat.
zotherstupidguy has quit [Quit: WeeChat 1.2]
<jhass>
Outlastsheep: let's start with the superficial style things: Ruby community standard is 2 spaces for indentation, avoid abbreviating identifiers, address, port, user, hostname and so on, write it all out
<jhass>
for example I have no idea what isc would stand for, and you in half a year will neither
ChoiKyuSang has quit [Ping timeout: 272 seconds]
startupality has joined #ruby
<Outlastsheep>
jhass: I've grown used to using TABS for indentation, I'll note it down. I'll also work on spelling out the full variable names.
<Outlastsheep>
Anything else that catches your attention?
tubuliferous has quit [Ping timeout: 240 seconds]
zotherstupidguy has joined #ruby
<jhass>
you don't need self. in all your usecases, it's implicit. You don't need self. to disambiguate assignments, self.foo = bar and foo = bar would be different things
<failshell>
those tabs make your code unreadable
gusto has joined #ruby
<Outlastsheep>
Hmm okay, gotcha.
<jhass>
don't put a space between the method name and the parens, def send(command, flags, message) or def send command, flags, message
<failshell>
jhass: slice_after would be nice if i had a 'static' input. but with $stdin, i doubt that's gonna work well
<jhass>
on a personal note I'm allergic to a , not followed by a space :P
<failshell>
Outlastsheep: might wanna run rubocop against your code too. good linting tool.
<Outlastsheep>
failshell: what's it do exactly?
<jhass>
meh, I hate rubocops defaults
<failshell>
jhass: true but once tuned, its decent
<Outlastsheep>
jhass: but doesn't that boil down to the distinct style someone writes their programs in in the end?
<failshell>
Outlastsheep: if you're not going to publish your code, or no one else will work in it, doesn't matter. otherwise, you better follow the ruby conventions
rkazak has quit [Quit: Sleep.....ing....]
<jhass>
Outlastsheep: if you read a lot of ruby code you'll notice that 95% will follow what I said so far
<Outlastsheep>
failshell: I'm not going to publish it. I was more hoping to hear something about what jhass said about using 'self' too much.
<Outlastsheep>
s/too much/incorrectly
<failshell>
well see, now others are reading it ;p
<jhass>
no, it's not incorrect, it's simply unnecessary
<Outlastsheep>
Apologies if I was unclair by not stating I was looking for feedback on the workings of the program/the overall effectivity of the code.
<jhass>
self.some_method and some_method are the same
<jhass>
>> self.puts "foo"
<ruboto>
jhass # => private method `puts' called for main:Object (NoMethodError) ...check link for more (https://eval.in/369634)
<jhass>
well, almost ;P
shuber_ has joined #ruby
<[k->
Omg the indentation
<jhass>
Outlastsheep: use "string #{interpolation}" over "string "+concatenation
<Outlastsheep>
jhass: if I were to be honest, I prefer programming my bots from scratch myself :P
dfockler has joined #ruby
<Outlastsheep>
But thanks for the tip.
<MrBeardy>
read the code, gain inspiration to do it the right way
phale has left #ruby ["Leaving"]
<jhass>
implementing IRC properly is hard, just saying
<jhass>
parsing MODE is an art in itself
simpyll has joined #ruby
stoffus has quit [Ping timeout: 272 seconds]
<Outlastsheep>
Not really cx At least, in my previous experiences with IRC bots.
<Outlastsheep>
But I don't code for a job or anything yet. At the moment it's really just for fun.
simpyll has quit [Read error: Connection reset by peer]
<adaedra>
For science!
simpyll has joined #ruby
<MrBeardy>
all fun and games until your bot lets people rm -rf /
<jhass>
for starters things like you waiting for the first PING instead of RPL_WELCOME is abusing an implementation detail of a particular server implementation
bMalum has joined #ruby
<Outlastsheep>
jhass: come again?
<jhass>
the signal that you successfully connected is RPL_WELCOME (3something I don't memorized that)
dfockler has quit [Ping timeout: 255 seconds]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
<jhass>
unrealircd does a ping already as part of the authentication dance for example
gagrio has joined #ruby
<Outlastsheep>
I know about the signals (Although I have no idea where I receive those.)
ta has quit [Remote host closed the connection]
ta has joined #ruby
<Outlastsheep>
Also, I need to leave in about 6 mins.
<jhass>
aha, with signal I meant "sign", "indicator"
tesuji has joined #ruby
<jhass>
it's a regular command, there's nothing like signal in IRC terminology
arturaz has quit [Ping timeout: 264 seconds]
<Outlastsheep>
I'm aware of that. My problem is though. I've read RFC 2812, and it states responses like RPL_WELCOME, but I have no idea where to parse them, or where they even come form.
<jhass>
maybe, I'd expect it to be harder though since natural language syntax is a lot more tolerable
That1Guy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zotherstupidguy>
jhass i take that you never saw it done before?
<jhass>
yes, not that that means much
casadei has joined #ruby
SouL_|_ has joined #ruby
coderhs has quit [Ping timeout: 252 seconds]
coderhs has joined #ruby
multiscan has joined #ruby
chinmay__ has joined #ruby
chinmay__ is now known as chinmay_dd
fabrice31 has joined #ruby
havenwood has joined #ruby
iwishiwerearobot has joined #ruby
<shevy>
people use haskell for that!
jstanton has joined #ruby
konsolebox has quit [Ping timeout: 255 seconds]
shuber_ has joined #ruby
coderhs has quit [Ping timeout: 265 seconds]
speakingcode has quit [Ping timeout: 265 seconds]
That1Guy has joined #ruby
fabrice31 has quit [Ping timeout: 252 seconds]
<zotherstupidguy>
shevy for markovchains/
<zotherstupidguy>
?
speakingcode has joined #ruby
iwishiwerearobot has quit [Ping timeout: 246 seconds]
darkf has quit [Quit: Leaving]
<zotherstupidguy>
i heard of a startup that takes your freinds chatting logs and after they die, they make a bot of that as if they are alive and chatting with you, i suppose they are using markovchains for that!
shuber_ has quit [Ping timeout: 250 seconds]
pdoherty has quit [Remote host closed the connection]
<zotherstupidguy>
can markovchains be use to write a thesis?
ixti has joined #ruby
<jhass>
it already was
nfk|laptop has joined #ruby
aryaching_ has joined #ruby
<zotherstupidguy>
jhass link?
<jhass>
uh
Channel6 has joined #ruby
Leef_ has quit [Quit: Leaving]
<zotherstupidguy>
a link for a thesis or uni assigment written via a markovchain bot or in collbration with it
<shevy>
that guy like single-handedly wrote the rdoc-docu for the ruby cgi part
* zotherstupidguy
hails wew
aelovikov has joined #ruby
fedexo has joined #ruby
* tuelz
follows the crowd
<pontiki>
we are all humbled
<shevy>
hehe
<shevy>
pontiki is funny
<pontiki>
i'm being quite serious tho
<shevy>
well some people on the committer list are no longer about :(
einarj has quit [Ping timeout: 245 seconds]
<tuelz>
well it is memorial day and I don't care too much to remember the poor people that died killing other poor people
<shevy>
why the lukky stiff (why), Jim Weirich (jim)
<shevy>
(Notice that the page wrote "lukky stiff" hehe...)
<tuelz>
so why not memorialize ruby peoplez
simpyll has quit [Ping timeout: 265 seconds]
<shevy>
tuelz yeah!
multisca_ has joined #ruby
<shevy>
ruby heroes
multiscan has quit [Read error: Connection reset by peer]
<shevy>
I don't know most of these actually
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
i've never committed or contributed anything
<pontiki>
i'm deeply in debt
<tuelz>
I bitched on the rails issue list once - that's the closest I've been to contributing to anything ruby related
<zotherstupidguy>
i love the ruby irc channel
rodferso1 has joined #ruby
<zotherstupidguy>
i love you all
scripore has quit [Quit: This computer has gone to sleep]
<tuelz>
zotherstupidguy: I want whatever happy pills your on.
<zotherstupidguy>
tuelz try aikido
lidenskap has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 244 seconds]
<tuelz>
zotherstupidguy: pills take less effort
maletor has quit [Quit: Computer has gone to sleep.]
rodfersou has quit [Ping timeout: 255 seconds]
<shevy>
I am actually learning new things by reading that code
<shevy>
body = Tempfile.new('CGI', encoding: Encoding::ASCII_8BIT)
<shevy>
never seen encoding: passed to tempfile before
<tuelz>
all joking aside, camping does it for me - pills are for concentration, backpacking unwinds me
<zotherstupidguy>
tuelz where you live?
ndrei has joined #ruby
<zotherstupidguy>
or rather where you camp?
<tuelz>
north alabama USA
<zotherstupidguy>
whats the alabama song?
<tuelz>
I typically hike ~10 mile into william bankhead national forest
<tuelz>
sweet home alabama? by lynard skynard
<zotherstupidguy>
hehe :)
<tuelz>
haha yeah it's weird how international that song is
<tuelz>
I've heard it in every country I've visited in the americas on vacation
<tuelz>
mexico/brazil/honduras err panama I think?
<tuelz>
clubs love it for some reason
<bootstrappm>
people still using Camping?
<tuelz>
bootstrappm: zing!
<bootstrappm>
;)
<zotherstupidguy>
do you climb?
<tuelz>
nah, I like the dull pain of hiking rather than the adrenaline filled pain of climbing
<tuelz>
adrenaline isn't my thing
<zotherstupidguy>
tuelz i like how you roll
Neomex has joined #ruby
jenrzzz has joined #ruby
<tuelz>
haha, most people like me because I'm easy going and anti-social - which means the few social interactions I have I just have to put on my mr. social pants for small periods of times and then ignore phone calls until they forget I exist
lessless has joined #ruby
ndrei has quit [Ping timeout: 272 seconds]
<tuelz>
they remember me as being a 'nice guy' and I get to skip showers more often
<zotherstupidguy>
the world is infinitely better precisely because of people like you who are easy going and anti-social =)
tyfighter has quit [Quit: tyfighter]
ndrei has joined #ruby
<tuelz>
haha, thanks for building up my ego. I'd say the world isn't worse because of me, but better because of people like you
<bootstrappm>
you know what makes the world worse? car alarms that won't stop going off
<tuelz>
I'm not too ambitious so I'm okay as long as I don't make things around me worse
<shevy>
truly anti social people DO NOT USE IRC
<bootstrappm>
^
<tuelz>
bootstrappm: good news I got pissed at my truck and literaly ripped the horn out.
<shevy>
ohhh tuelz
<shevy>
you so remind me now of dudedudeman
<tuelz>
hahaha
<tuelz>
I hope that's not a bad thing?
OrbitalKitten has joined #ruby
<shevy>
his nick always is a dead give-away
<zotherstupidguy>
shevy got a good memory, dudedudeman wasnt here for quit sometime!
irobevjodu has joined #ruby
<shevy>
well you wrote "not too ambitious"; one could write "lazy"; or "energy efficient"
<bootstrappm>
dudedueman was here like friday hahah
<shevy>
like those sloths you know?
<bootstrappm>
hahaha energy efficient
<tuelz>
I see him on all the time
<bootstrappm>
beautiful
nfk|laptop has quit [Ping timeout: 256 seconds]
<shevy>
zotherstupidguy yeah perhaps he is hibernating in reallife now and has no time for IRC
<pontiki>
i only have time for irc when i am hibernating
<tuelz>
I'm super lazy. Nothing material motivates me so it's REALLY hard to do work for money. I honestly can't work for people I'm not friends with because the only thing that keeps me going is trying to fulfill their ambitions
<tuelz>
if I wasn't married I would 100% never work a full time job
jenrzzz has quit [Ping timeout: 246 seconds]
<tuelz>
but my wife deserves a comfortable life, so I take pills and get most of my work done
<tuelz>
she's happy, so I'm happy
<zotherstupidguy>
^
void has joined #ruby
varunwachaspati has quit [Quit: Leaving]
<zotherstupidguy>
its nice to be apprecaited
arescorpio has joined #ruby
<void>
907.times do puts "hello"
<tuelz>
it really is. It's weird for me though, because I feel weird when I'm being appreciated, but I notice a huge mood drop when I'm not needed
<tuelz>
void: hi
<void>
hi tuelz
<jhass>
void: you say hello to yourself? how odd
<pontiki>
usually, when someone tells me they appreciate me, they've just shat on something and i've had to clean it up
<neohunter>
how i can ser a constant in a class? I want to change the USER_AGENT in XMLRPC::Client
<tuelz>
omniref: you trying to be sneaky with a new name?
<jhass>
I suggest you override the User-Agent header that way instead of changing the constant
rkazak has joined #ruby
<tuelz>
indeed, neohunter, people reading your code won't expect you to have overridden a constant being set in the lib
<neohunter>
jhass how i can change that constant?
<neohunter>
XMLRPC::Client::http_header_extra doesnt work
<neohunter>
or do I need to open the class?
<jhass>
no, did you see my second link?
<tuelz>
it's not a constant, it's an attr
noobQ has joined #ruby
anisha has quit [Quit: Leaving]
noobQ has quit [Client Quit]
bmurt has quit [Ping timeout: 272 seconds]
<neohunter>
tuelz soryr im really novice, so i need to instanciate the object and next change, right?
<jhass>
right
sent1nel has quit [Remote host closed the connection]
<tuelz>
neohunter: no worries, I'm a novice too, I don't even know how to set the var without playing around with the object because I double guess myself so much
Beoran_ has quit [Read error: Connection reset by peer]
<tuelz>
but it looks like it's specifically giving you that ivar to use as a config type option. Set that ivar and it will use it, else it will use the default constant
<neohunter>
So it would be like x.http_header_extra["User-Agent"] = 'My User Agent'
<neohunter>
x being a XMLRPC::client.new
[k- has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 255 seconds]
<jhass>
yes
<tuelz>
neohunter: have you tried?
bmurt has joined #ruby
<bootstrappm>
I wonder, do people leave IRC once they get to a certain level of mastery?
<tuelz>
bootstrappm: in my experience, no
Akuma has quit [Quit: So long sukkas!]
<jhass>
well, it's initialized to nil, so extra = {"User-Agent" => "Your user agent"}
<neohunter>
tuelz, yes... gives this error NoMethodError: You have a nil object when you didn't expect it!
<tuelz>
bootstrappm: take jhass, here. He obviously gets off to answering hard questions because he's pretty damn skilled with ruby
<jhass>
bootstrappm: we got #ruby-pro ;)
<tuelz>
invite only?
<bootstrappm>
ahhh nice jhass!
<neohunter>
tuelz: seems like x.http_header_extra is nil :P
<jhass>
tuelz: no, anybody can listen
fabrice31 has joined #ruby
<tuelz>
jhass: cool, I'm seeing that now
<tuelz>
jhass: I'll have to idle around for a while and see if I learn some stuff
<jhass>
it's kinda dead atm, don't expect much
failshell has joined #ruby
vdamewood has joined #ruby
iwishiwerearobot has joined #ruby
mtakkman has joined #ruby
CustosLimen has quit [Read error: Connection timed out]
_blizzy_ has quit [Ping timeout: 265 seconds]
<tuelz>
neohunter: I would expect that to work, so I'll need to see code to further debug (code and stack trace)
serivich has joined #ruby
<neohunter>
that class on initilaize method have this @http_header_extra = nil
<neohunter>
may is expecting a string
<jhass>
no, it's expecting a hash
nfk|laptop has joined #ruby
<jhass>
you just have to set a hash
jenrzzz has joined #ruby
<jhass>
x.http_headers_extra = {...}
tomeara has joined #ruby
sinkensabe has joined #ruby
shuber_ has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
iwishiwerearobot has quit [Ping timeout: 245 seconds]
bigmac has joined #ruby
nubyruby has joined #ruby
banister has quit [Read error: Connection reset by peer]
banister has joined #ruby
<neohunter>
got it, yes thanks
ramfjord has joined #ruby
shuber_ has quit [Ping timeout: 258 seconds]
HotCoder has quit [Ping timeout: 258 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
<tuelz>
I wish minitest had as much dogma as rspec. Minitest is so nice to use, but not many people seem to write decent tests with it.
ndrei has joined #ruby
omniref has quit [Quit: WeeChat 0.4.2]
<tuelz>
with rspec I feel like they've done a good job slapping peoples hands until they write tests the 'right' way
tomeara has quit [Quit: (null)]
arietis has joined #ruby
arietis has quit [Client Quit]
chinmay_dd has quit []
ebonics has joined #ruby
manzo has joined #ruby
CustosLimen has joined #ruby
tyfighter has joined #ruby
startupality has joined #ruby
bmurt has quit []
ndrei has quit [Ping timeout: 256 seconds]
ndrei has joined #ruby
lidenskap has quit [Remote host closed the connection]
bronson has joined #ruby
<al2o3-cr>
How can I set the default prefix for regexp globally for a cinch bot, instead of doing match /foo/, prefix: /^%/ for each plugin?
sinkensabe has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 272 seconds]
mrmargolis has joined #ruby
ndrei has joined #ruby
banister has quit [Ping timeout: 264 seconds]
lavros has quit [Quit: leaving]
multisca_ has quit [Remote host closed the connection]
sinkensabe has joined #ruby
<al2o3-cr>
nvm found it, it was under plugins.prefix in bot options been looking a that page for a while too
<tuelz>
al2o3-cr: there is an option in cinch to set it to whatever you want
gambl0re has quit [Ping timeout: 272 seconds]
nubyruby has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 258 seconds]
itsgg has joined #ruby
mrmargolis has quit [Ping timeout: 264 seconds]
gambl0re has joined #ruby
gusrub has joined #ruby
<al2o3-cr>
tuelz: yeah, I just found now mate thanks
<al2o3-cr>
*it
sent1nel has joined #ruby
kriskropd has quit [Ping timeout: 264 seconds]
<tuelz>
al2o3-cr: for sure, I made a twitch bot the other day for giggles and couldn't belive how easy cinch was to use. It actually got boring really fast because it was too easy even for a crappy 'grammer like myself
n008f4g_ has quit [Ping timeout: 265 seconds]
<tuelz>
well it was easy for the basic stuff I did anyhow
<tuelz>
the docu is lacking for adding modules and stuff iirc
ndrei has quit [Ping timeout: 250 seconds]
sankaber has quit [Ping timeout: 246 seconds]
einarj has joined #ruby
bmurt has joined #ruby
<al2o3-cr>
tuelz: cinch is rather easy to set up when you read the docs thouroughly, I tend to scan the docs that one of my main problems :)
<tuelz>
haha, yeah I read pretty well because I have yet to get something right with a scan. Not quite good enough with ruby to infer things yet
<al2o3-cr>
:P
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr>
I tried getting summer to work but I failed miserably :(
ebbflowgo has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<al2o3-cr>
and also cinch supports sasl :)
<ljarvis>
cinch has come quite far
<ljarvis>
since I built the original
banister has joined #ruby
<al2o3-cr>
Is it dominik the main maintainer now?
Limix has joined #ruby
<ljarvis>
yeah, we merged cinch built by me, and another bot he built
ndrei has joined #ruby
<ljarvis>
then he took over maintenance after a while
bronson has joined #ruby
ebbflowgo has quit [Client Quit]
<al2o3-cr>
ljarvis: ah cool I really like it :)
zotherstupidguy has quit [Ping timeout: 250 seconds]
ta has joined #ruby
<al2o3-cr>
upto version 2.2.5 now
<ljarvis>
glad to hear it, Dom has put a lot of time into it
<jhass>
that one thread per handler call model though...
<ljarvis>
yeah not a fan
<ljarvis>
we had many idea conflicts :)
platzhirsch has quit [Quit: Leaving.]
tubuliferous has joined #ruby
nszceta_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tuelz>
why wouldn't you want new threads for handlers? Just added complexity?
Rollabunna has quit [Quit: Leaving...]
<jhass>
you want several threads for handlers, yes
<jhass>
you don't want to spawn a new one for each call to a handler
<apeiros>
tuelz: for me, it causes the bot to die at times due to too many open filehandles
Vile` has quit [Read error: Connection reset by peer]
<ljarvis>
using a thread pool would probably be good
gauke has quit [Quit: gauke]
<tuelz>
ahh, I see
<apeiros>
I'm updating butler
<apeiros>
I'll use a thread per plugin
<ljarvis>
wow butler
tubuliferous has quit [Ping timeout: 258 seconds]
<apeiros>
so each plugin can handle its own concurrency
ta has quit [Remote host closed the connection]
<apeiros>
yeah, ancient.
<ljarvis>
didn't you start building silver server or something like that
<apeiros>
it learned sasl from cinch ;-)
sent1nel has quit [Remote host closed the connection]
kayloos has joined #ruby
<apeiros>
silverplatter. yes.
<ljarvis>
hah nice
<ljarvis>
that's the one
<apeiros>
the new butler is based on that code.
<ljarvis>
more like an irc toolchain right?
<ljarvis>
I see
<apeiros>
but as it always is, I of course couldn't just use the code. *sob*
<apeiros>
silly me.
<ljarvis>
I used to enjoy writing irc bots
<ljarvis>
(hence cinch + others)
<apeiros>
I hate the protocol
<ljarvis>
now I want to rip my face off at the thought
<apeiros>
it's insanity looking innocent
<ljarvis>
yep, it's awful
<pontiki>
isn't that like a phase people go through?
<ljarvis>
hah
<ljarvis>
probably
<ljarvis>
then they write a ton of command line parsers?
<apeiros>
haha
<pontiki>
and irc bots
<apeiros>
I wrote one for butler actually
<tuelz>
not me - I never wanted to write them, but some streamers on twitch TV wanted some features an irc bot could handle so I tried to help them out
<ljarvis>
I did only write one though, and it's kinda okay
poguez_ has joined #ruby
<pontiki>
and little languages
<ljarvis>
apeiros: that's actually how slop started
<apeiros>
I tend to use optparse now.
<ljarvis>
:O
<ljarvis>
I'm hurt
<pontiki>
i use thor, never worry about the opt parsing :)
<apeiros>
I don't remember why I don't use slop, though
<tuelz>
I'm going through the 'little' language phase with elixir right now, and sorta with elm. I like functional languages sparse stdlibs
<ebonics>
anyone use mruby
segfalt has quit [Quit: segfalt]
<ljarvis>
apeiros: meh, optparse is decent enough
<ljarvis>
tuelz: elixir is awesome
<al2o3-cr>
trollop pretty nice imo
<tuelz>
ljarvis: it's a lot of fun, that's for sure. A general purpose language on BEAM is really appealing
<ljarvis>
meh
<ljarvis>
al2o3-cr: I'm biased but I didn't like it (hence slop existing)
Vile` has joined #ruby
<al2o3-cr>
;p
tchebb has quit [Ping timeout: 256 seconds]
sinkensabe has quit [Remote host closed the connection]
<al2o3-cr>
bt like apeiros i tend to use optparse
<tuelz>
I honestly have a hard time understanding why the JVM got so popular while BEAM just sat around being awesome
tchebb has joined #ruby
<ljarvis>
I use optparse a lot too
<al2o3-cr>
probably only use because it's in stdlib
multiscan has quit [Remote host closed the connection]
<jhass>
did you ever run bundle install without sudo?
arietis has joined #ruby
Rickmasta has joined #ruby
nszceta has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanpaucar has quit [Ping timeout: 272 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<prillian5>
whole time
mary5030 has quit [Ping timeout: 272 seconds]
<prillian5>
sudo -s
simpyll has joined #ruby
DerisiveLogic has joined #ruby
<jhass>
eek
<jhass>
?root
<ruboto>
General advise in system administration: do not and that means never use sudo or root to "fix" things. Only use it if you exactly know why it would work and why it wouldn't work under any circumstances as normal user. Or if you're told to do it.
<prillian5>
but hear this: If i do ' sudo bundle exec rake2.2 db:create' I got one step closer
einarj has quit [Ping timeout: 250 seconds]
<jhass>
yeah, since you installed with root permissions
<prillian5>
so what have I to do? Do it as user ?
d1n has joined #ruby
<prillian5>
cause i use the 2.2 after rake
<jhass>
would be better, at most, don't mix
<jhass>
you clearly mix here
<prillian5>
I've done all wtih root
<prillian5>
sudo -s before all
dumdedum has quit [Ping timeout: 265 seconds]
<prillian5>
ok, what to do now
<jhass>
so it doesn't change the user in your prompt?
<ght>
My ruby app is executing an update statement with mysql, and other update mysql queries are working fine, but this one to a date field is not, and I need to review logs and see why this change isn't written.
<ght>
Are there logs I can review to determine why this mysql statement isn't throwing an exception but isn't actually updating the database?
<ght>
Using the mysql2 gem, of course.
<jhass>
prillian5: okay, good, as your user do bundle install --path vendor/bundle, so just we avoid messing with the global stuff more, then bundle exec rake should work without the 2.2 suffix
<jhass>
(as your user)
<pontiki>
ght: is this in develop and/or test environments?
<prillian5>
bundle exec rake2.2 db:create
<ght>
This is a ruby app writing and rading from a single mysql database.
<ght>
Normally, when your SQL syntax is off, it'll throw an exception.
<ght>
I'm looking for mysql logs themselves in /var/log and seeing nothing relevant. Perhaps I could turn up verbosity on mysql logging itself.
<prillian5>
looks good...
<jhass>
ght: maybe the query is just a noop or you're verifying your assumption incorrectly?
yardenbar has joined #ruby
<prillian5>
...still looks good... doing some stuff...
<ght>
jhass: I've checked the statement and the database multiple times. If I'm missing something in that regard, I'm heading to the hospital because I'm clearly having a stroke.
<ght>
I'll look into increasing mysql logging verbosity itself so I can track down the statement.
<jhass>
what if you take the generated query and run it in the mysql shell?
<prillian5>
jhass: installs now all the modules again.
<jhass>
prillian5: yes, that's intentional
<jhass>
we install to a local site dir now to not mess with or be messed up by the global stuff
Musashi007 has joined #ruby
tuelz has joined #ruby
ziprar has joined #ruby
ziprar has joined #ruby
_seanc_ has joined #ruby
<yardenbar>
Hi, can anyone recommend a crontab gem? I'm looking for a way to determine which cron-job should have run since time X
Sarchasm has quit [Remote host closed the connection]
<ScriptGeek>
Here is the task: Fill in the find_index method to return the index of a todo item in the @todo_items array given the name.The method should return the index of the item if the item is found and nil if it is not found.
<prillian5>
I can set the VM back to the start and do the steps again
<jhass>
prillian5: that's an ill advise since it updates everything, not just the troublesome gem
iwishiwerearobot has quit [Ping timeout: 256 seconds]
<kaleido>
to like json or to hate json, that is the question
<prillian5>
jhass: means what to do now?
<smellor32>
hello all
<FernandoBasso>
I'm using filewather. I run a script like ruby C:\path\to\mywatcher.rb and it doesn't seem to watch the current dir. If I run it like ruby .\mywatcher.rb, then it works. Any one has any hints on this?
cyberarm has joined #ruby
<jhass>
prillian5: nope, doesn't work either, means wait until I figure it out :P
<xxneolithicxx>
kaleido: if thats the question go find out how you feel about XML then that should answer the question for you
xehbit has quit [Max SendQ exceeded]
CustosLimen has quit [Max SendQ exceeded]
xehbit has joined #ruby
<kaleido>
hah, well played sir
<jhass>
kaleido: additionally how you feel about yaml and toml
<xxneolithicxx>
hi all
CustosLimen has joined #ruby
smellor32 is now known as smelllor32
xehbit has quit [Max SendQ exceeded]
codeFiend has joined #ruby
smelllor32 has left #ruby [#ruby]
xehbit has joined #ruby
<xxneolithicxx>
need to poke some brains now that more folks are around, it was dead last night
<xxneolithicxx>
the gist above is wrong in that i should have made them class methods and called them correct below but even when i fix that the monkey patching doesnt work right
bmurt has quit []
aryaching has quit []
swerter has joined #ruby
<xxneolithicxx>
and when i skip monkey patching and define the methods in the block itself they still arent callable from within the block
<jhass>
prillian5: alright, bundle update copyright-header that one should be it
coderhs has quit [Ping timeout: 250 seconds]
<xxneolithicxx>
so im guessing im not understanding something about binding or scope here thats playing a role
xehbit has quit [Max SendQ exceeded]
<xxneolithicxx>
any ideas?
xehbit has joined #ruby
sinkensabe has quit [Remote host closed the connection]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 256 seconds]
xehbit has quit [Max SendQ exceeded]
jstanton has quit [Ping timeout: 256 seconds]
lidenskap has joined #ruby
cats is now known as werekitten
xehbit has joined #ruby
<jhass>
xxneolithicxx: it doesn't instance eval, I'd just define them as toplevel methods
xehbit has quit [Max SendQ exceeded]
Musashi007 has quit [Quit: Musashi007]
xehbit has joined #ruby
<jhass>
but in the current version it would be spec.find_executables
<xxneolithicxx>
i had them as normal methods defined above the block but they werent in scope/usable from inside the block
<jhass>
weird, they should've been
<xxneolithicxx>
right i noticed that afterwards last night and didnt update the gist
xehbit has quit [Max SendQ exceeded]
<xxneolithicxx>
let me put what i get when they are just normal toplevel
xehbit has joined #ruby
ebbflowgo has joined #ruby
swgillespie has joined #ruby
multiscan has joined #ruby
rdark has quit [Quit: leaving]
ebbflowgo has quit [Client Quit]
stef204 has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
multiscan has quit [Remote host closed the connection]
xehbit has quit [Max SendQ exceeded]
xehbit has joined #ruby
multiscan has joined #ruby
xehbit has quit [Max SendQ exceeded]
<prillian5>
jhass: ok, looks good. Seems that I can now go on to configure the webapp.
<prillian5>
but dosn't see where the index.html is to find
<jhass>
depends, there are two basic setups passenger and reverse proxy
bronson has joined #ruby
<jhass>
there's no index.html
_blizzy_ has joined #ruby
haxrbyte_ has joined #ruby
weemsledeux has joined #ruby
doertedev has quit [Ping timeout: 276 seconds]
<jhass>
passenger is a module that runs a ruby application server inside nginx, it needs to be compiled into nginx and is not in the standard distribution
<jhass>
a reverse proxy you can configure with the standard version of nginx
<c355E3B>
They do offer a PPA though for some linux distributions
<jhass>
in the reverse proxy setup you run a ruby application server separately
<prillian5>
I have this installed. And it point in nginx.conf to the right passenger/locations.ini
haxrbyte_ has quit [Read error: Connection reset by peer]
Dakuan has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 258 seconds]
Dakuan has joined #ruby
StevenXL has quit [Quit: leaving]
yh__ has quit [Ping timeout: 258 seconds]
Dakuan has quit [Remote host closed the connection]
Hijiri has quit [Ping timeout: 265 seconds]
yh__ has joined #ruby
Timba-as has joined #ruby
Dakuan has joined #ruby
gustavn has joined #ruby
sent1nel has quit [Ping timeout: 276 seconds]
Hijiri has joined #ruby
prillian5 has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
Dakuan has quit [Ping timeout: 245 seconds]
nszceta_ has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
nszceta has quit [Ping timeout: 265 seconds]
Yzguy has quit [Quit: I'm sleeping, go away.]
ZergCoder has quit [Remote host closed the connection]
northfurr has joined #ruby
vickleton has quit [Quit: Ex-Chat]
Takle has quit [Remote host closed the connection]
nfk|laptop has quit [Quit: yawn]
dopie has quit [Quit: This computer has gone to sleep]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yh__ has quit [Ping timeout: 256 seconds]
AlphaAtom has joined #ruby
pwattstbd has joined #ruby
ZergCode_ has joined #ruby
A205B064 has joined #ruby
yh__ has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
Timba-as has quit [Quit: Be back later ...]
segfalt has joined #ruby
AlphaAtom has joined #ruby
simpyll has joined #ruby
einarj has quit [Ping timeout: 258 seconds]
einarj has joined #ruby
<ght>
I have been working on this for two hours, read a million articles, this makes no sense.
<ght>
What in the holy everliving fuck is wrong with this syntax, and how can I see what actual SQL statement is being generated by the mysql2 gem? mysqlcl.query("UPDATE `affiliates` SET `last_payment_error_reason` = 'Test' WHERE `affiliates`.`id` = 138")
sepp2k has quit [Quit: Leaving.]
<ght>
I can successfuly establish the connection, update other values in that table, that column does exist, and all that happens is the fucking thing returns nil with no discernable way to determine why the hell that's happening.
<jhass>
what do you get returned if you run that in the mysql console?
Takle has joined #ruby
asmodlol has quit [Ping timeout: 276 seconds]
<ght>
Every time you research it you get 10 pages of posts for idiot users moaning that they can't get mysql to work in rails, I'm not using rails here, I'm using a ruby app to interact with a mysql database.
<jhass>
what do you get returned if you run that in the mysql console?
<ght>
Does anyone see anything wrong with that syntax, and otherwise..
<ght>
nil, jhass.
<ght>
I get nil.
<jhass>
no
<ght>
I'm running it in irb.
<jhass>
what do you get returned if you run that in the mysql console?
<ght>
The result.
<jhass>
yes, wrong
<ght>
Oh.
<jhass>
what do you get returned if you run that in the mysql console?
<ght>
In mysql itself, ok.
<ght>
Hold.
towski_ has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
bronson has joined #ruby
<ght>
mysql> UPDATE `affiliates` SET `last_payment_error_reason` = 'Test' WHERE `affiliates`.`id` = 138;
<ght>
Query OK, 0 rows affected (0.00 sec)
<ght>
Rows matched: 1 Changed: 0 Warnings: 0
<jhass>
MySQL thinks the column already has that value
<ght>
mysql> UPDATE `affiliates` SET `last_payment_error_reason` = 'Test2' WHERE `affiliates`.`id` = 138;
<jhass>
SELECT last_payment_error_reason FROM affiliates WHERE id = 138
<ght>
Query OK, 1 row affected (0.00 sec)
<ght>
Rows matched: 1 Changed: 1 Warnings: 0
<ght>
Ok
startupality has quit [Quit: startupality]
MrBeardy has joined #ruby
juanpaucar has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
ZergCode_ has quit [Remote host closed the connection]
pwattstbd has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
edwinvdgraaf has quit [Remote host closed the connection]
wookiehangover has quit [Quit: i'm out]
<jhass>
so given the first one indicated that the column already had that value, how did you verify it doesn't work prior?
quimrstorres has quit [Remote host closed the connection]
arietis has joined #ruby
cirn0 has joined #ruby
wookiehangover has joined #ruby
arietis has quit [Client Quit]
turtil has joined #ruby
_seanc_ has joined #ruby
startupality has joined #ruby
_blizzy_ has quit [Ping timeout: 255 seconds]
<jhass>
query_info(_string) might have some meat
turtil has quit [Client Quit]
bronson has joined #ruby
robbyoconnor has joined #ruby
SouL_|_ has quit [Ping timeout: 256 seconds]
mrmargolis has quit [Ping timeout: 276 seconds]
ramfjord has quit [Ping timeout: 258 seconds]
turtil has joined #ruby
shuber_ has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
quimrstorres has joined #ruby
woodruffw has quit [Read error: Connection reset by peer]
woodruffw has joined #ruby
quimrstorres has quit [Read error: Connection reset by peer]
quimrstorres has joined #ruby
shuber_ has quit [Ping timeout: 245 seconds]
Dakuan has joined #ruby
fabrice31 has joined #ruby
d1n has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
Takle has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
wildroman2 has quit [Remote host closed the connection]
rubie has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
Dakuan has quit [Ping timeout: 264 seconds]
iwishiwerearobot has quit [Ping timeout: 244 seconds]
huddy has joined #ruby
Aswebb_ has joined #ruby
Takle has joined #ruby
_seanc_ has quit [Quit: _seanc_]
pwattstbd has joined #ruby
tuelz has joined #ruby
<tuelz>
anyone know where I can find a decent getting started guide for using sunspot without rails
cirn0 has quit [Remote host closed the connection]
<pontiki>
i've only ever seen the README
<tuelz>
not sure what needs to be config'd according to the docs the defaults should be pointing where my solr is running, but I'm getting http errors which makes me think it's looking in the wrong place or something
cirn0 has joined #ruby
ki0 has quit [Remote host closed the connection]
Aswebb_ has quit [Ping timeout: 272 seconds]
startupality has quit [Quit: startupality]
rubie has quit [Remote host closed the connection]
MrBeardy has quit [Ping timeout: 272 seconds]
Takle has quit [Ping timeout: 256 seconds]
<tuelz>
it's times like these when I can sympathize with the vocal 'Rails is not Ruby' community
quimrstorres has quit [Remote host closed the connection]
<tuelz>
every other blog is saying 'solr with ruby objects' yadda yadda and scroll down to see the first thing 'first include 'sunspot_rails' in yoru gemfile....
<pontiki>
i've never had reason to try it outside of rails, sorry
quimrstorres has joined #ruby
jtdowney has joined #ruby
simpyll has quit [Remote host closed the connection]
simpyll has joined #ruby
<tuelz>
all good, I'll just bang my head against the wall until it works
Ropeney has joined #ruby
_blizzy_ has joined #ruby
startupality has joined #ruby
<ebonics>
the hell is "class <<self"
chris349 has joined #ruby
<jhass>
open the singleton class of self
quimrstorres has quit [Ping timeout: 265 seconds]
<chris349>
What is the best way to run the rails server from systemd? When I run it directly it works, but I need it to load automatically upon bootup. When I try to run it from systemd it fails saying: require: cannot load such file -- bundler/setup (LoadError)
startupality has quit [Client Quit]
<tuelz>
chris349: are you running `rails server` or `bundle exec rails server`? also #rubyonrails is a very active channel
Rixius has quit [Ping timeout: 252 seconds]
pwattstbd has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider>
chris349: what ruby are you using? rvm? you'll need to set up root the same way
<zenspider>
(or run ruby directly)
<zenspider>
full paths are a good thing for crontabs and rc files
cirn0 has quit [Remote host closed the connection]
startupality has joined #ruby
huddy has quit [Excess Flood]
havenwood has quit [Ping timeout: 246 seconds]
huddy has joined #ruby
<chris349>
I run the command directly and there is no issue: /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby /opt/errbit/script/rails server
<jhass>
"set up root the same way"? no, just make sure your User= is right
<jhass>
ah, rvm, use the wrappers, rvm help wrapper
<chris349>
But when I run it from the systemd script it does not run and gives this error: require: cannot load such file -- bundler/setup (LoadError)
jtdowney has quit []
Deele has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
gambl0re has joined #ruby
wildroman2 has joined #ruby
DuoSRX has quit [Quit: Connection closed for inactivity]
<chris349>
Is there any way to run rvm wrapper with the defaults?
<jhass>
?
<chris349>
I really dont understand how rvm wrapper works
<jhass>
do you understand how rvm use works?
<chris349>
I try /usr/local/rvm/bin/rvm wrapper /opt/errbit/script/rails server but it fails with the error Unknown ruby interperter version, Could not load ruby /opt/errbit/script/rails
<jhass>
did you read rvm help wrapper?
<chris349>
I just use rvm to install ruby. I only have one version of ruby installed
<jhass>
it doesn't sound like you did
<chris349>
Yes I read the help but I dont understand the terms used, for e.g what is ree?
nettoweb has joined #ruby
<jhass>
just an ancient outdated ruby version
<ebonics>
am i the only one who builds their own ruby dists
<jhass>
ebonics: mh, I maintain ruby-2.0 and ruby-2.1 in the AUR :P
<jhass>
chris349: so what does rvm current say where it works?
<chris349>
All I know is I run this command in the console and everything works as expected: /usr/local/rvm/rubies/riby-2.2.1/bin/ruby /opt/errbit/script/rails server and everything works perfect.
<ebonics>
i mean
<chris349>
How can I adapat this command to work in systemd so it loads at boot time?
<ebonics>
i have a directory in my home directory with ruby versions i need
<jhass>
by answering my question
tubuliferous has joined #ruby
<ebonics>
then manually change the path to the one i need
<jhass>
ebonics: uh, why not chruby?
<chris349>
ebonics, I only need and have one version of ruby installed
<ebonics>
idk, i used rvm once and it started installing shit
nettoweb has quit [Client Quit]
<ebonics>
never looked into chruby
<ebonics>
chruby looks cool
<jhass>
I think you'll like it, basically just a thin wrapper around what you do
<jhass>
chris349: so, what does rvm current say?
Akagi201 has quit [Remote host closed the connection]
Aearnus has quit [Quit: sleep]
<chris349>
jhass, ruby-2.2.1
<jhass>
then do rvm wrapper 2.2.1 rails
<ebonics>
chris349, why are you using rvm if you only use 1 version :o
<jhass>
ebonics: trying to remove a system wide rvm installl is not worth it at this point
platzhirsch has quit [Quit: Leaving.]
cirn0 has joined #ruby
<ebonics>
rvm is the type of thing that causes headaches at some point
workmad3 has joined #ruby
<ebonics>
when you cant figure out where your ruby is getting run from or where the paths are set
gregf has quit [Quit: WeeChat 1.1.1]
DEA7TH has quit [Ping timeout: 252 seconds]
<zenspider>
ebonics: agreed... but it's the easiest entrypoint on linux (unfortunately)
tubuliferous has quit [Ping timeout: 276 seconds]
<zenspider>
I'd rather they use ruby-build or something.... but whatevs... they have what they have
startupality has quit [Quit: startupality]
<chris349>
Yes it seems to have to do with the paths, how can I set the path correctly from the systemd script?
gregf has joined #ruby
<jhass>
did you do rvm wrapper 2.2.1 rails?
<zenspider>
chris349: the easiest way is to not set it and to use full paths
<zenspider>
second easiest is to set an explicit PATH=xxx in the systemd script
<chris349>
zenspider, I am using the full path, but it seems that other things are called that depend on the enviroment path, which is not set through systemd
<zenspider>
long term easiest is to set it up right via /etc/profile or equiv
<jhass>
sigh, why do you ignore me?
<Radar>
because this is IRC
workmad3 has quit [Ping timeout: 265 seconds]
bronson has joined #ruby
bigkevmcd has quit [Ping timeout: 256 seconds]
nszceta_ has quit [Ping timeout: 276 seconds]
<jhass>
chris349: do you ignore everything unless highlighted or what's up?
bigkevmcd has joined #ruby
tmoor has joined #ruby
tmoor has quit [Client Quit]
<chris349>
jhass, No I am not sure how to properly use rvm wrapper
<jhass>
I told you. Twice
CloCkWeRX has joined #ruby
<jhass>
so after you executed the command I gave you, twice, just do ExecStart=/usr/local/rvm/wrappers/ruby-2.2.1/rails server
<chris349>
jhass, In that case, how will it know where to find the actual code to run?
michael_mbp has quit [Excess Flood]
<jhass>
well, you set WorkingDirectory
michael_mbp has joined #ruby
<chris349>
jhass, How/where is WorkingDirectory set?
<jhass>
in your unit
<jhass>
man systemd.service
shuber_ has joined #ruby
<jhass>
systemd has excellent docs
RegulationD has quit [Read error: Connection reset by peer]
<jhass>
oh, I guess WorkingDirectory is in man systemd.exec
RegulationD has joined #ruby
<zenspider>
jhass: JEEZE... your advice SUCKS
<jhass>
systemd.service says: Service files must include a "[Service]" section, which carries information about the service and the process it supervises. A number of options that may be used in this section are shared with other unit types. These options are documented in systemd.exec(5) and systemd.kill(5).
<jhass>
just sayin'
tyfighter has joined #ruby
charliesome has joined #ruby
bronson has quit [Remote host closed the connection]
lidenskap has joined #ruby
segfalt has quit [Quit: segfalt]
Yzguy has joined #ruby
shuber_ has quit [Ping timeout: 240 seconds]
Dakuan has joined #ruby
rodfersou has joined #ruby
<chris349>
jhass, Thank you, that actually works
<jhass>
surprise!
jtdowney has joined #ruby
<jhass>
chris349: make sure to set User= too, you don't want to run that as root. Might need to chown the app
<chris349>
I set User=root
<jhass>
yes, that's bad
<jhass>
(and the default btw)
bogdanteleaga has quit [Ping timeout: 244 seconds]
Dakuan has quit [Ping timeout: 256 seconds]
Drewch has quit [Quit: Computer has gone to sleep.]
jtdowney has quit [Read error: Connection reset by peer]