<unstable>
I'm basically looking for a simple rake route with a controller pointing to controller#create, then in def create is the respond_to format.json stuff from params. Then some javascript client side that throws a simple html form.
<unstable>
A simple example, then I can change/tweak it how I want.
<dpt89>
the problem is it's not picking up that ruby 193 is present
mockra has joined #ruby
<dpt89>
some people report it as a bug of a gem, other just saw it go away. A rails app using similar code to boot works perfectly. But this one won't! It's too short and I just don't know what else to do.
cableray has joined #ruby
<dpt89>
any ideas nixterrimus ?
<Hanmac1>
dpt89: your shebang is wrong
<nixterrimus>
Is ruby really at /usr/bin/ruby
<dpt89>
I see, let me check
<Hanmac1>
this #!/usr/bin/ruby need to be changed to #!/usr/bin/env ruby
<nixterrimus>
What does which ruby say
<nixterrimus>
Right, that's better
Scriptwriter has quit [Quit: Things are more like they are now than they have ever been before.]
<Hanmac1>
nixterrimus: if he use /usr/bin/ruby than he bypass the rbenv installed one and picks directly the system ruby
akashj87 has joined #ruby
chussenot has quit [Quit: chussenot]
<nixterrimus>
hanmac1: good point
kimteq has quit [Remote host closed the connection]
yxhuvud has joined #ruby
cableray has quit [Client Quit]
<dpt89>
that was it! I added the missing /env before ruby
<dpt89>
and it run
<dpt89>
such a detail but I was so blocked
<nixterrimus>
dpt89: huzzah! Glad it worked
<dpt89>
thank you be very much
ehaliewicz has quit [Read error: Connection reset by peer]
<dpt89>
thanks Hanmac1 & nixterrimus
<dpt89>
now, I'll go get back to trying to rock my countries e-commerce with ruby ;)
<dpt89>
thanks a lot for your assistance
<dpt89>
have an amazing night
<dpt89>
goodbye
<Hanmac1>
e-commerce ... *schauder* ...
ekampf has joined #ruby
Domon has joined #ruby
<alainus>
e-commerce ... just make it social
<dpt89>
hahha
* Hanmac1
is mostly an asocial person ...
<dpt89>
it's actually a payment solution for a country without a way to make a simple credit card charge eonline
<nixterrimus>
That's funny because I actually work on social ecommerce all day
<dpt89>
we're not paypal material
vikhyat has quit [Remote host closed the connection]
tommyvyo has quit [Quit:]
<alainus>
yeah but you don't expect websites without profiles and other social capabilities anymore
<dpt89>
so, we're just rolling our own
yxhuvud2 has quit [Ping timeout: 276 seconds]
<Hanmac1>
i prefer to use ruby for RPG games or window GUI or 3D stuff
<dpt89>
more like stripe. We're working on e-commerce infrastructure
<alainus>
Hanmac, how about for music ?
rippa has joined #ruby
sayan has joined #ruby
<alainus>
I found Overtone, but it's clojure (github/overtone/overtone)
<Hanmac1>
alainus: hm .. with one of my stuff i could make an MediaPlayer in ruby ... but i am not so a musican ... i tryed some stuff with Rosegarden, but it was not so much successful
<w1ntermu1e>
Anyone know where I can find an offical list off Ruby reserved words, I can't find the right voodoo to put in ri
banjara has quit [Quit: Leaving.]
bitcycle has quit [Ping timeout: 245 seconds]
dpt89 has quit [Quit: dpt89]
<alainus>
it would be nice. there are gems for note formatting, though. all it takes is plug it with the sound card
<w1ntermu1e>
Mon_Ouie: I stumbled across that, but its difficult to tell if its complete
<Mon_Ouie>
(rdoc is meant to document classes/modules, not language-level features)
thone has joined #ruby
<w1ntermu1e>
Mon_Ouie: Ah that makes more sense then
nezumi has joined #ruby
<Hanmac1>
alainus: you should checkout Rosegarden ... it is very cool
passerine has joined #ruby
lethjakman has joined #ruby
lethjakm1 has quit [Ping timeout: 258 seconds]
V8Energy has quit [Ping timeout: 245 seconds]
coder_neo has quit [Ping timeout: 240 seconds]
vikhyat has joined #ruby
vlad_starkov has joined #ruby
pablo_ has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
gabrielrotbart has quit [Ping timeout: 245 seconds]
tjbiddle_ has joined #ruby
freezway has joined #ruby
banjara has joined #ruby
<alainus>
Hanmac, can you program it ?
sambio has quit []
<Hanmac1>
alainus: you mean Rosegarden or an MediaPlayer in ruby?
shin has quit [Quit: Computer has gone to sleep.]
gabrielrotbart has joined #ruby
tjbiddle has quit [Ping timeout: 272 seconds]
tjbiddle_ is now known as tjbiddle
girija has joined #ruby
freeayu has quit [Ping timeout: 246 seconds]
freeayu has joined #ruby
nixterrimus has quit [Quit: leaving]
<jeevan_ullas>
hi all
<jeevan_ullas>
i have a if block in a while loop, in which i break
jamesfung14 has quit [Ping timeout: 272 seconds]
<jeevan_ullas>
how do i get value of a variable inside that if block outside the loop
ttt_ has joined #ruby
brianpWins has joined #ruby
<Hanmac1>
alainus: MediaPlayer: with wxWidgets and my binding rwx i can use the MediaCtrl that can play music and videos on linux for sample it used gstreamer so it can play anything gst can play
<Mon_Ouie>
You define it in the enclosing scope instead of in the loop's scope
ttt has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<Hanmac1>
jeevan_ullas: break does have an posibility for returning an value: val = each {|o| break o}
wallerdev has quit [Quit: wallerdev]
cherrypeel has joined #ruby
browndawg has left #ruby [#ruby]
psyprus has quit [Read error: Connection reset by peer]
chandankumar has joined #ruby
poga has quit [Ping timeout: 272 seconds]
<jeevan_ullas>
ok
ananthakumaran has quit [Quit: Leaving.]
NiteRain has joined #ruby
philcrissman has quit [Remote host closed the connection]
psyprus has joined #ruby
andikr has joined #ruby
V8Energy has joined #ruby
browndawg has joined #ruby
chandankumar has quit [Ping timeout: 256 seconds]
okinomo has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
DonRichie has quit [Quit: Verlassend]
rismoney has quit [Read error: Connection reset by peer]
rezzack has quit [Ping timeout: 264 seconds]
generalissimo has joined #ruby
mayankkohaley has joined #ruby
Morkel has joined #ruby
Astralum has quit [Read error: Connection reset by peer]
chandankumar has joined #ruby
Astralum has joined #ruby
randomautomator has quit [Read error: Connection reset by peer]
nomenkun has quit [Remote host closed the connection]
banjara has quit [Client Quit]
kuzushi has quit [Ping timeout: 258 seconds]
banjara has joined #ruby
yxhuvud2 has joined #ruby
keymone has joined #ruby
yacks has quit [Ping timeout: 258 seconds]
yacks has joined #ruby
vlad_starkov has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
yxhuvud has quit [Ping timeout: 272 seconds]
tjbiddle has quit [Quit: tjbiddle]
yacks has quit [Max SendQ exceeded]
banjara has quit [Client Quit]
yacks has joined #ruby
banjara has joined #ruby
vanstee has quit [Quit: Computer has gone to sleep.]
mayankkohaley has quit [Ping timeout: 258 seconds]
workmad3 has joined #ruby
Hanmac1 has quit [Quit: Leaving.]
mayankkohaley has joined #ruby
rickruby has quit [Remote host closed the connection]
sayan has joined #ruby
Vainoharhainen has joined #ruby
dmiller has joined #ruby
nomenkun has joined #ruby
jonahR has quit [Quit: jonahR]
Morkel_ has joined #ruby
timonv has joined #ruby
Morkel has quit [Ping timeout: 264 seconds]
Morkel_ is now known as Morkel
Elhu has joined #ruby
Asher has quit [Quit: Leaving.]
skroon has quit [Ping timeout: 256 seconds]
Asher has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
Vainoharhainen has quit [Quit: Leaving...]
<dawkirst>
What's the difference between Foo.bar and Foo#bar?
passerine has quit [Quit: Ex-Chat]
mvangala has joined #ruby
Inv1s1ble has quit [Read error: Connection reset by peer]
three18ti has quit [Read error: Operation timed out]
Tarential has quit [Read error: Operation timed out]
anekos has quit [Read error: Operation timed out]
bradhe has joined #ruby
Inv1s1ble has joined #ruby
guardian has left #ruby [#ruby]
Nanuq has quit [Read error: Operation timed out]
Sigma00 has quit [Ping timeout: 252 seconds]
kuzushi has joined #ruby
faulkner has quit [Ping timeout: 264 seconds]
ahuman has quit [Quit: No Ping reply in 180 seconds.]
Bosox20051 has quit [Quit: Leaving]
anekos has joined #ruby
Nanuq has joined #ruby
tomzx_mac has quit [Ping timeout: 272 seconds]
shock_one has joined #ruby
security is now known as megha
Chinorro has joined #ruby
ahuman has joined #ruby
failshell has quit [Remote host closed the connection]
miso1337_ has joined #ruby
three18ti has joined #ruby
noop has quit [Ping timeout: 248 seconds]
zodiak has quit [Ping timeout: 256 seconds]
goraxe has quit [Ping timeout: 264 seconds]
rking has quit [Ping timeout: 256 seconds]
banjara has quit [Quit: Leaving.]
angusiguess has joined #ruby
Tarential has joined #ruby
dmiller_ has joined #ruby
pasties has quit [Ping timeout: 252 seconds]
callmeivan has quit [Ping timeout: 264 seconds]
banjara has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
gabrielrotbart has quit [Remote host closed the connection]
faulkner has joined #ruby
adam12 has quit [Ping timeout: 256 seconds]
rednar has joined #ruby
classix has quit [Ping timeout: 252 seconds]
Sigma00 has joined #ruby
goraxe has joined #ruby
rednar has quit [Client Quit]
banjara has quit [Client Quit]
workmad3 has quit [Read error: Operation timed out]
miso1337 has quit [Ping timeout: 276 seconds]
miso1337_ is now known as miso1337
yellow5 has quit [Ping timeout: 264 seconds]
fschuindt has joined #ruby
classix has joined #ruby
adam12 has joined #ruby
Hanmac1 has joined #ruby
banjara has joined #ruby
noop has joined #ruby
zodiak has joined #ruby
Vainoharhainen has joined #ruby
jpun has quit [Read error: Operation timed out]
jpun has joined #ruby
cmyers_ has quit [Ping timeout: 256 seconds]
rton has joined #ruby
callmeivan has joined #ruby
yellow5 has joined #ruby
dmiller_ has quit [Remote host closed the connection]
anekos has quit [Ping timeout: 245 seconds]
cmyers has joined #ruby
Ibuprofen has quit [Ping timeout: 245 seconds]
epochwolf has quit [Ping timeout: 245 seconds]
BombStrike has quit [Excess Flood]
pasties has joined #ruby
a_a_g has joined #ruby
iamvery has quit [Remote host closed the connection]
jokke_ has joined #ruby
unstable has quit [Ping timeout: 246 seconds]
speakingcode has quit [Ping timeout: 264 seconds]
clocKwize has joined #ruby
angusiguess has quit [Ping timeout: 276 seconds]
Ibuprofen has joined #ruby
okinomo has quit [Quit: okinomo]
BombStrike has joined #ruby
<jokke_>
hey! I'm new to rspec and i'm wondering about the output i get when running my tests: All examples were filtered out; ignoring {:focus=>true}
speakingcode has joined #ruby
<jokke_>
does this mean, the tests weren't actually run?
anekos has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
MisterPostIT has joined #ruby
vlad_starkov has joined #ruby
rking has joined #ruby
epochwolf has joined #ruby
yamez has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
unstable has joined #ruby
LnL has quit [Quit: LnL]
banjara has quit [Quit: Leaving.]
<jokke_>
hello? :)
huoxito has quit [Quit: Leaving]
banjara has joined #ruby
<MisterPostIT>
hi there
<jokke_>
hi MisterPostIT
<MisterPostIT>
whats up
filipe has joined #ruby
jlebrech has joined #ruby
<jokke_>
wondering about my rspec output
jlebrech has quit [Remote host closed the connection]
callmeivan_ has joined #ruby
<jokke_>
And sitting in a script-languages class
banjara has quit [Client Quit]
LnL has joined #ruby
banjara has joined #ruby
<MisterPostIT>
xD okay… what about the output? and what language - not ruby i guess?! xD
callmeivan_ has quit [Client Quit]
<jokke_>
yes ruby
<jokke_>
All examples were filtered out; ignoring {:focus=>true}
jarin has joined #ruby
<jokke_>
rspec is a testing suite for ruby
rednar has joined #ruby
<jokke_>
worth looking at, if you don't know it
<MrZYX>
did you get some (green) dots?
<jokke_>
yes
<jokke_>
MrZYX: 24 examples, 0 failures
<MrZYX>
each one is a passing test
vikhyat has quit [Remote host closed the connection]
<jokke_>
i know but i'm confused about the "ignoring" bit.
speakingcode has quit [Ping timeout: 256 seconds]
<jokke_>
sounds like it's kinda skipping the tests
<MrZYX>
you can give tests a tag and filter a run by these
tagrudev has joined #ruby
<MrZYX>
there's a default one called focus
unflores has joined #ruby
<jokke_>
oh i see
callmeivan has quit [Ping timeout: 252 seconds]
<MrZYX>
that is set
<MrZYX>
but none of your tests has it
<jokke_>
aha!
<MrZYX>
so it would filter all
<jokke_>
how do i add it?
<MrZYX>
and therefore ignores the tag
blacktulip has joined #ruby
<MrZYX>
you don't need to
<jokke_>
hm?
robscomputer_ has quit [Ping timeout: 246 seconds]
<jokke_>
yeah, sounds counterproductive
speakingcode has joined #ruby
<jokke_>
should be the other way round. I add something like :focus => false if i don't want to run it
<MrZYX>
it's there so if you're working on a specific (set) of tests, you can add it, so it matches some and isn't ignored, and then only these are run
<jokke_>
ok
generalissimo is now known as false_flag
Gabri has joined #ruby
<MrZYX>
try adding it to one and look how the output changes
<jokke_>
so.. how exactly do i tell rspec not to ignore any of my tests?
<jokke_>
ok
<MrZYX>
again, it ignores the tag, not the tests
shin has joined #ruby
shin has quit [Client Quit]
mattbl has joined #ruby
<jokke_>
huh?
<jokke_>
wat
banjara has quit [Quit: Leaving.]
<MrZYX>
try changing one of your tests to it "....", :focus do ....
<jokke_>
i added it to one describe block and now just 7 examples are run
<MrZYX>
yup
<jokke_>
alright
<MrZYX>
and that's exactly purpose
<jokke_>
i see
banjara has joined #ruby
<jokke_>
so i can "focus" on some tests
<MrZYX>
yup
Elhu has quit [Quit: Computer has gone to sleep.]
<jokke_>
cool
<MrZYX>
if you look into your spec/spec_helper.rb
keymone has quit [Quit: keymone]
bradhe has quit [Remote host closed the connection]
<MrZYX>
config.filter_run :focus
<MrZYX>
there it's defined
banjara has quit [Client Quit]
<jokke_>
aye
shin has joined #ruby
<jokke_>
i see
shin is now known as echoez
<MrZYX>
you can also dynamically add some with commandline flags
<jokke_>
oh and config.run_all_when_everything_filtered = true
<MrZYX>
yup
<jokke_>
then it makes sense
banjara has joined #ruby
<jokke_>
that's very nice
<jokke_>
how would i define a filter from command line?
coder_neo has joined #ruby
ferdev has quit [Quit: ferdev]
<MrZYX>
have look at rspec --help
<MrZYX>
there's a whole section about filtering
<jokke_>
ah t
<jokke_>
cool
shock_one has quit [Ping timeout: 276 seconds]
v0n has quit [Ping timeout: 258 seconds]
skroon has joined #ruby
vikhyat has joined #ruby
browndawg has quit [Ping timeout: 272 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
banjara has quit [Quit: Leaving.]
yxhuvud has joined #ruby
banjara has joined #ruby
tjbiddle has joined #ruby
banjara has quit [Client Quit]
timonv has quit [Remote host closed the connection]
gstamp has quit [Quit: Computer has gone to sleep.]
beneggett has quit [Quit: Computer has gone to sleep.]
enriclluelles has joined #ruby
banjara has quit [Quit: Leaving.]
ioNull has joined #ruby
threesome has joined #ruby
rickruby has quit [Ping timeout: 255 seconds]
banjara has joined #ruby
s2013 has quit []
ariedler has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
GOMADWarrior has quit [Ping timeout: 256 seconds]
<celinedior>
: hi everyone. does anybody have experience compiling ruby with openssl support via ruby-build at fresh centos 6.2 linode? spent almost two days on it with no luck
<celinedior>
compiled opensssl with ./config --prefix=/usr/local/ossl/
<celinedior>
and then RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/ossl" rbenv install 1.9.3-p392
<injekt>
pagios: it's not well documented, it's not easy to setup, and it's rare people use it so it's hard to get feedback from, it's also buggy in places and doesn't get much attention
poga has quit [Remote host closed the connection]
JonnieCache has joined #ruby
<pagios>
so sinatra?
<injekt>
sure
<injekt>
there's a lot of options, if you're not familiar with rack or something lower level, sinatra is great
<pagios>
on html button click -> submit to sinatra
niklasb has joined #ruby
bradhe has joined #ruby
<pagios>
you mean with an href
troessner has joined #ruby
[eDu] has joined #ruby
<marwinism>
in sinatra, you could do something like: get '/form' do (and the handle all the input from the form, and handle that) and do form action="foo.com/form"
buibex has joined #ruby
LongLiveBacon has quit [Ping timeout: 264 seconds]
caleb_io has joined #ruby
caleb_io is now known as 65MAATXDU
<pagios>
ok
bradhe has quit [Ping timeout: 264 seconds]
lkba has quit [Read error: Connection reset by peer]
<MrZYX>
you can set the bind from your app too, yeah
<pagios>
set :bind, 'localhost'
tevio has joined #ruby
<pagios>
ok cool works
buibex has quit [Remote host closed the connection]
yacks has quit [Read error: Operation timed out]
nomenkun has joined #ruby
hmarr has joined #ruby
poga has quit [Remote host closed the connection]
<pagios>
so it is good security measure to accept on sinatra some kind of html form, based on that execute some shell commands locally and result some result results to the html client
<pagios>
result codes*
<MrZYX>
if you don't run sinatra as root and put some form of authentication before it ;P
<MrZYX>
yet better whitelist the allowed commands on the server side
<Xeago>
pagios: looks like you are exposing a shell over http
<Xeago>
there are already solutions for this
<Xeago>
which have proper authentication, for example using client certificates
<csmrfx>
run ruby as root, expose shell over http?
<csmrfx>
uh oh
<JonnieCache>
its a party!
wargasm has quit [Ping timeout: 264 seconds]
chussenot has joined #ruby
nomenkun_ has joined #ruby
robustus has quit [Ping timeout: 248 seconds]
notVert has joined #ruby
<pagios>
hehe
<pagios>
actually i will check the form input and only allow some commands to be sent to shell
<pagios>
ruby will be running sinatra as non root for sure
MisterPostIT has quit []
Vert has quit [Ping timeout: 252 seconds]
<pagios>
its actually a very static mapping, form data1 -> command 1 form data2 -> command 2 done
robustus has joined #ruby
MisterPostIT has joined #ruby
<pagios>
but i wanted to consult with you if it is a secure way of doing it
<csmrfx>
&& zzzrm -rf / ?
<csmrfx>
lol
<MrZYX>
if you do not interpolate any client input it should be okay
nomenkun has quit [Ping timeout: 264 seconds]
_whitelogger has joined #ruby
nathanieldavid has joined #ruby
vlad_sta_ has joined #ruby
<pagios>
actually i can publish the form on apache, allow sinatra on localhost same as apache webserver so only apache(as client) is accepted
nari has quit [Ping timeout: 245 seconds]
<MrZYX>
hm?
vlad_sta_ has quit [Remote host closed the connection]
<pagios>
this way i wouldnt be allowing any client to send that form request if if authentication is bypassed
<MrZYX>
you mean reverse proxy sinatra through apache?
vlad_sta_ has joined #ruby
yacks has joined #ruby
<pagios>
apache hosts the html form, sinatra runs at the same time on that host and only accepts connection from localhost ( apache)
Proshot has joined #ruby
<csmrfx>
you need to use ssh for what it is intended to be used for
<MrZYX>
you can also run it with passenger so you can uses apaches basic auth features
65MAATXDU has quit [Quit: 65MAATXDU]
<pagios>
yea that would be nice, have an apache authentication first
atno has quit [Read error: Connection reset by peer]
poga has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
poga has joined #ruby
rton has left #ruby [#ruby]
rton has joined #ruby
atno has joined #ruby
JohnBat26 has joined #ruby
banjara has quit [Quit: Leaving.]
angusiguess has joined #ruby
banjara has joined #ruby
slainer68 has quit [Remote host closed the connection]
banjara has quit [Client Quit]
banjara has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
banjara has quit [Client Quit]
Heero has quit [Ping timeout: 245 seconds]
BizarreCake has joined #ruby
banjara has joined #ruby
banjara has quit [Client Quit]
io_syl has quit [Quit: Computer has gone to sleep.]
dr_bob has joined #ruby
banjara has joined #ruby
angusiguess has quit [Ping timeout: 264 seconds]
timmow_ has joined #ruby
banjara has quit [Client Quit]
akashj87 has joined #ruby
banjara has joined #ruby
shevy2 has joined #ruby
rton has left #ruby [#ruby]
timmow_ has quit [Ping timeout: 252 seconds]
atno has quit [Remote host closed the connection]
tuning_ has quit [Remote host closed the connection]
davetherat has quit [Remote host closed the connection]
celinedior has quit [Quit: celinedior]
davetherat has joined #ruby
timmow has quit [Remote host closed the connection]
timmow has joined #ruby
timmow has quit [Read error: Connection reset by peer]
AlSquire has quit [Read error: Connection reset by peer]
AlSquire has joined #ruby
timmow has joined #ruby
poga has quit [Remote host closed the connection]
maxmanders has quit [Ping timeout: 264 seconds]
camilasan has joined #ruby
baphled has joined #ruby
swex has quit [Ping timeout: 276 seconds]
jokke_ has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
dustint has joined #ruby
vlad_starkov has joined #ruby
bradhe has joined #ruby
chussenot has quit [Quit: chussenot]
<jokke_>
hey! what would be a more elegant way of doing this: array = []; n.times { array << my_method }; array; ?
dr_bob has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
iamjarvo has joined #ruby
<injekt>
Array.new(n, my_method)
<jokke_>
injekt: awesome!
a_a_g has quit [Quit: This computer has gone to sleep]
pcarrier has joined #ruby
bradhe has quit [Ping timeout: 255 seconds]
yxhuvud has joined #ruby
sayan has joined #ruby
yxhuvud2 has quit [Ping timeout: 245 seconds]
xpen has quit [Remote host closed the connection]
<ohcibi>
hi i have this xpath: //li[contains(./div/text(), "Text")]/div/div/input[@value=1]' however it wont find input fields that have a value of 1.. a value of 0 is working though.. anybody has an idea whats wrong?
<injekt>
octarine: make sure you quote the 1
yalue has joined #ruby
celinedior has joined #ruby
<ohcibi>
injekt: its ohcibi, but nope... this is not helping
<injekt>
oops sorry octarine
<ohcibi>
injekt: still ohcibi 8-)
<ohcibi>
injekt: there is an h between o and c
coder_neo has quit [Read error: Connection reset by peer]
<injekt>
ohcibi: yes I was apologising to octarine
<ohcibi>
anyways... the xpath is not working for 1.. neither without nor with single, nor with double quotes..
<ohcibi>
injekt: its kinda hard... could we not assume that the html is appropriate as the xpath is findint the element with @value=0?
ioNull has joined #ruby
chandankumar has quit [Client Quit]
<ohcibi>
the value is set by js... so you could just imagina an arbitrary input field that has value of 1
emergion has joined #ruby
<ohcibi>
within this path
<injekt>
ohcibi: that's exactly what tells me the html is NOT appropriate
<injekt>
what are you using to run the js in your tests?
<ohcibi>
injekt: capybara-webkit
<injekt>
ohcibi: maybe that's the problem, the js isn't being executed?
<ohcibi>
injekt: see my gist
<ohcibi>
injekt: the value is actually 1
<injekt>
eh
<ohcibi>
the xpath isnt working
security is now known as megha
<injekt>
then I'm not sure, there's no reason it shouldn't work. The xpath is valid for the correct html so something else must be going funky
ToApolytoXaos has joined #ruby
camilasan has quit [Remote host closed the connection]
F1skr has joined #ruby
yacks has quit [Ping timeout: 252 seconds]
pi3r has quit [Ping timeout: 248 seconds]
camilasan has joined #ruby
filipe has quit [Ping timeout: 272 seconds]
okinomo has quit [Quit: okinomo]
banister`sleep has quit [Remote host closed the connection]
krz has quit [Quit: krz]
<jokke_>
injekt: i just realized, your suggestion doesn't work as i expect it to, because it calls the method only once and fills the array with the result.
<injekt>
jokke_: right, your method returns different values every time?
<jokke_>
like this it works: Array.new(n).fill { my_method }
<jokke_>
yup
<injekt>
ah, that's odd (to do that) so I didn't expect it :)
<jokke_>
it's a homework assignment for a lotto number generator..
<injekt>
>> Array.new(4) { (1..10).sample }
<eval-in>
injekt => /tmp/execpad-605a38f6bd1c/source-605a38f6bd1c:2:in `block in <main>': undefined method `sample' for 1..10:Range (NoMethodError) ... (http://eval.in/16819)
<injekt>
>> x = ->{(1..10).to_a.sample}; Array.new(4, &x)
<eval-in>
injekt => /tmp/execpad-3cc3484a061c/source-3cc3484a061c:2:in `block in <main>': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/16822)
mayankkohaley has quit [Ping timeout: 256 seconds]
[eDu] has quit [Quit: [eDu]]
slainer68 has joined #ruby
moos3 has quit [Quit: Computer has gone to sleep.]
camilasa_ has joined #ruby
lukeholder has quit [Ping timeout: 255 seconds]
bhaarat has joined #ruby
rton has joined #ruby
hogeo has quit [Remote host closed the connection]
afd__ has quit [Ping timeout: 248 seconds]
pi3r has joined #ruby
filipe has joined #ruby
moos3 has joined #ruby
camilasan has quit [Ping timeout: 260 seconds]
vlad_sta_ has joined #ruby
browndawg has joined #ruby
bhaarat has quit [Quit: bhaarat]
vlad_sta_ has quit [Remote host closed the connection]
timmow_ has joined #ruby
LnL has joined #ruby
banister`sleep has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
fasta has quit [Quit: No Ping reply in 180 seconds.]
fasta has joined #ruby
V8Energy has quit [Ping timeout: 260 seconds]
wmoxam has joined #ruby
timmow_ has quit [Ping timeout: 252 seconds]
<jokke_>
can i somehow pass a block forward in my method?
guardian has joined #ruby
mikalv has quit [Ping timeout: 245 seconds]
<JonnieCache>
jokke_: you can access it as a proc object by calling &block
<guardian>
hello, can I use other delimiters than /.../ and %r{...} for regexes?
<jokke_>
(a block that my method accepts)
<jokke_>
JonnieCache: ah ok
<injekt>
guardian: %r allows you do specify your own delimiters
<JonnieCache>
guardian: or you can pass a string into Regexp.new
<guardian>
ok so it's rather %r|…| than |…|
zetaspartan2552 has joined #ruby
girija has left #ruby ["Ex-Chat"]
girija has joined #ruby
ananthakumaran1 has joined #ruby
<injekt>
yes
<guardian>
I have another question. I have an instance of an object: foo = Foo.new. I can def foo.bar … end. Now how can I rename bar to old_bar before redefining it?
nari has joined #ruby
<Hanmac2>
guardian: class << foo; alias old_bar bar; end
<joshu>
ok I'm trying to structure my sinatra app and those two lines came from two different example config.ru files
bradhe has joined #ruby
LnL has quit [Quit: LnL]
jarin has quit [Quit: WeeChat 0.4.0]
arya has joined #ruby
LaPetiteFromage has joined #ruby
razibog has quit [Quit: Leaving.]
ferdev has quit [Ping timeout: 264 seconds]
ferdev has joined #ruby
chussenot has joined #ruby
nari has quit [Ping timeout: 256 seconds]
maxmanders has joined #ruby
iamjarvo has quit [Quit: Leaving.]
bradhe has quit [Ping timeout: 264 seconds]
yxhuvud2 has joined #ruby
mark_locklear has quit [Quit: Leaving]
codenapper has joined #ruby
braoru has quit [Ping timeout: 258 seconds]
spoonman has joined #ruby
fermion has joined #ruby
dustint has quit [Quit: Leaving]
xcv has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
<spike|spiegel>
joshu: no, they are not the same
angusiguess has joined #ruby
yxhuvud has quit [Ping timeout: 256 seconds]
<jokke_>
how do i test methods that yield a block passed to them?
<spike|spiegel>
2nd one is relative to working directory (Dir.pwd)
<jokke_>
(with rspec)
<tobiasvl>
jokke_: test for what?
<tobiasvl>
jokke_: block_given?
<joshu>
ok thanks
jkamenik has joined #ruby
yojimbo__ has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
<jokke_>
well every method accepts a block, right. Now i want to test if my method iterates using a given block. I wouldn't even know how to express that in words for it
<jokke_>
it "iterates using a given block" ?
xpen has joined #ruby
blaxter has quit [Quit: foo]
<tobiasvl>
yes, i don't understand what you mean :)
subbyyy has joined #ruby
<banister`sleep>
jokke_: u must be jokking..
<jokke_>
banister`sleep: .. :P why?
erry has quit [Read error: Connection reset by peer]
<banister`sleep>
jokke_: are oyu dutch?
<jokke_>
the methods i gisted last. How would i test those?
<jokke_>
banister`sleep: nope, everyone thinks that
<tobiasvl>
test for what?
<tobiasvl>
what do you want to test
yojimbo__ has joined #ruby
<jokke_>
first of all, if it does something with the given block
<jokke_>
or rather passes a number to the block
<tobiasvl>
call the method with a block that just checks if the method yields to it maybe?
<MrZYX>
hm, I think I prefer the def a(&block) b(&block); end version, way more obvious IMO
<jokke_>
great thanks
buibex has quit [Remote host closed the connection]
<banister`sleep>
MrZYX: i know, i just did that for the lulz :)
<MrZYX>
to a beginner? mean ;P
bhaarat has joined #ruby
<banister`sleep>
hehe
maxmanders has quit [Quit: Computer has gone to sleep.]
LongLiveBacon has joined #ruby
codecop has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
sthetz has left #ruby [#ruby]
timmow_ has joined #ruby
BizarreCake has joined #ruby
idkazuma has quit [Ping timeout: 272 seconds]
<pagios>
whats with this sinatra error when trying to execute from my client an xmlhttprequest W, [2013-04-19T15:50:57.308580 #5212] WARN -- : attack prevented by Rack::Protection::HttpOrigin
<jokke_>
i get wrong number of arguments (1 for 2) for call_block
Neomex has quit [Client Quit]
emergion has joined #ruby
Neomex has joined #ruby
dkannan has joined #ruby
divout has joined #ruby
<MrZYX>
so your method receives a block, Proc.new captures it and makes it a proc, the & then converts it back to a block and passes it to call_block which expects a numbers array and a proc
timmow_ has quit [Ping timeout: 252 seconds]
<jokke_>
aah
splittingred has joined #ruby
<jokke_>
ok
<pagios>
MrZYX: Access-Control-Allow-Origin: * needs to be set first in sinatra?
hrs has joined #ruby
<MrZYX>
I think I'd prefer to just reverse proxy the sinatra app through apache or serve it via passenger
<jokke_>
haven't figured out how to do that with it
kpshek has joined #ruby
vikhyat has quit [Remote host closed the connection]
maxmanders has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
tommyvyo has quit [Quit:]
razibog has quit [Ping timeout: 272 seconds]
jmeeuwen has quit [Read error: Connection reset by peer]
jmeeuwen has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
k3rn3lito has quit [Ping timeout: 240 seconds]
Roa has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
maxmanders has quit [Client Quit]
murtuza has joined #ruby
<murtuza>
hi
<Macaveli>
can I both use for example o.set_name("Test") or o.set_name "Test" or what's the difference?
Czupa has joined #ruby
maxmanders has joined #ruby
<murtuza>
You can use both. They are the same.
emergion has quit [Quit: Computer has gone to sleep.]
<murtuza>
Macaveli You can use both. They are the same.
mmitchell has joined #ruby
k3rn3lito has joined #ruby
lukeholder has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
<pagios>
MrZYX: so if i understand correctly cross origin resource sharing can be enabled by 1) enabling it on the sinatra to allow requests from certain clients and on the browser too to allow jscript to request resources other than the domain they are loaded from?
bradhe has joined #ruby
razibog1 has joined #ruby
philcrissman has joined #ruby
<MrZYX>
didn't have that issue yet, so probably ;P
centipedefarmer has joined #ruby
murtuza has quit [Client Quit]
subbyyy has quit [Ping timeout: 256 seconds]
rdark has quit [Ping timeout: 245 seconds]
chipotle_ has quit [Quit: cya]
rdark has joined #ruby
LnL has joined #ruby
jonathanwallace has joined #ruby
justsee has quit [Quit: leaving]
user__ has joined #ruby
rton has left #ruby [#ruby]
yxhuvud has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
dhruvasagar has quit [Read error: Operation timed out]
peta_ has quit [Quit: peta_]
anderson has quit [Ping timeout: 256 seconds]
oneirophren has joined #ruby
hamakn has joined #ruby
pioz has joined #ruby
yxhuvud2 has quit [Ping timeout: 245 seconds]
ioNull has quit [Quit: Computer has gone to sleep.]
snearch has joined #ruby
sayan has quit [Read error: Connection reset by peer]
LnL has quit [Quit: LnL]
dawkirst has quit [Ping timeout: 258 seconds]
csaunders has joined #ruby
a_a_g has quit [Quit: This computer has gone to sleep]
LongLiveBacon has quit [Ping timeout: 240 seconds]
pitzips has joined #ruby
k3rn3lito has quit [Ping timeout: 264 seconds]
banister`sleep has quit [Remote host closed the connection]
Roa has quit [Ping timeout: 264 seconds]
kpshek has quit []
iamjarvo has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
robottinosino has quit [Ping timeout: 245 seconds]
k3rn3lito has joined #ruby
johnmilton has joined #ruby
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
wolcanus has joined #ruby
wolcanus has quit [Remote host closed the connection]
<mellow888>
i think im using threads in the wrong way
<MrZYX>
same issue as yesterday
freeayu has joined #ruby
blaxter_ has joined #ruby
<MrZYX>
you're calling a method and pass that return value to Thread.new
<mellow888>
yes, but thats a working example :P
<mellow888>
how should I put it so it prints the 3 funcs?
<MrZYX>
Thread.new { fa }
elaptics is now known as elaptics`away
<bean>
yeah () is wrong for that.
vlad_sta_ has quit [Ping timeout: 264 seconds]
<MrZYX>
that passes a block to Thread.new and then that block is called inside the new thread. The block then calls your method
<bean>
with () it expects either *args or *args,proc
<bean>
err &proc
<mellow888>
I have just tested without brackets
<mellow888>
and still it only prints aaaa
<MrZYX>
are you actually reading what I write?
<mellow888>
oh ok
<mellow888>
I understood incorrectly sorry
pagios has joined #ruby
wagster has joined #ruby
p0wn3d has joined #ruby
robbyoconnor has quit [Max SendQ exceeded]
blaxter_ is now known as blaxter
<mellow888>
so its the same as just putting the code in the {}
mneorr has quit [Remote host closed the connection]
<MrZYX>
well, not exactly the same but the effect is the same
robbyoconnor has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<mellow888>
so if I use Thread.new {fa} I don't get anything printed
<MrZYX>
also use spaces for indentation not tabs, there's no need to call or define methods with parenthesis, `while 1` is the same as `while true` is the same as `loop do` (the last version is generally preferred)
<fryguy>
mellow888: did you join the thread
balishag has joined #ruby
<mellow888>
great, thanks fryguy
<mellow888>
I started only doing Thread.new () and it worked like that
<mellow888>
thanks a lot MrZYX
preller has quit [Read error: Operation timed out]
chipotle_ has joined #ruby
d11wtq_ has joined #ruby
<mellow888>
if I wanted to use the function with a parameter
<mellow888>
a = Thread.new { fa(222) } would suffice ?
<MrZYX>
yup
pothibo has quit [Quit: pothibo]
<mellow888>
great this is what i needed thanks!
<MrZYX>
fryguy: no explain him why he needs to join ;P
<MrZYX>
*now
d11wtq has quit [Ping timeout: 264 seconds]
<wuest>
MrZYX: joining threads is for cowards ;-)
dkannan has quit [Ping timeout: 264 seconds]
Vert has joined #ruby
<mellow888>
"If we don't call thr.join before the main thread terminates, then all other threads including thr will be killed."
decoder_ring has quit [Quit: decoder_ring]
<MrZYX>
oh, you're actually aware of that?
markalanevans has joined #ruby
notVert has quit [Ping timeout: 252 seconds]
<mellow888>
no, just googled it haha
dawkirst has quit [Ping timeout: 276 seconds]
<mellow888>
so my main thread ended
<mellow888>
and that why the program stopped without printing
<MrZYX>
yup
freezey has joined #ruby
balishag has quit [Ping timeout: 256 seconds]
bradhe has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
preller has joined #ruby
mikepack has joined #ruby
mklappstuhl has quit [Ping timeout: 276 seconds]
martinklepsch has quit [Ping timeout: 272 seconds]
zph has quit [Quit: Computer has gone to sleep.]
AxonetBE has quit [Read error: No route to host]
AxonetBE1 has joined #ruby
yxhuvud2 has joined #ruby
<greenarrow>
Ìû
bradhe has quit [Ping timeout: 272 seconds]
SCommette has joined #ruby
<MrZYX>
greenarrow: !!
robbyoconnor has quit [Ping timeout: 258 seconds]
tchaikovsky has joined #ruby
<greenarrow>
?
<greenarrow>
MrZYX: hi
interactionjaxsn has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
asym has quit [Read error: Connection reset by peer]
mattbl has quit [Quit: This computer has gone to sleep]
xpen has quit [Remote host closed the connection]
shreknet has quit [Ping timeout: 256 seconds]
xpen has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
skroon has joined #ruby
mattbl has joined #ruby
asym has joined #ruby
axl_ has quit [Quit: axl_]
jrajav has joined #ruby
akhet has joined #ruby
akhet has quit [Changing host]
akhet has joined #ruby
neku has joined #ruby
wsterling has joined #ruby
akhet has quit [Remote host closed the connection]
binaryplease has quit [Ping timeout: 252 seconds]
jkamenik has quit [Quit: Leaving.]
unstable has joined #ruby
akhet has joined #ruby
tomsthumb has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
amh345 has quit [Quit: amh345]
etcetera has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
sambao21 has joined #ruby
hogeo has joined #ruby
jeremywrowe has quit [Quit: leaving]
jbueza has joined #ruby
chipotle_ has joined #ruby
wesside has joined #ruby
nathanieldavid has quit [Quit: Leaving...]
tjbiddle has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
niklasb has quit [Ping timeout: 248 seconds]
AxonetBE1 has quit [Quit: Leaving.]
unstable has quit [Ping timeout: 264 seconds]
moos3 has quit [Quit: Computer has gone to sleep.]
braincrash has joined #ruby
<markalanevans>
Hey folks, I'm starting to understand how to use rake tasks, i have a nightly process that basically does : download_files, generate_build_files, import_build_files. During the standard process, i would say build merchants=1,34,56,23,55 and that should first call download_files, then after completed call genereate_build_files then call import_build_files.
tagrudev has quit [Remote host closed the connection]
<markalanevans>
Ideally i would have a cron that runs nightly and calls a master function.
dhruvasagar has joined #ruby
<pskosinski>
Is there a static sites generator similar to Sinatra?
teddyp1cker has quit [Remote host closed the connection]
<markalanevans>
and that should basically call each task in order.
<markalanevans>
So my question is, when one rake task calls another, does it pass the argv params.
<markalanevans>
And lets say i wanted to be able to trigger a rake task from a web request example admin wants to manually just rebuild say merchant 2...
<markalanevans>
Whats the best way to go about organizing this?
peta_ has joined #ruby
t_p has joined #ruby
xpen has quit [Ping timeout: 240 seconds]
Vivekananda has joined #ruby
binaryplease has joined #ruby
d2dchat has joined #ruby
hogeo has quit [Remote host closed the connection]
enriclluelles has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
pagios has joined #ruby
yxhuvud2 has joined #ruby
jean-lou` has quit [Ping timeout: 256 seconds]
kf8a has joined #ruby
<pagios>
ok so i have sinatra accepting routes, i would like to issue a command when route1 is received and result its result into the client using sinatra
dhruvasagar has joined #ruby
alainus is now known as alainus[-_-]
noop has joined #ruby
dankest has joined #ruby
bradhe has quit [Ping timeout: 258 seconds]
yxhuvud has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
xpen has quit [Ping timeout: 258 seconds]
k610 has quit [Ping timeout: 258 seconds]
mattpolito has joined #ruby
pioz has quit [Ping timeout: 260 seconds]
filipe has quit [Remote host closed the connection]
<Spooner>
No, no, no, Frank Sinatra is #1 at google for "Sinatra", pushing the real Sinatra down to position #2!
JohnBat26 has quit [Remote host closed the connection]
adamjleonard has quit [Read error: Connection reset by peer]
xperience has joined #ruby
yojimbo__ has quit [Ping timeout: 256 seconds]
<MrZYX>
you know your google isn't everybody's google?
mmitchell has quit [Remote host closed the connection]
<Spooner>
Well, OK. Sinatra got relegated to #2 on My Google :D
timmow has quit [Remote host closed the connection]
DonRichie has joined #ruby
mikepack has joined #ruby
<MrZYX>
Frank Sinatra is actually #3 on mine xD
blacktul_ has joined #ruby
<Spooner>
I have sinatra.com, sinatrarb.com then the wikipedia.
etcetera has joined #ruby
<MrZYX>
sinatrarb.com, github/sinatra, WP here
unstable has joined #ruby
<Spooner>
github is #8 for me. I think I'll stop analysing then.
skattyadz has quit [Quit: skattyadz]
<MrZYX>
sinatra.com is #5 after german WP on #4
blacktulip has quit [Ping timeout: 245 seconds]
s2013 has joined #ruby
bradleyprice has joined #ruby
<MrZYX>
and if I switch google to english it's sinatrarb.com, WP, github, sinatra.com
nazty has joined #ruby
s2013_ has joined #ruby
atno has joined #ruby
brum has joined #ruby
ariedler has quit [Remote host closed the connection]
bradhe has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
wolcanus has joined #ruby
yojimbo__ has joined #ruby
skroon has joined #ruby
s2013 has quit [Ping timeout: 256 seconds]
lukeholder has quit [Quit: Computer has gone to sleep.]
baroquebobcat has quit [Quit: baroquebobcat]
codecop has joined #ruby
nga4 has joined #ruby
<pagios>
hmm ok i want to launch a command into the background and kill it at some other point in time, how can i track its pid number in ruby?
maxmanders has joined #ruby
<pagios>
something like coproc in bash
emmanuelux has joined #ruby
banjara has quit [Quit: Leaving.]
tylersmith has joined #ruby
tevio has quit [Remote host closed the connection]
wesside has quit [Quit: Computer has gone to sleep.]
jerius has quit []
Mon_Ouie has joined #ruby
chipotle_ has quit [Quit: cya]
vanstee has quit [Quit: Computer has gone to sleep.]
<reactormonk>
pagios, one of the popen
<reactormonk>
pagios, maybe you need popen4
timmow has joined #ruby
Andreo has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
yacks has joined #ruby
tomzx_mac has joined #ruby
unstable has quit [Ping timeout: 276 seconds]
sleetdrop has joined #ruby
sleetdrop has quit [Client Quit]
sleetdrop has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
timmow has quit [Ping timeout: 252 seconds]
tesuki has joined #ruby
pitzips has quit [Remote host closed the connection]
altivec has joined #ruby
forrest has joined #ruby
kuzushi_ has joined #ruby
a_a_g has joined #ruby
elux has joined #ruby
xperience has quit [Quit: Leaving...]
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
ekampf has joined #ruby
himsin has quit [Ping timeout: 258 seconds]
tjbiddle has joined #ruby
nbjahan has joined #ruby
sjhuang has quit [Quit: leaving]
thams has joined #ruby
banjara has joined #ruby
jonahR has joined #ruby
kuzushi has quit [Ping timeout: 264 seconds]
ukd1 has joined #ruby
yojimbo__ has quit [Ping timeout: 252 seconds]
chrishough has quit [Quit: chrishough]
angusiguess has quit [Ping timeout: 255 seconds]
interactionjaxsn has quit [Ping timeout: 258 seconds]
rupee has joined #ruby
etcetera has quit []
codecop has quit [Remote host closed the connection]
vanstee has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
ferdev has quit [Quit: ferdev]
codecop has joined #ruby
brianpWins has joined #ruby
mattbl has quit [Quit: Leaving]
jeebster has joined #ruby
yojimbo__ has joined #ruby
<tjbiddle>
Hey guys - Trying to figure out why bundle update keeps wanting to pull from Git. I've run bundle install --without test development and the capybara-webkit gem is not listed, but then when I bundle update - it starts calling out to Git (We build from their master branch)
Vivekananda has quit [Quit: Ex-Chat]
<MrZYX>
did you lock a rev in the gemfile?
Vivekananda has joined #ruby
JuanMiguel2 has joined #ruby
danneu has joined #ruby
kirun has joined #ruby
yxhuvud has joined #ruby
<tjbiddle>
Nope - They pull from master. #ack - Not a huge, huge deal as it *should* only happen in a test environment.
rickmasta has quit [Quit: Leaving...]
<tjbiddle>
I think it's due to the Gemfile.lock - Does the Gemfile.lock actually lock in versions? I thought that's what specifying that in the Gemfile was for.
chrishough has joined #ruby
JuanMiguel2 has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
LaPetiteFromage has quit [Ping timeout: 256 seconds]
<MrZYX>
the Gemfile.lock determines the versions installed by a bundle install, the Gemfile what should be pulled initially/on update
MistuhKurtz has joined #ruby
<MrZYX>
just run bundle update gem names you want to update instead of the open one
ariedler has joined #ruby
<MrZYX>
and don't worry about the fetch
<Spooner>
YEah, if you update, then it will update the Gemfile.lock's versions to the latest appropriate ones. Use bundle update my_gem instead.
yxhuvud2 has quit [Ping timeout: 245 seconds]
tesuki has quit [Remote host closed the connection]
pioz has joined #ruby
<tjbiddle>
Hm. Any particular reason why bundle install and update keeps saying "Updating git://github.com/thoughtbot/capybara-webkit" even though I'm running bundle install with `--without test development` when capybara is in that group?
c0rn has joined #ruby
<MrZYX>
just ignore that
CalebMingle has joined #ruby
angusiguess has joined #ruby
<tjbiddle>
MrZYX: Can't really - Deployments are breaking as we don't have Git installed on prod machines.
<MrZYX>
it's not update the actual directory used but the local cache
<tjbiddle>
I'm assuming that's why at least
<MrZYX>
well, then you shouldn't run git releases....
poikon has quit [Remote host closed the connection]
akashj87__ has joined #ruby
<tjbiddle>
MrZYX: I don't want to - I only want to do that for our test environment. Their last build broke something we rely on
<MrZYX>
then I don't get your issue
sleetdrop has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has quit [Ping timeout: 258 seconds]
c0rn has quit [Client Quit]
c0rn has joined #ruby
MistuhKurtz has quit [Ping timeout: 245 seconds]
Banistergalaxy has joined #ruby
nbjahan has quit [Ping timeout: 252 seconds]
akashj87 has quit [Ping timeout: 245 seconds]
BizarreCake has quit [Ping timeout: 256 seconds]
wmoxam has quit [Ping timeout: 260 seconds]
ariedler has quit [Ping timeout: 258 seconds]
unstable has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
Neomex has quit [Quit: Neomex]
chandankumar has joined #ruby
danman has joined #ruby
<fryguy>
tjbiddle: just because bundler doesn't use the things doesn't mean it still doesn't download them
moos3 has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
renanoronfle has quit [Quit: This computer has gone to sleep]
snooc has quit [Remote host closed the connection]
jonathanwallace has quit [Client Quit]
m8 has quit [Ping timeout: 272 seconds]
<tjbiddle>
fryguy: That's silly. I'm just building from master and uploading to our local repo
JMcAfreak has joined #ruby
snooc has joined #ruby
jonathanwallace has joined #ruby
CalebMingle has quit [Quit: CalebMingle]
renanoronfle has joined #ruby
zastern has quit [Remote host closed the connection]
CalebMingle has joined #ruby
zastern has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
a_a_g has quit [Quit: This computer has gone to sleep]
GOMADWarrior has quit [Ping timeout: 256 seconds]
mmitchell has joined #ruby
Neandre has quit [Read error: Connection reset by peer]
kofno has quit [Remote host closed the connection]
BizarreCake has joined #ruby
<Morrolan>
Are arbitrary objects as hash keys something which I should avoid, or will everything work as expected, provided I implement the 'eql?' and 'hash' functions?
yojimbo__ has quit [Ping timeout: 252 seconds]
kofno has joined #ruby
nadirvardar has joined #ruby
<fryguy>
tjbiddle: there are situations where it not doing that will lead to a different set of things being loaded in production. read the manpage
<ChristianS>
Morrolan: with 'eql?' and 'hash', you should be fine (methinks)
s2013_ is now known as s2013
Macaveli has joined #ruby
unstable has joined #ruby
LnL has joined #ruby
marcdel has joined #ruby
<Morrolan>
ChristianS: :)
goblin42 has joined #ruby
<goblin42>
hi
m8 has joined #ruby
<goblin42>
IWANT TO BUY RUBY
<MrZYX>
from who?
<Spooner>
MrZYX, Just a troll. Was on earlier.
<goblin42>
from ruby sellers
<MrZYX>
Spooner: I know ;)
<MrZYX>
goblin42: who are they?
motto has quit [Ping timeout: 256 seconds]
<Morrolan>
Jewelries, maybe?
<goblin42>
retail
<Morrolan>
You'll get plastic rubies there, at most.
<Morrolan>
Compare it to Ruby implemented in Bash, if you want.
<goblin42>
i want ruby, ON, railz
<MrZYX>
then go to #rubyonrails
yojimbo__ has joined #ruby
unstable has quit [Ping timeout: 256 seconds]
enriclluelles has joined #ruby
ddfreyne has joined #ruby
<ddfreyne>
Oh wow, this channel is over twice as big as #ruby-lang
yojimbo__ has quit [Read error: Connection reset by peer]
yojimbo__ has joined #ruby
mikepack has quit [Remote host closed the connection]
jerius has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
chandankumar has quit [Ping timeout: 256 seconds]
ekampf has quit [Quit: ekampf]
forlin has quit [Remote host closed the connection]
pioz has quit [Quit: This computer has gone to sleep]
pi3r has quit [Quit: Leaving]
fantazo has joined #ruby
vlad_starkov has joined #ruby
toekutr has joined #ruby
Macaveli has quit [Ping timeout: 256 seconds]
<tjbiddle>
fryguy: "Note that on bundle install, bundler downloads and evaluates all gems, in order to create a single canonical list of all of the required gems and their dependencies." - Makes sense, but I'm not entirely sure why that would hinder the ability to not install or download a certain group.
arya_ has joined #ruby
<tjbiddle>
More curious now - Everything is worked out. Just built from master and uploaded to our local repo, works fine and dandy. Appreciate the info guys.
<goblin42>
rubyONruby
Artheist has joined #ruby
<MrZYX>
goblin42: what?
sambio_ has joined #ruby
<goblin42>
ruby goes into RUBy
<MrZYX>
you mean rubinius?
<goblin42>
no
<MrZYX>
then?
<goblin42>
URanus
<MrZYX>
I'm sorry?
<goblin42>
uranus
atno has quit [Ping timeout: 260 seconds]
<MrZYX>
what's up with uranus?
<goblin42>
its uranus on mars
<MrZYX>
that doesn't make any sense
<goblin42>
same with rubyONrails.
<MrZYX>
I'm not getting your point here. Try writing full sentences
<shevy>
MrZYX PENIS!!!
yojimbo__ has quit [Ping timeout: 260 seconds]
<MrZYX>
shevy: VAGINA!!!
<shevy>
goblin42 you have a strange nick man
vlad_starkov has quit [Ping timeout: 264 seconds]
ferdev has joined #ruby
<MrZYX>
he has a bad endurance for a troll
kristo_ has joined #ruby
sambio has quit [Ping timeout: 252 seconds]
<goblin42>
no.
sambao21 has quit [Quit: Computer has gone to sleep.]
<MrZYX>
yes
zph has quit []
<shevy>
x = "TTCGC" # => "TTCGC"; x[-6,6] = ''
<shevy>
IndexError: index -6 out of string
tomsthumb has quit [Quit: Leaving.]
<shevy>
hmm how to properly check whether an index is out of the string or not?
sambio_ has quit [Ping timeout: 252 seconds]
<shevy>
should I use x.size ?
sambio has joined #ruby
<yxhuvud>
tjbiddle: it is possible to tell it to only install certain environments given that you have a lockfile that properly defines the dependencies.
<tjbiddle>
yxhuvud: Install, yes - But it downloads everything from what I understand
<tjbiddle>
The issue I was running into was having a :git => reference inside my Gemfile, and production machines do not have Git installed on them - Making the deployment fail, even though I was saying to bundle install without the test or development groups.
LS\MFT has joined #ruby
<MrZYX>
did you try --deployment?
chipotle_ has joined #ruby
nephfl has joined #ruby
megha has quit [Quit: WeeChat 0.4.0]
enebo has quit [Quit: enebo]
<nephfl>
I just updated my ruby install to 1.9.3 but when I try to use gem to install a package it says it needs >1.9.2, how do I update gem so that it will install properly?
kristo_ has quit [Ping timeout: 276 seconds]
nwertman has joined #ruby
<tjbiddle>
MrZYX: I did not - I'll read up on that - but from what the manpage (And fryguy) says - Bundler downloads all gems in the Gemfile, but only installs the ones you tell it to - So I would expect that to do the same thing.
baba has joined #ruby
axl_ has quit [Quit: axl_]
kleinerdrache has joined #ruby
arubin has joined #ruby
<MrZYX>
nephfl: maybe it's still using 1.8? do you have a gem-19 or something like that? check ruby -v and gem env
<nephfl>
where do I set that? it is rubygems v 1.5.0
<tjbiddle>
nephfl: `which ruby && which gem`
<tjbiddle>
Also, system ruby - or RVM/RBEnv?
<tjbiddle>
And OS please :)
vikhyat has quit [Read error: Connection reset by peer]
vikhyat_ has joined #ruby
<nephfl>
I dont have rvm or RBE
progbyperm has quit [Ping timeout: 256 seconds]
motto has joined #ruby
<tjbiddle>
nephfl: Did you just compile yourself, or install from a package manager?
atno has joined #ruby
<nephfl>
which doesn't match the gem info
<nephfl>
yes
<nephfl>
compiled it myself
<nephfl>
os is suse 11.4
m8 has quit [Ping timeout: 246 seconds]
<tjbiddle>
nephfl: Would you be willing to try out a virtual env or want to stick with trying to fix this? I
<tjbiddle>
'v
<tjbiddle>
I
<tjbiddle>
'v
<tjbiddle>
Can't type, jeez, lol.
<nephfl>
I dont know anything about it
<tjbiddle>
I've found that virtual envs generally solve a lot of problems.
wmoxam has joined #ruby
<nephfl>
i just want to install a web app for asterisk
moted has quit [Quit: moted]
moted has joined #ruby
axl_ has joined #ruby
<MrZYX>
so I guess your ruby is in /usr/local/bin and your gem is in /usr/bin ?
Zai00 has quit [Quit: Zai00]
chandankumar has joined #ruby
<goblin42>
mrzyx i am a not a atroll
yxhuvud2 has joined #ruby
<MrZYX>
then why are you trolling?
freezway has joined #ruby
hmarr has quit [Ping timeout: 240 seconds]
shock_one has joined #ruby
dr_bob has joined #ruby
<nephfl>
yes
thams has quit [Quit: thams]
yxhuvud has quit [Ping timeout: 264 seconds]
rickmasta has joined #ruby
mneorr has quit [Remote host closed the connection]
thams has joined #ruby
<MrZYX>
does find /usr/local -name gem return anything?
pioz has joined #ruby
<nephfl>
yes
razibog1 has quit [Ping timeout: 264 seconds]
<MrZYX>
what?
vikhyat_ has quit [Ping timeout: 258 seconds]
<nephfl>
yes that is the gem that is in my path
<MrZYX>
I'm confused now, I thought your ruby is /usr/local/bin/ruby and your gem is /usr/bin/gem ?
tesuki has joined #ruby
gyre007 has quit [Ping timeout: 252 seconds]
ariedler has joined #ruby
danman has quit [Quit: danman]
johnnyfuchs has joined #ruby
wallerdev has quit [Quit: wallerdev]
vikhyat has joined #ruby
generalissimo has quit [Remote host closed the connection]
dr_bob has quit [Ping timeout: 245 seconds]
<tjbiddle>
nephfl: cat /usr/bin/gem | head (Or w/e your gem is pointing at) - Also, ls -la /usr/bin | grep gem (Or w/e your gem is pointing at) to check if it's a symlink or what's going on there.
<tjbiddle>
Do the same for where your ruby binary is as well.
yashshah has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
a_a_g has joined #ruby
johnnyfuchs1 has quit [Ping timeout: 245 seconds]
nephfl has quit [Ping timeout: 245 seconds]
m_3 has quit [Read error: Connection reset by peer]
troessner has quit [Quit: Leaving]
hamakn has joined #ruby
yashshah has joined #ruby
_maes_ has joined #ruby
unstable has joined #ruby
nephfl has joined #ruby
vikhyat_ has joined #ruby
vikhyat has quit [Read error: Connection reset by peer]
<nephfl>
yeah, my ruby 1.9 is at /usr/local/bin and my gem is at /usr/local/bin ruby 1.8 is at /usr/bin/ruby
<MrZYX>
so which gem yields which one?
marcdel has quit []
vikhyat has joined #ruby
tesuki has quit [Remote host closed the connection]
marcdel has joined #ruby
cableray has joined #ruby
vikhyat_ has quit [Read error: Connection reset by peer]
ioNull has quit [Quit: Computer has gone to sleep.]
end_guy has quit [Ping timeout: 276 seconds]
nephfl has quit [Ping timeout: 245 seconds]
dmiller has quit [Remote host closed the connection]
dmiller has joined #ruby
rickmasta has joined #ruby
ebobby has joined #ruby
classix has joined #ruby
yxhuvud2 has quit [Ping timeout: 276 seconds]
pkrnj has joined #ruby
Regis__ has joined #ruby
El_Diablo has quit [Remote host closed the connection]
markalanevans has quit [Quit: markalanevans]
nbjahan has joined #ruby
Mattix has joined #ruby
joshcheek has joined #ruby
classix has quit [Ping timeout: 276 seconds]
wallerdev has joined #ruby
GOMADWarrior has quit [Ping timeout: 264 seconds]
classix has joined #ruby
etcetera has joined #ruby
enebo has joined #ruby
RagingDave has joined #ruby
jeffreylevesque has quit [Ping timeout: 258 seconds]
mahmoudimus has joined #ruby
jeffreylevesque has joined #ruby
mayankkohaley has joined #ruby
_nitti_ has joined #ruby
wsterling has quit [Remote host closed the connection]
tesuki has joined #ruby
akashj87 has quit [Quit: leaving]
_nitti has quit [Ping timeout: 245 seconds]
kpshek has quit []
theRoUS has quit [Read error: Operation timed out]
sayan has quit [Ping timeout: 258 seconds]
kpshek has joined #ruby
tesuki has quit [Remote host closed the connection]
johnnyfuchs has quit [Remote host closed the connection]
unstable has quit [Ping timeout: 260 seconds]
wsterling has joined #ruby
brennanMKE has joined #ruby
dphase has joined #ruby
ph^ has joined #ruby
jeffreylevesque has quit [Ping timeout: 258 seconds]
brum has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
pasties has quit [Ping timeout: 240 seconds]
jeffreylevesque has joined #ruby
LS\MFT has quit [Quit: Leaving]
mahmoudimus has quit [Ping timeout: 260 seconds]
nbjahan has quit [Quit: nbjahan]
dphase has left #ruby [#ruby]
freezway has quit [Read error: No route to host]
bradhe has joined #ruby
johnnyfuchs has joined #ruby
altamic has quit [Quit: altamic]
felipe has quit [Ping timeout: 248 seconds]
niceguy1234 has quit [Read error: Operation timed out]
johnnyfuchs has quit [Remote host closed the connection]
droppedonmyhead has joined #ruby
toekutr has quit [Ping timeout: 256 seconds]
braoru has joined #ruby
<droppedonmyhead>
hey everyone
<droppedonmyhead>
how do i make default values so that my function can take either 1 or 2 arguments?
<MrZYX>
def a foo, bar="default"
malkomalko has quit [Remote host closed the connection]
<droppedonmyhead>
MrZYX: easy tx
workmad3 has joined #ruby
mark_locklear has joined #ruby
vikhyat has quit [Remote host closed the connection]
f0ster has joined #ruby
yfeldblum has joined #ruby
wsterling has quit [Remote host closed the connection]
marr has joined #ruby
sayan has joined #ruby
Animawish has joined #ruby
classix has quit [Ping timeout: 252 seconds]
etcetera has quit []
reset has joined #ruby
classix has joined #ruby
timonv has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
snooc has quit []
sayan has quit [Ping timeout: 258 seconds]
brum has joined #ruby
mercwithamouth has quit [Ping timeout: 258 seconds]
brum has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
<peta_>
is there a trick I can call myArr.map with the 'do |a,b| … end' syntax and getting an array as return value instead of an enumerator ? (when I use the ' {|a,b| … }' syntax it works)
worstadmin has quit [Ping timeout: 246 seconds]
<tylersmith>
peta_: they should be equivalent. can you gist the code?
perun0 has quit [Ping timeout: 256 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
wsterling has joined #ruby
joshcheek_ has joined #ruby
joshcheek has quit [Read error: Connection reset by peer]
<peta_>
any way to change precedence? (braces around 'do … end' doesnt work)
classix has quit [Ping timeout: 260 seconds]
k610 has quit [Ping timeout: 260 seconds]
Regis__ has joined #ruby
<Spooner>
peta_, Easiest is to do result = arr.map do end; result
yxhuvud2 has joined #ruby
yxhuvud2 has quit [Client Quit]
RagingDave has quit [Read error: Connection reset by peer]
<MrZYX>
in your specific example? do puts arr.map(&:downcase) :P
RagingDave has joined #ruby
johnnyfuchs has joined #ruby
rakl has joined #ruby
BizarreCake has quit [Quit: Leaving]
ToApolytoXaos has quit [Quit: Leaving]
<peta_>
don't get me wrong … I didn't try to solve my particular problem … I just wanted to know if Ruby has some syntactical sugar to work around this
<peta_>
i am a ruby noob as some of you might know
rton has joined #ruby
yxhuvud has quit [Ping timeout: 264 seconds]
wedgex has quit [Remote host closed the connection]
<peta_>
I am just trying to learn all the subtle differences the ruby language has to offer
sepp2k has joined #ruby
GOMADWarrior has quit [Ping timeout: 252 seconds]
GOMADWarrior has joined #ruby
perun0 has joined #ruby
yojimbo__ has joined #ruby
vanstee has quit [Quit: Computer has gone to sleep.]
Regis__ has quit [Ping timeout: 255 seconds]
angusiguess has joined #ruby
c0rn has joined #ruby
<MrZYX>
most people prefer {} anyway for blocks when the return value matters, but you could do puts begin; arr.map do |e|\n e.downcase\n end\n end
<MrZYX>
but temporary variable is really the best option as Spooner already said
artofraw has quit [Remote host closed the connection]
toekutr has joined #ruby
enebo has quit [Ping timeout: 258 seconds]
enebo has joined #ruby
axl_ has quit [Quit: axl_]
rippa has quit [Ping timeout: 240 seconds]
wreckimnaked has joined #ruby
<Eiam>
Want to thank everyone here for being so helpful & responsive. It's really helped me enjoy using Ruby to solve problem & just increase my general experience with programming. So, thanks everyone for being nice & helpful people =)
<Eiam>
(and I've been writing code for ~15 years)
snooc has joined #ruby
ebobby has quit [Ping timeout: 256 seconds]
trautwein has quit [Quit: Leaving...]
daniel_hinojosa has joined #ruby
jtharris has quit [Quit: WeeChat 0.4.0]
nomenkun has quit [Remote host closed the connection]
dbruns has joined #ruby
mrsolo has joined #ruby
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
bhaarat has quit [Quit: bhaarat]
j^2 has joined #ruby
wsterling has quit [Read error: Connection reset by peer]
cloke_ has joined #ruby
wsterling has joined #ruby
joshcheek has quit [Quit: joshcheek]
Animawish has quit [Quit: Animawish]
kleinerdrache has quit [Quit: Ex-Chat]
mikepack has quit [Remote host closed the connection]
cloke has quit [Ping timeout: 256 seconds]
cloke_ is now known as cloke
end_guy has joined #ruby
alexwh has joined #ruby
luckyruby has joined #ruby
luckyruby has quit [Remote host closed the connection]
<lectrick>
I have a "fork" question. If I have a variable defined before the fork (as an empty array), and each fork adds to that array with << ... Won't the value of that variable change for ALL forks?
<bricker>
Is it possible to find out where a module is declared? SomeModule.source_location obviously doesn't work, but something like that
<lectrick>
bricker: search the source code?
<bricker>
lectrick: well that's the thing... I don't know where this module is coming from
Astral_ has joined #ruby
<bricker>
I have a class AssetHost::Asset::Fallback, but a module AssetHost::Fallback is also defined, but I don't know where
<tjbiddle>
bricker: I think there's something that will print where a module/class is loaded from - but can't remember it off the top of my head. For now I'd just say grep through your gems folder.
<MrZYX>
lectrick: fork creates a new process, that's usually copy-on-write on linux
toekutr has quit [Ping timeout: 260 seconds]
V8Energy has joined #ruby
AxonetBE has quit [Quit: Leaving.]
<lectrick>
MrZYX: So it makes a copy of the entire process and all variables? (I'm on OS X which may follow the same model)
chrishough has joined #ruby
Guest62355 has quit [Changing host]
Guest62355 has joined #ruby
Guest62355 has joined #ruby
<MrZYX>
yup (actually didn't specifically look into it for ruby, but for C that's the case)
AxonetBE has joined #ruby
Guest62355 is now known as Boohbah
Astralum has quit [Ping timeout: 256 seconds]
<MrZYX>
and ruby just calls fork(2) iirc
iamjarvo has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 264 seconds]
<lectrick>
MrZYX: So the only way to communicate values between the processes is by pipes and such?
<MrZYX>
yup
<MrZYX>
files, sockets, pipes, any method of IPC
csaunders has joined #ruby
<lectrick>
MrZYX: Basically, I want to fire off 3 child processes from a "master" process, collect their STDOUT/STDERRs and exit statii, and then report from the "master" process
csaunders has quit [Client Quit]
wolcanus has quit [Remote host closed the connection]
AlSquire has quit [Read error: Connection reset by peer]
<s2013>
how would you convert a hex into base64?
<lectrick>
I think... but I'm not certain... that IO popen3 might help
sailias has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Remote host closed the connection]
<MrZYX>
that's not forking though, so it has to reload your env
AlSquire has joined #ruby
pac1 has joined #ruby
AxonetBE has quit [Ping timeout: 258 seconds]
<lectrick>
s2013: that seems wasteful
<lectrick>
s2013: since the hex character set is basically a subset of base64
<s2013>
i dont know much about it. im just looking at some basic crypto challenges so i can learn this better by doing
<lectrick>
s2013: well you could do something like this, but this converts the hex to decimal first, takes that string and then base64's that: require 'base64'; Base64.encode64('abcd1234'.to_i(16).to_s)
brennanMKE has joined #ruby
<s2013>
is that standard library in ruby?
<lectrick>
yep
<s2013>
what does to_i(16) ocnvert it to?
<s2013>
hex?
<lectrick>
that interprets the string as base whatever
<s2013>
oh ok
<lectrick>
before converting it to a decimal int or whatever
tjbiddle_ has joined #ruby
<lectrick>
in that example, abcd1234 is the hex number
kpshek has quit []
<s2013>
oh ok
<lectrick>
s2013: also, note that you can use 0xabcd1234 directly in ruby
<lectrick>
I could have just done that
<lectrick>
it will interpret it as hex and give you back a decimal number
<MrZYX>
lectrick: try creating a new IO#pipe in the master and assign it to $stdout in the master
<s2013>
well im tyring to learn how it really works not the solution if that makes sense
chipotle_ has quit [Quit: cya]
<lectrick>
s2013: that's fine. go nuts googling. i mean, that library i just found by googling "ruby base64" ;)
jarin has joined #ruby
<s2013>
what are normal strings in?
<s2013>
what is that called
generalissimo has quit [Remote host closed the connection]
<lectrick>
s2013: ascii?
<MrZYX>
quotes? :P
<lectrick>
or UTF-8
<s2013>
oh ok
tjbiddle has quit [Ping timeout: 248 seconds]
tjbiddle_ is now known as tjbiddle
<lectrick>
s2013: take your time. it's not rocket science, but it takes time to understand the fundamentals of things like encoding, how characters and numbers are represented (and how that can vary), etc.
balishag has quit [Ping timeout: 264 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<lectrick>
s2013: the crazy thing is it all comes down to 1's and 0's
unstable has joined #ruby
<s2013>
yeah i know that.
kelabot has quit [Remote host closed the connection]
<s2013>
10 = 2
<lectrick>
which I thought was incredibly beautiful once. way back when I was grokking this stuff :)
vlad_starkov has joined #ruby
<lectrick>
(without the benefit of the internet)
<s2013>
1010 = 10 or whatever
sambao21 has joined #ruby
<lectrick>
yep. There are only 10 kinds of people in the world, those who get binary and those who don't...
<lectrick>
base 36 are the 26 lowercase letters + the numbers
<s2013>
are alphabets in base26?
<s2013>
english alphabet anyways
<s2013>
so what is base64 ?
<lectrick>
s2013: yes
brum has joined #ruby
<s2013>
>> "abasdfasdf".to_s(64)
<lectrick>
s2013: base64 is lowercase, capitals, numbers... and the rest I forget lol
<eval-in>
s2013 => /tmp/execpad-4a7a6145ee26/source-4a7a6145ee26:2:in `to_s': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/16949)
<s2013>
is hex base6?
ZephiroMX has joined #ruby
<lectrick>
s2013: you have to to_s a number :)
<s2013>
oh
sambao21 has quit [Quit: Computer has gone to sleep.]
<lectrick>
hex is base16
<s2013>
oh
axl_ has joined #ruby
<lectrick>
0-9 and a-f
<s2013>
oh right its hexadecimal
<lectrick>
yep
jtharris has joined #ruby
<s2013>
any reason why it stops at 16? sorry might sounds tupid
<lectrick>
because it's a power of 2 which makes it convenient to represent binary numbers compactly
<lectrick>
I haven't seen it used, but that doesn't mean it's not possible to use it, all you need is people to agree on a character set to represent it as
tjbiddle has quit [Remote host closed the connection]
<s2013>
gotcha
tjbiddle has joined #ruby
<lectrick>
s2013: that would have worked if you did 0x49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d.to_s(16)
classix has quit [Ping timeout: 264 seconds]
<lectrick>
but it would have returned the same thing
<lectrick>
ASCII, each character = 1 byte = 8 bits. In UTF-8... it can vary
RagingDave_ has quit [Ping timeout: 256 seconds]
<lectrick>
but you'd have to google those separately. i find all this stuff interesting, but i'm a programmer haha
GOMADWarrior has quit [Ping timeout: 264 seconds]
<spider-mario>
even though a byte is usually an octet (8 bits), it is not necessarily so
<spider-mario>
and ASCII characters only use 7 bits
<spider-mario>
(that’s what made it possible for UTF-8 to be ASCII-compatible)
wmoxam has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
<lectrick>
spider-mario: ah crap. true.
postmodern has joined #ruby
<spider-mario>
(regarding the size of bytes, I’m nitpicking, really)
ntzrmtthihu777 has joined #ruby
<lectrick>
technically correct is best correct
<lectrick>
;)
<spider-mario>
:)
<lectrick>
especially when it comes to computers
classix has quit [Ping timeout: 248 seconds]
evenix has quit [Remote host closed the connection]
<ntzrmtthihu777>
because computers are stupid ;)
classix has joined #ruby
<lectrick>
s2013: there's a whole history of encoding, btw. ASCII came after other standards like, http://en.wikipedia.org/wiki/EBCDIC . In case you ever delve into why things are the way they are and how they got there. :)
<canton7>
then uppercase letters once it runs after that? guessing here
<droppedonmyhead>
hey i want to make a while loop include an or statement and i'm finding that it only evaluates the first condition. am i using my || correctly? while (!vowels.include?(string[i]) || (string[i] == "u" && string[i-1] == "q")
malibu_ has quit [Client Quit]
linusoleander has quit [Ping timeout: 276 seconds]
<lectrick>
you're correct canton7
<lectrick>
i think
<otters>
Hanmac: how do I figure out the actual bytes? each_char returns an array of length 2
<Hanmac>
otters: each_char, each_byte, each_codepoint, each of them return differnt stuff
<failshell>
how can i get the last 2 characters of a string?
niklasb has quit [Ping timeout: 264 seconds]
<otters>
right
<otters>
so...
hamakn has joined #ruby
<spike|spiegel>
failshell: umm [-2:-1] ?
<Hanmac>
otters: i think you are looking for .bytesize ?
<canton7>
"string"[-2..-1]
<otters>
Hanmac: that returns 2
niceguy1234 has joined #ruby
<canton7>
spike|spiegel, that's python
<otters>
for an iso-8859-1 encoded e with acute
<otters>
shouldn't it be 1?
<spike|spiegel>
wrong channe :P
<canton7>
hehe
frem has joined #ruby
jerius has quit []
<droppedonmyhead>
can anyone help me with my double pipes? i'm finding string[i] always returns hex instead of a character. how can i avoid that?
interactionjaxsn has quit [Ping timeout: 256 seconds]
<ntzrmtthihu777>
Derp. config, not configure
<subsume>
okie
<subsume>
please look at my paste =)
<subsume>
i swears i did this
<ntzrmtthihu777>
I did.
Mattix has joined #ruby
<subsume>
There is only one alternative in link group ruby: /usr/bin/ruby1.9.1 ... There is only one alternative in link group ruby: /usr/bin/ruby1.9.1
mercwithamouth has quit [Ping timeout: 252 seconds]
<subsume>
There is only one alternative in link group gem: /usr/bin/gem1.9.1
<ntzrmtthihu777>
sudo gem install whatever, lol.
<subsume>
i did that but then my gem doesn't work as my local user
<subsume>
it doesn't show up in gem list
<ntzrmtthihu777>
hmm
<subsume>
is it fucked up to just chown that directory to include me? =P
<ntzrmtthihu777>
likely XD
<subsume>
yeah, i dunno how i got it into this state.
<ntzrmtthihu777>
pwd
<unstable>
I just helped a friend on a mac setup their ruby environment. They were confused by shell PATH and that stuff. So I install rbenv with the plugin from github into .rbenv, got ruby 2.0.0p0, and installed all the gems they wanted (rails). I noticed that mac had /usr/bin/ruby as a bash file saying to 'gem install rails';
<Hanmac>
subsume: what does "which gem" as local user says?
<aedornm>
subsume: which gem && sudo which gem .
linusoleander has joined #ruby
<subsume>
both are /usr/bin/gem =)
<linusoleander>
Any one know if it's possible to run part of a rails app in jRuby?
<linusoleander>
I want to run some rake tasks in jRuby
<Hanmac>
subsume: does "gem env" as both users and pastie that for us
iamvery has quit [Remote host closed the connection]
<unstable>
I setup $PATH order precedence.. so it executes all the stuff in ~/.rbenv; Everything works.. what is the correct way to remove the operating system ruby links though?
<aedornm>
different Ruby versions
asym has quit [Quit: Lost terminal]
<Hanmac>
subsume: there is an second ruby installed that blocks you ...
<unstable>
Basically what is the correct way to remove /usr/bin/ruby, and /usr/bin/gem, etc.
GOMADWarrior has joined #ruby
brennanMKE has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
invisime has quit [Quit: Leaving.]
vanstee has joined #ruby
<subsume>
Hanmac ugh
<aedornm>
unstable: unfortunately there's no 'correct' way as Ruby didn't include a make uninstall. So just delete the links to ruby and gem binaries, and remove the /usr/lib/ruby1.x directory
newUser1234 has quit [Remote host closed the connection]
Regis__ has quit [Ping timeout: 252 seconds]
<subsume>
I'm not really sure how its there
forrest has quit [Quit: Leaving]
<subsume>
maybe i should just logout login
<Hanmac>
subsume: there is an ruby in /opt/vagrant_ruby and this ruby has higher priority in your PATH
iamjarvo has joined #ruby
wedgex has joined #ruby
<subsume>
oooh
<Hanmac>
so maybe you do not need it, or look why its in your path
artofraw has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 258 seconds]
brennanMKE has quit [Ping timeout: 258 seconds]
pskosinski has quit [Ping timeout: 245 seconds]
staafl has joined #ruby
ph^ has quit [Remote host closed the connection]
niklasb has quit [Quit: WeeChat 0.4.0]
staafl has left #ruby [#ruby]
mmitchell has quit [Ping timeout: 255 seconds]
staafl has joined #ruby
hadees has joined #ruby
nezumi has quit [Ping timeout: 252 seconds]
ebobby has quit [Quit: Lost terminal]
johnkary has quit [Quit: @johnkary]
nathanieldavid has joined #ruby
huoxito has joined #ruby
tealmage has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
kofno has joined #ruby
unstable has quit [Ping timeout: 256 seconds]
angusiguess has quit [Ping timeout: 252 seconds]
wyhaines has quit [Remote host closed the connection]
_nitti has joined #ruby
yfeldblum has joined #ruby
akhet has joined #ruby
akhet has joined #ruby
akhet has quit [Changing host]
wsterling has quit [Remote host closed the connection]
Hanmac has joined #ruby
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
Hanmac1 has quit [Ping timeout: 248 seconds]
jlast has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
_nitti has quit [Ping timeout: 258 seconds]
v0n has quit [Ping timeout: 245 seconds]
akhet has quit [Ping timeout: 260 seconds]
robscomputer has joined #ruby
huoxito has quit [Ping timeout: 258 seconds]
zastern has quit [Remote host closed the connection]
chrishough has quit [Quit: chrishough]
hamakn has joined #ruby
angusiguess has joined #ruby
lukeholder has joined #ruby
zastern has joined #ruby
huoxito has joined #ruby
yojimbo has quit [Ping timeout: 240 seconds]
JayT has joined #ruby
<JayT>
I have this html/css/javascript that is not generated by rails. Though I want to add an ajax request from it.. to a rails controller. Is there a good example of how to do this in documentation? or a tutorial online? I'm not sure where to start.
nveselinov has quit [Ping timeout: 245 seconds]
SCommette has joined #ruby
ssms has joined #ruby
tommyvyo has joined #ruby
hamakn has quit [Ping timeout: 255 seconds]
Mon_Ouie has quit [Ping timeout: 255 seconds]
chrishough has joined #ruby
SCommette has quit [Client Quit]
SexyTattoos96 has quit []
ariedler has joined #ruby
JayT has quit [Quit: Lost terminal]
billycravens has quit [Quit: billycravens]
yojimbo has joined #ruby
MistuhKurtz has joined #ruby
Yarou has joined #ruby
veinofstars has quit [Ping timeout: 272 seconds]
nadirvardar has quit [Quit: Computer has gone to sleep.]
jhn has quit [Ping timeout: 260 seconds]
enebo has quit [Quit: enebo]
vanstee has quit [Quit: Computer has gone to sleep.]
zastern has quit [Remote host closed the connection]