<Ox0dea>
amincd: No worries. The community style guide recommends %w(), but I think %w[] is better.
diego1 is now known as diegoviola
<Ox0dea>
I mean, it's an Array...
mjuszczak has quit [Client Quit]
mjuszczak has joined #ruby
Moosashi has quit [Quit: Moosashi]
Musashi007 has quit [Quit: Musashi007]
zast has quit [Remote host closed the connection]
grenierm has quit [Quit: grenierm]
devbug has joined #ruby
skweek has joined #ruby
arescorpio has joined #ruby
<amincd>
Ox0dea: yea makes sense
<baweaver>
maybe but I've yet to see it in the wild as that
<baweaver>
there's something to be said for staying at least somewhat consistent with how the community does things
<baweaver>
then again this isn't Python either, so...
patrick_star_3 has joined #ruby
LoneHerm_ has joined #ruby
<Ox0dea>
And, so, but, well, why did the community settle on %w() in the first place?
<baweaver>
anyways, my general thought on style is try and stay with what the community says as much as possible to avoid bikeshedding over silly things
* baweaver
shrugs
<baweaver>
no one said it has to make the most sense in the world, you could always justify things
<Ox0dea>
Try justifying this one.
<baweaver>
point being if someone shows up on a code review and tries to change all that I'd ignore them
<baweaver>
just like I'm going to ignore this and not bother
<baweaver>
it's a waste of time over something trivial
ramfjord has quit [Ping timeout: 260 seconds]
patrick_star_2 has quit [Ping timeout: 265 seconds]
hahuang61 has joined #ruby
LoneHerm_ has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
hahuang61 has quit [Ping timeout: 260 seconds]
tatsuo has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 276 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
davedev24 has quit []
tmtwd has joined #ruby
binaryplease has joined #ruby
moeabdol has joined #ruby
northrup has joined #ruby
zacts has quit [Quit: leaving]
crystal77 has joined #ruby
zacts has joined #ruby
chipotle has quit [Max SendQ exceeded]
moeabdol has quit [Ping timeout: 260 seconds]
devbug has quit [Quit: ZZZzzz…]
djbkd has joined #ruby
diego1 has joined #ruby
chipotle has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola is now known as Guest34352
diego1 is now known as diegoviola
Guest34352 has quit [Ping timeout: 252 seconds]
djbkd has quit [Remote host closed the connection]
chopin_ has quit [Remote host closed the connection]
pickandmix has joined #ruby
djbkd has joined #ruby
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
renatosilva has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
<havenwood>
You can alternatively install the gem from the command line then restart Pry and require it.
<havenwood>
gem install mines
<havenwood>
brent__: Since you're using rbenv you may have to `rbenv rehash`.
<havenwood>
?rbenv
<ruby[bot]>
Missing command under rbenv? Did you try `rbenv rehash`?
<brent__>
lol
<brent__>
why would i need to do 'gem-install mines'?
<brent__>
it's not a gem, just a .rb file
<havenwood>
brent__: I assumed it's a gem. If it's a file the problem is likely that it's not in your $LOAD_PATH.
<havenwood>
Or not accessible from a dir that is, rather.
drewo has joined #ruby
<havenwood>
brent__: Familiar with the #require_relative method?
<Ox0dea>
brent__: You could say `require './mines'` or `require_relative 'mines'`, but it's better to get the necessary directory into $LOAD_PATH so that you can just say what you've got now.
<brent__>
i have used it in the past
<havenwood>
brent__: In Ruby 1.8 "." was in the $LOAD_PATH.
<brent__>
Ox0dea: the directory may be changing for my files, does it still make sense to chang ethe $LOAD_path?
<havenwood>
brent__: Say more about what you're doing.
<brent__>
right now i'm just trying to learn some extra pry functionality
chopin has quit [Remote host closed the connection]
<havenwood>
Take a look at: $LOAD_PATH
<brent__>
not specifically doing anything, i suppose. Just trying to learn how to use pry
<brent__>
in pry?
<havenwood>
Yup, type: $LOAD_PATH
<brent__>
k, see a lot for .rbenv directories listed
moeabdol has joined #ruby
<havenwood>
brent__: Those are places #require will look.
<havenwood>
And #require_relative right beneath it
<brent__>
okay, looking at how to add a directory
<havenwood>
brent__: When you run pry you can `pry -I DIR` to "[a]dd a path to the $LOAD_PATH."
<brent__>
does pry recognize which directory you invoked it from?
Adam_FrVancouver has quit [Read error: Connection reset by peer]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
yup
Adam_FrVancouver has joined #ruby
cdg has quit [Remote host closed the connection]
bronson has joined #ruby
<brent__>
havenwood is it just 'pry -I DIR'? i'm getting 'unkown constant'
<brent__>
or 'unexpected* constant"
<havenwood>
brent__: By DIR I just mean the directory you want to add to the $LOAD_PATH. See: pry -h
kareeoleez has quit [Remote host closed the connection]
amincd has quit [Quit: Page closed]
bronson has quit [Ping timeout: 252 seconds]
nando293921 has quit [Quit: Lost terminal]
<brent__>
when starting pry with that command, it's still not fnding it w/ just 'require'
Oog has joined #ruby
LoneHermit has quit [Remote host closed the connection]
kkeuning has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruno- has joined #ruby
moeabdol has quit [Ping timeout: 265 seconds]
<havenwood>
brent__: Do you see the dir in your $LOAD_PATH and is the file you're loading in that dir?
<brent__>
there it goes
gooodroot has joined #ruby
<brent__>
brain farting and misspelled it the first time
last_staff has joined #ruby
<brent__>
thanks for helping havenwood
bruno- has quit [Ping timeout: 260 seconds]
<havenwood>
you're welcome
SilverKey has quit [Quit: Halted.]
goodroot has quit [Ping timeout: 265 seconds]
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
aibot has quit [Ping timeout: 240 seconds]
aibot has joined #ruby
goooodroot has joined #ruby
justin_pdx has joined #ruby
<brent__>
you guys really make a difference for people trying to learn
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbennacer has joined #ruby
elifoster has joined #ruby
gooodroot has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
moeabdol has joined #ruby
abucha has joined #ruby
diegoviola has quit [Quit: WeeChat 1.5]
abucha_ has joined #ruby
solocshaw has quit [Quit: solocshaw]
abucha__ has joined #ruby
aufi has joined #ruby
Devalo has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
abucha has quit [Ping timeout: 260 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
abucha_ has quit [Ping timeout: 276 seconds]
<Arcaire>
brent__: yeah #ruby is mostly good like that :D
Tristan-Speccy has quit [Remote host closed the connection]
<Arcaire>
There's some help channels around here that won't help you or will actively scorn you unless you fit within the bounds of 30-odd rules immediately before you ask for help, luckily this isn't one of them. ;)
<gregf_>
the first thing one learns in programming is assignment and declarations and variables *sigh*
blackmes1 has joined #ruby
Mon_Ouie has joined #ruby
DaniG2k has joined #ruby
bluOxigen_ has joined #ruby
johnDoe111^ has joined #ruby
johnDoe111^ has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 276 seconds]
yardenbar has quit [Quit: Leaving]
vcoinminer has joined #ruby
anes has quit [Ping timeout: 250 seconds]
CausaMortis has quit [Quit: Goodbye]
jolts has quit [Ping timeout: 244 seconds]
Ruby3X3 has quit [Remote host closed the connection]
CausaMortis has joined #ruby
rodfersou has joined #ruby
jolts has joined #ruby
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
platzhirsch has quit [Read error: No route to host]
CausaMortis has quit [Client Quit]
mrgrieves has quit [Ping timeout: 250 seconds]
CausaMortis has joined #ruby
b|ackwolf has quit [Ping timeout: 265 seconds]
workmad3 has joined #ruby
TheWhip has quit [Remote host closed the connection]
mrgrieves has joined #ruby
DanyC has joined #ruby
<Labaleine>
Hello. Small problem. My puts is not showing my variable #{description}. I tried to fix it adding a method to_sym but it is not working. Here is the code. Thank you very much for your help
<adaedra>
@variables are tied to an object instance.
b|ackwolf has joined #ruby
<adaedra>
L. 22, you're outside of your Task instance scope, so @description is not referring to the same thing it is L. 14 and 18.
finnnnnnnnnnn has joined #ruby
opus_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra>
If you want to access it, you have to make an accessor and access through this. Add a `attr_reader :description` in your class Task, then use task.description in your puts.
blackmes1 has quit [Ping timeout: 260 seconds]
YP-QMUL-W has joined #ruby
<hanmac>
Labaleine: because you did define to_s you might do it puts "you have created the task #{my_task}"
pLaToOn has joined #ruby
<pLaToOn>
moin
<Labaleine>
Thank you. I get it :)
TheWhip has joined #ruby
drewo has joined #ruby
Gasher has joined #ruby
anes has joined #ruby
<anes>
Hi friends, I got error when running wpscan as ruby wpscan.rb --url http://daisy.kfbyf.org
<anes>
error is [ERROR] cannot load such file -- bundler/setup
drewo has quit [Ping timeout: 240 seconds]
<anes>
any body please advise bcoz I am not a ruby programmer
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<awk>
you probably have multiple versions of ruby installed
<|2701>
how should I know when I should #extend an object, and when to do it another way?
yosafbridge` has quit [Quit: Leaving]
<apeiros>
you use extend when you want to add methods to a single object only
<apeiros>
it's relatively rare that you'd use extend, most often you'd use it to add class methods to a class.
<|2701>
so if I had multiple objects, and I wanted them to have a method, I should probably do it different?
<Elysia>
I thought #extend was the same as class Stuff < OtherClass
<Elysia>
hm..
<|2701>
I'm working with individual bytes and changing them between hex and decimal and bitstring representations, so I'm trying to keep it pretty light so that I'm not blowing cycles
johnDoe111^ has quit [Remote host closed the connection]
<|2701>
so should I write it as a couple Procs that I can pass the bytes into, or should I extend the objects with the methods I want?
rbennacer has joined #ruby
<apeiros>
Elysia: it isn't.
<Ox0dea>
|2701: There are already methods for converting between bases.
<apeiros>
`class Foo < Other` requires Other to be a Class. `foo.extend Other` requires Other to be a Module
millerti has joined #ruby
millerti has quit [Client Quit]
<|2701>
Ox0dea: I'm writing this to learn, if that's alright with you
<|2701>
and for fun, too
<Elysia>
apeiros: I guess I'll have to look up how to dd more than one class with `<`, because class A < B, C didn't work
synthroid has joined #ruby
matp has quit [Remote host closed the connection]
<apeiros>
Elysia: ruby does not have multiple inheritance
<Ox0dea>
Elysia: Sounds like you want composition rather than inheritance.
<Elysia>
shucks.
last_staff has quit [Ping timeout: 244 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Elysia>
>> class A; end; class B < A; end; class C < B; end; C.new
robh71 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has quit [Ping timeout: 276 seconds]
cfillion has quit [Ping timeout: 252 seconds]
cfillion has joined #ruby
htmldrum has quit [Ping timeout: 276 seconds]
tatsuo has quit [Remote host closed the connection]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has quit [Remote host closed the connection]
deadnull_ has joined #ruby
crystal77 has joined #ruby
duckpupp1 has joined #ruby
brianpWins has quit [Ping timeout: 265 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
frankieleef has quit [Ping timeout: 250 seconds]
blaxter has joined #ruby
p337rB has joined #ruby
brianpWins has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
mdw has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
yosafbridge has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
finnnnnnnnnnn has joined #ruby
gooodroot has joined #ruby
the_drow has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
shakes has quit [Quit: Leaving]
skade has joined #ruby
skade has quit [Remote host closed the connection]
Yiota has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noServic1 has joined #ruby
idefine has joined #ruby
cdg has joined #ruby
goodroot has quit [Ping timeout: 252 seconds]
jaguarmagenta has joined #ruby
jokke has joined #ruby
matp has quit [Ping timeout: 276 seconds]
noService has quit [Ping timeout: 260 seconds]
pickandmix has joined #ruby
kareeoleez has quit [Remote host closed the connection]
pawnbox has joined #ruby
roamingdog has joined #ruby
jdawgaz has joined #ruby
idefine has quit [Ping timeout: 244 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
cdg has quit [Ping timeout: 276 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
roamingdog has quit [Remote host closed the connection]
kareeoleez has joined #ruby
TheWhip has quit [Remote host closed the connection]
roamingdog has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
bruno- has joined #ruby
<|2701>
on a fresh ubuntu 14.04 vm, installed 2.3.1p112 from source, but gem install gives an error about zlib, gem update --system gives the same error
<|2701>
but zlib1g is already installed through apt
<|2701>
have i missed something somewhere?
TheWhip has joined #ruby
dstarh has joined #ruby
CloCkWeRX has joined #ruby
<toretore>
|2701: did you install zlib1g-dev before compiling ruby?
<|2701>
hmm, i'm not sure.
<toretore>
uninstall ruby, then apt-get install libssl-dev libreadline6-dev zlib1g-dev, then install ruby again
<|2701>
yep, thats what I'll have to do.
<|2701>
thanks
mdw_ has joined #ruby
gagrio has quit [Ping timeout: 240 seconds]
banister has joined #ruby
ramortegui has joined #ruby
TheWhip has quit [Ping timeout: 240 seconds]
mdw has quit [Ping timeout: 250 seconds]
fmcgeough has joined #ruby
the_drow has joined #ruby
GodFather has joined #ruby
grenierm has quit [Quit: grenierm]
<|2701>
toretore: mk, I did that and I'm still getting the same error after reinstalling
beagles has left #ruby [#ruby]
tatsuo has joined #ruby
CloCkWeRX has left #ruby [#ruby]
malconis has joined #ruby
karapetyan has joined #ruby
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
tvw has quit []
tvw has joined #ruby
zotherstupidguy has quit [Ping timeout: 252 seconds]
gagrio has joined #ruby
nhhc has joined #ruby
sgambino_ has joined #ruby
sgambino has joined #ruby
sgambino has left #ruby [#ruby]
sgambino_ has left #ruby [#ruby]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
TheWhip has quit [Remote host closed the connection]
saneax is now known as saneax_AFK
DoubleMalt has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
tjohnson has joined #ruby
drewo has joined #ruby
aegis3121 has joined #ruby
baweaver is now known as baweaver_away
<shevy>
do you people have preferences when you write a class, where to put: include statements; constants pertaining to that class; aliases? I ask because I seem to prefer putting all of this before "def initialize" and I wonder whether that is common
baweaver_away is now known as baweaver
<toretore>
i think that's pretty common
rippa has joined #ruby
edwinvdgraaf has quit [Ping timeout: 240 seconds]
jliberman has quit [Quit: This computer has gone to sleep]
chopin has joined #ruby
polishdub has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
jokke has quit [Quit: WeeChat 1.4]
jokke has joined #ruby
finnnnnnnnnnn has quit [Quit: finnnnnnnnnnn]
drewo has quit [Ping timeout: 244 seconds]
binaryplease has joined #ruby
finnnnnnnnnnn has joined #ruby
d10n-work has joined #ruby
DoubleMalt has quit [Read error: Connection reset by peer]
DoubleMalt has joined #ruby
synthroid has quit [Remote host closed the connection]
Tichodroma has quit [Ping timeout: 260 seconds]
bluOxigen_ has joined #ruby
dionysus69 has joined #ruby
elifoster has joined #ruby
roamingdog has quit []
tesuji has quit [Read error: Connection reset by peer]
CausaMortis has quit [Ping timeout: 240 seconds]
brent__ has joined #ruby
bluOxigen has quit [Ping timeout: 260 seconds]
mdw has joined #ruby
codecop has quit [Remote host closed the connection]
morochena has quit [Quit: Leaving...]
tvw has quit [Remote host closed the connection]
dhollinger has joined #ruby
binaryplease has quit [Quit: WeeChat 1.5]
moeabdol has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nes has joined #ruby
CausaMortis has joined #ruby
slackbotgz has joined #ruby
rodferso1 has joined #ruby
Yiota has joined #ruby
hobodave has joined #ruby
jliberman has joined #ruby
noService has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodfersou has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
RegulationD has joined #ruby
lxsameer has joined #ruby
ishe has quit [Remote host closed the connection]
mdw has quit [Ping timeout: 244 seconds]
Yiota has quit [Ping timeout: 276 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
nes has quit [Ping timeout: 276 seconds]
Chachi has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has joined #ruby
aganov has quit [Remote host closed the connection]
Ebok has quit [Quit: This computer has gone to sleep]
mrgrieves has quit [Ping timeout: 240 seconds]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
drale2k has joined #ruby
jliberman has quit [Quit: Leaving]
Devalo has joined #ruby
ramfjord has joined #ruby
aegis3121 has quit [Ping timeout: 276 seconds]
TomyWork has quit [Ping timeout: 244 seconds]
goooodroot has joined #ruby
mdw_ has joined #ruby
Labaleine has joined #ruby
hobodave_ has joined #ruby
vdamewood has quit [Quit: Life beckons.]
SilverKey has quit [Quit: Halted.]
gooodroot has quit [Ping timeout: 244 seconds]
Couch has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
SilverKey has joined #ruby
mdw has quit [Ping timeout: 250 seconds]
kedare has quit [Quit: Leaving]
Labaleine has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
Labaleine has joined #ruby
hobodave has quit [Ping timeout: 252 seconds]
rkazak has quit [Quit: Sleep.....ing....]
jgt has quit [Ping timeout: 246 seconds]
drewo has joined #ruby
blackmes1 has joined #ruby
dopamean_ has quit [Quit: WeeChat 1.3]
bronson has quit [Ping timeout: 252 seconds]
pickandmix has quit [Ping timeout: 276 seconds]
GioVdK has quit [Remote host closed the connection]
CausaMortis has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skakri has quit [Ping timeout: 246 seconds]
diegoaguilar has joined #ruby
drewo has quit [Ping timeout: 240 seconds]
rodferso1 is now known as rodfersou|lunch
ferr has quit [Quit: WeeChat 1.4]
DanyC has joined #ruby
skakri has joined #ruby
DanyC has left #ruby [#ruby]
Ebok has joined #ruby
slackbotgz has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
rkazak has joined #ruby
devbug has joined #ruby
gunterja_ has joined #ruby
Ebok has quit [Client Quit]
finisherr has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
nes has joined #ruby
nes has quit [Remote host closed the connection]
the_drow has quit [Quit: This computer has gone to sleep]
Labaleine has quit [Read error: Connection reset by peer]
Labaleine has joined #ruby
Guest38 has joined #ruby
Gasher has quit [Quit: Leaving]
diegoviola has joined #ruby
ramfjord has joined #ruby
Gasher has joined #ruby
syath has quit [Quit: WeeChat 1.2]
cschneid_ has joined #ruby
skolman_ has quit [Remote host closed the connection]
<cschneid_>
is there a way to have bundler constraints on .pre1, .pre2? And have bundle update automatically pick up a new .pre?
I has joined #ruby
I has quit [Remote host closed the connection]
<cschneid_>
(and if so, how does it sort?
skolman_ has joined #ruby
Snowy has quit [Remote host closed the connection]
whathappens has joined #ruby
nrd_pxs has joined #ruby
jgpawletko has joined #ruby
charliesome has joined #ruby
<smathy>
cschneid_, the following works with Rails5: ">= 5.0.0.beta1", "< 5.1" - but I'm not sure if they've done something special.
skolman_ has quit [Ping timeout: 260 seconds]
<smathy>
...ie. having those constraints has just installed rc1 with a `bundle update rails`, probably because "r" > "b"
evie_hammond has quit [Quit: WeeChat 1.4]
<cschneid_>
smathy: cool. I have a gem I'm releasing to some customers that'll likely go through several .preN versions. Don't want to get bit if we go from .pre9 to .pre10, and have 10 sort silly.
<cschneid_>
I'll go poke around more - thanks
grenierm has quit [Quit: grenierm]
<smathy>
cschneid_, ah right, yeah, might need 0 prefixes.
htmldrum has joined #ruby
devbug_ has joined #ruby
TomyLobo has joined #ruby
azor has joined #ruby
SilverKey has quit [Quit: Halted.]
jgpawletko has left #ruby [#ruby]
rkazak has quit [Ping timeout: 260 seconds]
Musashi007 has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
devbug has quit [Ping timeout: 252 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
BlacksmithMetash has joined #ruby
<BlacksmithMetash>
i would like some help in a program
whathappens has quit [Remote host closed the connection]
jaruga___ has joined #ruby
Guest38 has quit [Read error: Connection reset by peer]
symm- has joined #ruby
evidex has quit [Remote host closed the connection]
whathappens has joined #ruby
<reppair>
Hello all. I'm using ruby without rails. How can I define a 'section' in .erb file and then yield some html into it from another template.erb? for example: in my main.erb I want to define <title><%= 'section_name' %></title>, and then from another template that I am yielding content in the <body> tag, I also like to yield the title for page from that template.. ?
Musashi007 has quit [Quit: Musashi007]
<|2701>
#rubyonrails probably knows
<reppair>
yeah but it for rails
<hxegon_afk>
reppair: I think you're looking for partials, but |2701 is right
<reppair>
and i am stuck without rails :)
<hxegon_afk>
reppair: yeah, but that channel has more expertise on erb.
aegis3121 has joined #ruby
<reppair>
nop, partials won't work for that
<|2701>
right, this is not the rails channel
<reppair>
well .. as i saied i'm not using rails guys :)
Devalo has joined #ruby
drewo has joined #ruby
minot has joined #ruby
minot has quit [Max SendQ exceeded]
<|2701>
that was literally the first thing you said
<|2701>
oh
<|2701>
re-read it
<|2701>
okay, well they probably know erb better anyways
<reppair>
ahahhaha
djbkd has joined #ruby
<|2701>
:)
<reppair>
and what they said was well ..you are not using rails so ..
<reppair>
well any ideas ?
<|2701>
I'm in the rails channel and I have not seen you ask in there.
whathapp_ has quit [Remote host closed the connection]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grenierm has joined #ruby
jgt has quit [Ping timeout: 250 seconds]
justin_pdx has joined #ruby
kgrz has quit [Ping timeout: 276 seconds]
DanyC has joined #ruby
SilverKey has joined #ruby
JoshGlzBrk has joined #ruby
<horaceheaven>
How do I get the If-None-Match header from the incoming request? for some reason it doesn’t show up in the headers object when I try to do headers[‘if-None-Match’]
bronson has joined #ruby
mdw_ has quit [Quit: Sleeping Zzzzz]
whathappens has joined #ruby
karmatr0n has quit [Ping timeout: 252 seconds]
JoshGlzBrk has quit [Client Quit]
DanyC has quit [Ping timeout: 260 seconds]
whathappens has quit [Remote host closed the connection]
JoshGlzBrk has joined #ruby
karmatr0n has joined #ruby
whathappens has joined #ruby
kareeoleez has joined #ruby
cdg has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
tagaulap has quit [Quit: Connection closed for inactivity]
weemsledeux has joined #ruby
QORRiE has joined #ruby
QORRiE has quit [Max SendQ exceeded]
QORRiE has joined #ruby
<toretore>
horaceheaven: define: incoming request
<toretore>
and "headers object"
blackmes1 has joined #ruby
zenguy_pc has quit [Ping timeout: 260 seconds]
domi has quit [Quit: WeeChat 1.5]
<BlacksmithMetash>
|2701:
<BlacksmithMetash>
i have working with my ruby program
Puffball has quit [Remote host closed the connection]
BlacksmithMetash has quit [Read error: Connection reset by peer]
kgrz has quit [Ping timeout: 250 seconds]
cpup has quit [Ping timeout: 244 seconds]
TomyLobo has joined #ruby
BlacksmithMetash has joined #ruby
jaguarmagenta has joined #ruby
dikaio has joined #ruby
mynameisbrian has joined #ruby
jxs_ has quit [Remote host closed the connection]
<mynameisbrian>
Hey guys. If you're bored, check out this code. Look at the comments at the top to see input/output. I'm new to Ruby, and just wondering if there's a better way to code this small program. https://gist.github.com/anonymous/306f0a1fe2a694c9a0b54ba41e244b71
<mynameisbrian>
Ignore the .py in the first comment. The program was in Python and I converted it to Ruby
<ytti>
it seems fairly idiomatic code
mikecmpbll has joined #ruby
<ytti>
i would personally never write without wrapping inside class
<ytti>
regardless how simple piece of code
jaguarmagenta has quit [Ping timeout: 252 seconds]
rbennacer has quit [Remote host closed the connection]
<ytti>
because when you write without class definitino, you're monkey-patching 'Object' class
cpup has joined #ruby
<ytti>
which can cause all kind of weird side-effects, if you happen to redefine some of its methods, prominently 'send'
<mynameisbrian>
awesome, thanks for the advice
<mynameisbrian>
I'm using Ruby Monk's course to learn
Dimik has joined #ruby
idefine has quit [Remote host closed the connection]
b|ackwolf has quit [Ping timeout: 240 seconds]
<shevy>
hanmac lol
<mynameisbrian>
It's really amazing so far. I'm used to PHP, and this language just makes sense. It's designed really well. I love how everything is an object, and just works that way. Even allowing weird things like 1.*(5), because well, it's an object and it should work even that way
Macaveli has joined #ruby
CoderPuppy has quit [Ping timeout: 260 seconds]
<shevy>
mynameisbrian yeah that problem will go away the more and more code you write. Once you start using classes, and modules, things can always be easily re-usable
whathappens has quit [Remote host closed the connection]
MissionCritical has quit [Ping timeout: 244 seconds]
<mynameisbrian>
yeah totally
nofacade has quit [Ping timeout: 276 seconds]
SilverKey has quit [Quit: Halted.]
blackmes1 has joined #ruby
<mynameisbrian>
I basically want a language that I can become a master of. Right now I just kind of fuck around and use them when I need to. I don't even really know PHP, I just sort of use it and look things up when I need to. I decided that Ruby would be the language I'll learn really well and everything about
<mynameisbrian>
I do know JavaScript well too, but I need a general purpose language
<shevy>
I still would not write it like that, it is just a more or less 1:1 mapping of what you wrote before
<shevy>
in typical "class-thinking", one can use methods to operate on the dataset
<shevy>
and strictly speaking, in that class code, one would not need any @ivars
idefine has joined #ruby
whathappens has joined #ruby
<ytti>
for simple stuff probably just
<ytti>
class Foo
Hobart has left #ruby [#ruby]
<ytti>
def self.bar args
<ytti>
because you want to return stuff, and Foo.new.run is kinda icky for single method stuff
<mynameisbrian>
cool, thanks. yeah the only part of that syntax I don't know so far is the @ for the properties. Otherwise I knew .new and the constructure initialize. I'm just about to read up on classes in this Monk's course
<shevy>
php is actually pretty simple. it's not pretty, not very logical... but I myself found it easier to use than perl oddly enough
<Ox0dea>
mynameisbrian: It's not "bad", but I'd favor Range#step and #map over "explicit" looping and building up a String.
<mynameisbrian>
that's the exact reason why I chose Ruby over Python. I do like Python's one way philosophy. But a language that I want to master... I need more freedom and more fun.
grenierm has quit [Quit: grenierm]
htmldrum has joined #ruby
<Zarthus>
you'll find some ruby developers have a funny way of defining fun
nofacade has joined #ruby
<shevy>
yeah!
dionysus69 has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
scepticulous has quit [Ping timeout: 246 seconds]
Devalo has joined #ruby
<Mon_Ouie>
def fun; end ?
whathappens has quit [Remote host closed the connection]
kgrz has joined #ruby
htmldrum has quit [Ping timeout: 260 seconds]
rodfersou is now known as rodfersou|coffee
haxrbyte has joined #ruby
yfeldblum has quit [Quit: Leaving...]
daftdolphin has quit [Remote host closed the connection]
ta_ has joined #ruby
skade has joined #ruby
Blaguvest has joined #ruby
jaruga___ has joined #ruby
sepp2k has joined #ruby
CoderPuppy has joined #ruby
kgrz has quit [Ping timeout: 246 seconds]
yfeldblu_ has joined #ruby
karmatr0_ has quit [Ping timeout: 260 seconds]
cpup has quit [Ping timeout: 244 seconds]
mooe has joined #ruby
robh71 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rubynuby>
I'm writing an activerecord app with some rspec tests, working with a codeship team. App talks to mysql via activerecord. There's a single piece of code which runs a query, and a single rspec tests that passes (testing the result of that query). But when I push to codeship it fails because it can't connect to mysql. My question is... how can I emulate the codeship bundle exec rspec tests (or is it the same as my local command)
dopamean_ has joined #ruby
<rubynuby>
And the more important question is, how can I write a rspec test that passes without a database, I've gathered from googling that I will need class_double or maybe mysql double, but beyond that I haven't been able to find any pointers or examples... and I can't get it to pass my rspec test in 'codeship/offline' mode.. Any pointers/clues are welcome
raeoks has quit [Ping timeout: 260 seconds]
djbkd has quit [Remote host closed the connection]
aegis3121 has joined #ruby
Devalo has quit [Remote host closed the connection]
bronson has quit [Remote host closed the connection]
<mynameisbrian>
>> language = 'ruby'; puts 'fun' unless language == 'PHP'
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
grenierm has joined #ruby
Lomex has quit [Remote host closed the connection]
stannard has joined #ruby
stannard has quit [Remote host closed the connection]
<tubbo>
lol
jenrzzz has joined #ruby
patrick99e99 has joined #ruby
Coldblackice has joined #ruby
blackmes1 has quit [Ping timeout: 246 seconds]
blackmes1 has joined #ruby
edwinvdgraaf has joined #ruby
voodoofish430 has joined #ruby
workmad3 has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<patrick99e99>
hey everyone.. I have some custom middleware in my rails app which is just doing @app.call(env), and this blows up if my original request url has quotes in it. However if prior to @app.call(env) i do: ["PATH_INFO", "ORIGINAL_FULLPATH", "SCRIPT_URL", "SCRIPT_URI", "REQUEST_URI"].each { |k| env[key] = URI.escape(env[key]), then that fixes the problem.. but it seems really horrible that I have to manually escape all those values..
<patrick99e99>
Is there any other way to force the env object to be escaped prior to the rack app getting it?
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
bobbycvi has joined #ruby
minimalism has quit [Quit: minimalism]
karmatr0n has quit [Ping timeout: 240 seconds]
jud has quit [Ping timeout: 265 seconds]
<smathy>
Just throw 400s until that asshat client sorts its shit out.
minimalism has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<patrick99e99>
havenwood: yeah-- I saw those, but that doesn't explain how to use it.. "use" is undefined method inside my rack app's call method.
<havenwood>
patrick99e99: You're doing it in your config.ru file like the examples? I've got to run out for a minute but I'm sure others here or in the #rubyonrails channel can help.
<patrick99e99>
oh.. not I don't have a .ru in my rails app.. I just am manually inserting this rack app as middleware
<havenwood>
patrick99e99: Err, you don't have a config.ru in your Rails app? Are you sure?
<havenwood>
patrick99e99: It's part of a default Rails app. I guess you may have renamed it? Dunno. Maybe ask in #rubyonrails and just let them know you're crossposting from here.
<patrick99e99>
oops.. yeah i guess i do.
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramortegui has quit [Quit: Ex-Chat]
<patrick99e99>
ok, thanks for your help havenwood
<havenwood>
patrick99e99: you're welcome
<havenwood>
patrick99e99: happy coding!
Puffball has quit [Ping timeout: 250 seconds]
jdawgaz has joined #ruby
symm- has joined #ruby
millerti has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 260 seconds]
Gasher has quit [Ping timeout: 246 seconds]
rbennacer has quit [Ping timeout: 252 seconds]
banister is now known as banisterfiend
banisterfiend has quit [Changing host]
banisterfiend has joined #ruby
BtcBen has joined #ruby
BtcBen has left #ruby [#ruby]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
kareeoleez has quit [Remote host closed the connection]
QORRiE has quit [Quit: Leaving]
skalfyfan has joined #ruby
whathapp_ has quit [Remote host closed the connection]
elifoster has quit [Ping timeout: 244 seconds]
kareeoleez has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whathappens has quit [Remote host closed the connection]
<benlieb>
I've been tasked with using Brakeman (vulnerability analyzer) on code I didn't write. It has rightly identified the following line as a possible command injection vulnerability. system("zip -q -j -0 \"#{tmp_zip}\" #{created_zips}")
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zrl_ has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
al2o3-cr has joined #ruby
drewo has joined #ruby
hobodave has quit [Ping timeout: 276 seconds]
Puffball has joined #ruby
Trynemjoel has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
jdawgaz has joined #ruby
whathapp_ has quit [Remote host closed the connection]
skolman_ has quit [Remote host closed the connection]
skolman has joined #ruby
whathappens has joined #ruby
jancel has quit [Remote host closed the connection]
whathapp_ has joined #ruby
skolman has quit [Remote host closed the connection]
skolman has joined #ruby
<jenrzzz>
do you guys think rubygems.org executes gemspecs or just statically parses them? i'm wondering how they find the runtime depenendencies to show on the gem page
LastWhisper____ has quit [Ping timeout: 265 seconds]
devbug_ has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 260 seconds]
aegis3121 has quit [Ping timeout: 252 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jancel has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.4]
Puffball has joined #ruby
whathapp_ has quit [Remote host closed the connection]
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skalfyfan has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
freerobby has joined #ruby
skalfyfan has quit [Client Quit]
devbug has joined #ruby
sp4rrow has joined #ruby
cstrahan has quit [Ping timeout: 244 seconds]
Drakx has joined #ruby
cstrahan has joined #ruby
nando293921 has joined #ruby
zenlot has joined #ruby
Puffball has quit [Ping timeout: 260 seconds]
rbennacer has joined #ruby
zenlot6 has quit [Ping timeout: 246 seconds]
symm- has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
Oog has joined #ruby
drewo has quit [Ping timeout: 260 seconds]
devbug has quit [Ping timeout: 260 seconds]
whathappens has quit [Quit: Leaving...]
devbug has joined #ruby
yfeldblum has quit [Remote host closed the connection]
pietr0 has quit [Quit: pietr0]
idefine has quit [Ping timeout: 276 seconds]
benlieb has quit [Quit: benlieb]
whathappens has joined #ruby
nerium has quit [Quit: nerium]
kareeoleez has quit [Remote host closed the connection]
nerium has joined #ruby
Oog has quit []
Yiota_ has joined #ruby
Yiota has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: goinhome]
|2701 has joined #ruby
whathappens has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving]
PlasmaStar has quit [Ping timeout: 250 seconds]
EdwardIII has quit [Ping timeout: 240 seconds]
d5sx43 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
polishdub has quit [Quit: Leaving]
yfeldblum has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
PlasmaStar has joined #ruby
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
EdwardIII has joined #ruby
zacstewart has quit [Ping timeout: 240 seconds]
CausaMortis has joined #ruby
d5sx43 has quit [Client Quit]
Puffball has joined #ruby
Labaleine has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
mozzarella has quit [Quit: WeeChat 1.4]
jaguarmagenta has joined #ruby
crystal77 has joined #ruby
GodFather has joined #ruby
chopin has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
JoshGlzBrk has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Oog has joined #ruby
rbennacer has quit [Remote host closed the connection]
jenrzzz has joined #ruby
kddeisz has joined #ruby
`tim` has joined #ruby
whathappens has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
<kddeisz>
Hi everyone! I'm writing my first C extension any had a question. My function is pretty simple, it just does some basic char* manipulation. I get the char* from a ruby string by doing `char *orig_str = rb_string_value_cstr(&str);`. The problem is the function could also be called with a symbol. Anyone know the right way to convert it over?
jancel has joined #ruby
rbennacer has joined #ruby
JoshGlzBrk has quit [Client Quit]
<kddeisz>
(I've tried `rb_any_to_s` but that doesn't seem to work like I thought it would...)
edwinvdgraaf has quit [Remote host closed the connection]
EdwardIII has quit [Ping timeout: 260 seconds]
rbennacer has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
LaT0rtue has joined #ruby
crdpink2 has joined #ruby
cschneid_ has quit [Remote host closed the connection]
crdpink has quit [Ping timeout: 250 seconds]
LaT0rtue has quit [Read error: Connection reset by peer]
Yiota has joined #ruby
EdwardIII has joined #ruby
Cohedrin has quit [Client Quit]
Labaleine has quit [Remote host closed the connection]
d5sx43 has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jobewan has quit [Ping timeout: 276 seconds]
chopin has joined #ruby
Cohedrin has joined #ruby
Yiota has quit [Ping timeout: 276 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
JoshGlzBrk has joined #ruby
xall has quit [Ping timeout: 244 seconds]
dn` has quit [Ping timeout: 246 seconds]
charliesome has quit [Read error: Connection reset by peer]
saneax_AFK is now known as saneax
drewo has joined #ruby
sneakerhax has quit [Read error: Connection reset by peer]
weemsledeux has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]