Topic for #ruby is now Ruby programming language || ruby-lang.org || RUBY SUMMER OF CODE! rubysoc.org/ || Paste >3 lines of text in http://pastie.org || Para a nossa audiencia em portugues http://ruby-br.org/
nanoyak joined #ruby
norex joined #ruby
norex joined #ruby
jetblack joined #ruby
kf8a joined #ruby
statbot2 joined #ruby
statbot2 joined #ruby
Mohan joined #ruby
Mohan joined #ruby
statbot2 joined #ruby
looopy joined #ruby
modderx joined #ruby
mengu joined #ruby
axilla joined #ruby
timonv joined #ruby
looopy_ joined #ruby
statbot2 joined #ruby
<shevy> Taos the flexibility of ruby itself makes ruby cool
statbot2 joined #ruby
albemuth joined #ruby
<shevy> alias, alias_method
statbot2 joined #ruby
statbot2 joined #ruby
statbot2 joined #ruby
rramsden joined #ruby
esparkma_ joined #ruby
dyer joined #ruby
tomzx joined #ruby
negaduck_ joined #ruby
dyer joined #ruby
dv310p3r joined #ruby
sorin joined #ruby
bwlang joined #ruby
jbw joined #ruby
statbot2 joined #ruby
Shamgar joined #ruby
dv310p3r joined #ruby
kennethreitz joined #ruby
moted joined #ruby
jimmy1980 joined #ruby
looopy_ joined #ruby
rubyruy joined #ruby
<bigdata> :join rake
__sorin__ joined #ruby
perryh joined #ruby
__sorin__ joined #ruby
shevy left #ruby
yfeldblum joined #ruby
sawu joined #ruby
sorin joined #ruby
sorin joined #ruby
mxweas_ joined #ruby
Skaag joined #ruby
nari joined #ruby
wpgreenway joined #ruby
mengu_ joined #ruby
mengu_ joined #ruby
tsccof joined #ruby
<tsccof> may ruby be used as a web development language without the aid of a framework? just pure ruby
xpot joined #ruby
ggtoo joined #ruby
<davidcelis> tsccof: considering that Ruby on Rails and Sinatra are written entirely in Ruby... Sure
<davidcelis> But why would you do that when there are frameworks?
mmokrysz joined #ruby
<tsccof> davidcelis: well, I am only curious if that is possible :P
d2dchat joined #ruby
mmokrysz left #ruby
knix left #ruby
kenichi joined #ruby
Helius joined #ruby
mksm joined #ruby
looopy joined #ruby
dagnachewa joined #ruby
xhx joined #ruby
Zanacross joined #ruby
Behi joined #ruby
WhiteHorse joined #ruby
techhelp joined #ruby
bwlang joined #ruby
stephenjudkins joined #ruby
looopy joined #ruby
randym joined #ruby
mdel joined #ruby
io_syl joined #ruby
io_syl joined #ruby
ilyam joined #ruby
n3m joined #ruby
esparkma_ joined #ruby
dagnachewa joined #ruby
sorin left #ruby
davidcelis joined #ruby
Norrin joined #ruby
alindeman joined #ruby
skinnymuch joined #ruby
<blueadept> would anyone be able to tell me why this object is not saving? http://pastie.org/private/wh479hwgweq9fdfgduagjg
atmosx joined #ruby
<blueadept> all i have at the end of an ajax request is an empty results.test section
dbgster joined #ruby
jimmy1980 joined #ruby
stephenjudkins joined #ruby
quest88 joined #ruby
dnjaramba joined #ruby
Tachyx joined #ruby
WhiteHorse joined #ruby
sbanwart joined #ruby
kenperkins joined #ruby
PaciFisT joined #ruby
mxweas_ joined #ruby
Sailias joined #ruby
avandendorpe joined #ruby
Sailias joined #ruby
mickn joined #ruby
bwlang joined #ruby
excelsior joined #ruby
stephenjudkins joined #ruby
jimmy1980 joined #ruby
esparkm__ joined #ruby
esparkman joined #ruby
wyhaines joined #ruby
baroquebobcat joined #ruby
mxweas_ joined #ruby
boodle joined #ruby
stephenjudkins joined #ruby
sbanwart_ joined #ruby
Coty91 joined #ruby
vjacob joined #ruby
<vjacob> is there a RubySOC going on sometime in the coming 6 months time?
kenperkins joined #ruby
mxweas_ joined #ruby
jimmy1980 joined #ruby
epochwolf joined #ruby
kawa_xxx joined #ruby
zodiak joined #ruby
headius joined #ruby
JakeyChan joined #ruby
bafilius joined #ruby
dasfugufish joined #ruby
guest42 joined #ruby
ryanf joined #ruby
dyer joined #ruby
stephenjudkins joined #ruby
stephenjudkins joined #ruby
igotnolegs joined #ruby
banisterfiend joined #ruby
iamjarvo joined #ruby
jimmy1980 joined #ruby
stephenjudkins joined #ruby
guest42 joined #ruby
rpowell joined #ruby
baroquebobcat joined #ruby
siksia joined #ruby
headius joined #ruby
sbanwart_ joined #ruby
guest42_ joined #ruby
dotnull joined #ruby
stephenjudkins joined #ruby
stephenjudkins joined #ruby
stephenjudkins joined #ruby
rvmeier joined #ruby
sbanwart__ joined #ruby
skinnymuch joined #ruby
chessguy joined #ruby
radic_ joined #ruby
MrCheetoDust joined #ruby
Skaag joined #ruby
namidark joined #ruby
syntaxritual joined #ruby
r0bby_ joined #ruby
wedtm joined #ruby
tomhsx joined #ruby
apok joined #ruby
yeltzooo joined #ruby
stephenjudkins joined #ruby
manizzle joined #ruby
dbruns joined #ruby
kenperkins joined #ruby
x0F__ joined #ruby
stephenjudkins joined #ruby
stephenjudkins joined #ruby
manizzle joined #ruby
yekta joined #ruby
mxweas_ joined #ruby
Targen joined #ruby
Behi joined #ruby
milkpost joined #ruby
ryanf joined #ruby
jimmy1980 joined #ruby
stephenjudkins joined #ruby
developish joined #ruby
milkpost joined #ruby
stephenjudkins joined #ruby
pen_isident joined #ruby
otakutomo joined #ruby
Wroathe joined #ruby
<Wroathe> Anyone mind fielding a rails question?
<Wroathe> I just upgraded to a new version of rails and I don't know if I'm missing a gem or what but my tests used to output something like Started PASS should create product Finished ...
<Wroathe> Now it only shows Started ... Finished
<Wroathe> I'm really new to this so any help would be appreciated.
jimmy1980 joined #ruby
Wroathe left #ruby
<dbruns> i'm having trouble getting the mysql or mysql2 gem to work. I'm using 1.9.3 with RVM brand new OSX Lion install i installed mysql with homebrew
<dbruns> anyone run into this? google isn't being nice
baroquebobcat joined #ruby
stephenjudkins joined #ruby
stephenjudkins joined #ruby
bratsche joined #ruby
randym_ joined #ruby
ryanf joined #ruby
zodiak joined #ruby
dbruns joined #ruby
mxweas_ joined #ruby
perryh joined #ruby
<loocorez> Wroathe: You may have more luck in #RubyOnRails
ColinT joined #ruby
dbruns joined #ruby
looopy joined #ruby
alienvenom joined #ruby
vjacob joined #ruby
Nanuq joined #ruby
mikepack joined #ruby
vjacob joined #ruby
mxweas_ joined #ruby
manizzle joined #ruby
yfeldblum joined #ruby
media-948 joined #ruby
saschaheylik joined #ruby
media-584 joined #ruby
TheTFEF joined #ruby
saschaheylik left #ruby
ggtoo joined #ruby
wmoxam joined #ruby
wmoxam joined #ruby
wyhaines joined #ruby
jimmy1980 joined #ruby
saschaheylik joined #ruby
SegFaultAX joined #ruby
vjacob joined #ruby
PaciFisT joined #ruby
media-498 joined #ruby
vjacob joined #ruby
wayne[mobile] joined #ruby
raythecat joined #ruby
yekta left #ruby
ligan joined #ruby
brownies joined #ruby
Lord-Harlot joined #ruby
ryanf_ joined #ruby
developish joined #ruby
Shamgar joined #ruby
moshee joined #ruby
moshee joined #ruby
ryanf_ joined #ruby
mxweas_ joined #ruby
BrenoPerucchi joined #ruby
p1d joined #ruby
developish joined #ruby
rippa joined #ruby
okkez joined #ruby
okkez left #ruby
ramusara joined #ruby
LittleBill902 joined #ruby
Amirh joined #ruby
jgrimes joined #ruby
jgrimes_ joined #ruby
mxweas_ joined #ruby
mayankkohaley joined #ruby
pen_isident joined #ruby
stayarrr joined #ruby
mxweas_ joined #ruby
pen_isident_ joined #ruby
peterhil joined #ruby
eldariof joined #ruby
nonotza joined #ruby
mikepack joined #ruby
Morkel joined #ruby
bosphorus joined #ruby
fantazo_ joined #ruby
iocor joined #ruby
mikepack joined #ruby
banisterfiend joined #ruby
Cervajz joined #ruby
jorum joined #ruby
brownies joined #ruby
mikepack joined #ruby
iocor joined #ruby
yxhuvud joined #ruby
andreime joined #ruby
Boohbah left #ruby
Cervajz_ joined #ruby
enikar joined #ruby
Cervajz joined #ruby
maletor joined #ruby
Seisatsu joined #ruby
Seisatsu joined #ruby
ph^ joined #ruby
Jrz joined #ruby
michael_mbp joined #ruby
RomD`` joined #ruby
smgt joined #ruby
nari joined #ruby
SpyvsSpy joined #ruby
banisterfiend joined #ruby
otakutomo joined #ruby
enikar joined #ruby
ognevsky joined #ruby
peterwald joined #ruby
ged joined #ruby
asQuirreL joined #ruby
cafesofie joined #ruby
MissionCritical joined #ruby
<gener1c> i am using a script that does cd <script dir>; ruby script.rb
hinogi joined #ruby
hinogi joined #ruby
<gener1c> its in bash, is there a way to bypass that need using ruby?
<asQuirreL> gener1c: don't keep it in that directory....? :P
workmad3 joined #ruby
fermo joined #ruby
xhx joined #ruby
Helius joined #ruby
shevy joined #ruby
_debo joined #ruby
Manhose joined #ruby
ognevsky joined #ruby
enikar joined #ruby
james_cotterill joined #ruby
timonv joined #ruby
wyhaines joined #ruby
james_cotterill joined #ruby
james_cotterill joined #ruby
ggtoo joined #ruby
fridim_ joined #ruby
Manhose joined #ruby
jimmy1980 joined #ruby
james_cotterill joined #ruby
enikar joined #ruby
mk03 joined #ruby
workmad3 joined #ruby
MrCheetoDust joined #ruby
Reikoku joined #ruby
pantsman joined #ruby
pantsman joined #ruby
eldariof joined #ruby
workmad3 joined #ruby
Manhose joined #ruby
Seisatsu joined #ruby
fixl joined #ruby
timonv joined #ruby
cek joined #ruby
<cek> bundle outdated(1)
<cek> Show all of the outdated gems in the current bundle
<cek> $ bundle outdated
<cek> Could not find task "outdated".
Telling joined #ruby
<shevy> yeah cek
<shevy> another bundle command failed for me
<shevy> I have come to the conclusion that bundle is a pile of shit.
ikaros joined #ruby
jimmy1980 joined #ruby
<yxhuvud> perhaps, but it does decently at solving a problem rubygems doesn't solve.
<yxhuvud> you may not have that problem, or not have it yet, though.
<banisterfiend> yxhuvud: hey there ltns
<yxhuvud> heya
raythecat joined #ruby
adambeynon joined #ruby
<cek> what's the stablest version of ruby?
ognevsky joined #ruby
kirun joined #ruby
jimmy1980 joined #ruby
sidqq_ joined #ruby
<rippa> obejct.methods
workmad3 joined #ruby
<WhiteHorse> thank you
<shevy> cek 1.8.7*
<shevy> yxhuvud what problem does bundler solve?
<mksm> shevy, no, it's 1.9.2
<yxhuvud> shevy: have you ever returned to an old installation that had a dependency on several gems, but that broke when you installed the latest versions of them?
<shevy> yxhuvud hmm not really
<yxhuvud> you might counter by saying 'hey don't update your gems without knowing it will wokr', but that is easier said than done when trying to setup a development environment
<shevy> I'd never say that
<shevy> I'd say, don't use gems at all :>
<shevy> though ruby-evolution says use gems
<shevy> then we find shortcomings in gems, so we add a new program, with new shortcomings
<shevy> but I see yxhuvud, thanks
<cek> Could not find mysql-2.8.1 in any of the sources
<cek> $ gem list mysql => mysql (2.8.1)
<shevy> and "gem list" shows you what?
<shevy> and then when I do "gem list rack" it shows cack
<shevy> I mean
<shevy> *rack
<shevy> odd way to mistype rack. I blame your name on that, cek. :P
ChampS_ joined #ruby
<cek> i just don't get why it's tryign to install mysql again here
<cek> it's such a pain
<cek> maybe it's using its own repo or whatever
<cek> but i've already got separation by using rvm
<cek> pure idiotism
rpowell joined #ruby
<shevy> cek yup. that's the ruby ecosystem for ya
<cek> Your bundle is complete! It was installed into ./acl9
<cek> uh crap
<cek> bundle install acl9
Telling- joined #ruby
<cek> stupid design.
<shevy> including bugs
smgt joined #ruby
<cek> most likely written by amateur
<cek> as most of opensource crap
<shevy> oh but there are good examples of opensource
<cek> i like how ruby itself was written, on govnmt grant
<shevy> and sloppy examples of closedsource
<shevy> cek you remind me of gavino. You aren't by chance living in Los Angeles are you? :D
<cek> no i live in 3rd country where people don't care about others and thats why they're living in deep shit
<cek> *3rd world country
<shevy> yeah
<shevy> USA
<shevy> gavino is hilarious though
<shevy> he repeats the same things every day
negative joined #ruby
<shevy> "commies everywhere, low tax the solution, vote x, don't vote y"
<shevy> oops, sorry. *flat tax
burgestrand joined #ruby
_debo joined #ruby
<cek> alrighty, rm -rf .bundle and it worked
<cek> OOM condition. GREAT!
Clooth joined #ruby
<shevy> hehe
dbgster joined #ruby
Telling joined #ruby
Amirh joined #ruby
jmampost joined #ruby
banisterfiend joined #ruby
Sliker joined #ruby
pen_isident joined #ruby
Clooth joined #ruby
workmad3 joined #ruby
Morkel joined #ruby
Amirh joined #ruby
_whitelogger [_whitelogger!~whitelogg@2a00:ab00:1::4464:5550] has joined #ruby
replore [replore!~replore@ntkngw268248.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has joined #ruby
_whitelogger1 [_whitelogger1!~whitelogg@2a00:ab00:1::4464:5550] has joined #ruby
tomzx [tomzx!~tomzx@dsl-59-207.aei.ca] has joined #ruby
timonv [timonv!~timonv@188.88.86.33] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
Hellojere [Hellojere!~Hellojere@89.7.90.160] has joined #ruby
emmanuelux [emmanuelux!~emmanuel@2a01:e35:2e4d:9010:21d:60ff:fe0e:b818] has joined #ruby
enikar [enikar!~gil@cl-140.mrs-01.fr.sixxs.net] has joined #ruby
nonotza [nonotza!~nonotza@cpe-72-225-173-7.nyc.res.rr.com] has joined #ruby
jonathanrwallace [jonathanrwallace!~jonathanr@99-11-165-168.lightspeed.tukrga.sbcglobal.net] has joined #ruby
techhelp [techhelp!~Dan@ip70-162-10-229.ph.ph.cox.net] has joined #ruby
sepp2k [sepp2k!~sexy@g224100132.adsl.alicedsl.de] has joined #ruby
jimmy1980 [jimmy1980!~jimmy@112.224.2.113] has joined #ruby
WhiteHorse [WhiteHorse!~WhiteHors@201.208.150.8] has joined #ruby
flip_digits [flip_digits!~textual@c-71-199-243-97.hsd1.fl.comcast.net] has joined #ruby
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
WhiteHorse [WhiteHorse!~WhiteHors@201.208.150.8] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
luke-- [luke--!~luke--@ip-62-143-176-80.unitymediagroup.de] has joined #ruby
Reikoku [Reikoku!~reikoku@gateway/tor-sasl/reikoku] has joined #ruby
muraii [muraii!~muraii@unaffiliated/muraii] has joined #ruby
otakutomo [otakutomo!~otakutomo@KD027083117212.ppp-bb.dion.ne.jp] has joined #ruby
chessguy [chessguy!~chessguy@pool-74-96-111-119.washdc.fios.verizon.net] has joined #ruby
nari [nari!~nari@p62e5b3.totrnt01.ap.so-net.ne.jp] has joined #ruby
aef [aef!~root@neoschlageter.raxys.net] has joined #ruby
heoa [heoa!~xyz@fik5.kyla.fi] has joined #ruby
p1d_ [p1d_!~p1d@dslb-088-067-016-037.pools.arcor-ip.net] has joined #ruby
Seisatsu [Seisatsu!~seisatsu@2001:5c0:1000:a::a1] has joined #ruby
Evixion` [Evixion`!Evixion@67.235.65.134] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
lkba [lkba!~AndChat@bos124.neoplus.adsl.tpnet.pl] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
bbttxu [bbttxu!~adam@pool-71-96-208-205.dfw.dsl-w.verizon.net] has joined #ruby
jimmy1980 [jimmy1980!~jimmy@112.224.2.113] has joined #ruby
replore [replore!~replore@ntkngw268248.kngw.nt.ftth.ppp.infoweb.ne.jp] has joined #ruby
Knodi [Knodi!~Knodi@c-68-43-246-216.hsd1.mi.comcast.net] has joined #ruby
<heoa> http://pastebin.com/mUnFBQhZ <-- why pressing button (html) does not execute the Ruby -executable file?
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
linoj [linoj!~linoj@68-114-185-2.static.davl.vt.charter.com] has joined #ruby
tomhsx [tomhsx!~tomhsx@c-76-109-169-195.hsd1.fl.comcast.net] has joined #ruby
shevy [shevy!~shevy@178-191-59-3.adsl.highway.telekom.at] has joined #ruby
musee [musee!~musee@unaffiliated/musee] has joined #ruby
<burgestrand> heoa: what happens instead?
<burgestrand> Might need a type of submit on it; not sure if a mere button will submit the form.
zastaph [zastaph!~uid@unaffiliated/zastaph] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
FarhanKhalaf [FarhanKhalaf!~farhankha@cpe-76-94-123-32.socal.res.rr.com] has joined #ruby
io_syl [io_syl!~io_syl@unaffiliated/steph021] has joined #ruby
pen_isident_ [pen_isident_!~chatzilla@58.251.91.119] has joined #ruby
<heoa> burgestrand: nothing happens, you may be on the right tracks
<heoa> burgestrand: I tested 'type="submit"' but not working...
<heoa> ...instead of button
<burgestrand> heoa: and what happens instead?
<heoa> burgestrand: nothing
Manhose_ [Manhose_!~Manhose@bl18-45-1.dsl.telepac.pt] has joined #ruby
<burgestrand> Oh, hah, I missed another thing
<burgestrand> heoa: it’s not onsubmit, it’s "action"
<heoa> burgestrand: right corrected but nothing happens
<heoa> (I know the code works if I do '$ ruby ./cgi/runMe.ru')
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<burgestrand> heoa: does it post the form now?
<heoa> I am now just trying to get it run when I click button
<heoa> burgestrand: no
<burgestrand> heoa: that is odd, could you post the code to how your HTML looks now again?
i0k [i0k!~user@h-91-203.a146.priv.bahnhof.se] has joined #ruby
<heoa> burgestrand: http://pastebin.com/HBznGNMy
<burgestrand> heoa: you did not close your input tag
<heoa> burgestrand: ok now it runs but it does not do the intended.
<burgestrand> heoa: … why do you still not say what it does instead?
<heoa> burgestrand: I returns the executable file to the browser but does not execute it with Ruby
<burgestrand> there we go :)
<burgestrand> heoa: is your server configured to run cgi scripts?
<burgestrand> heoa: or, actually, do you even run it on a server?
<burgestrand> heoa: because your browser do not run these scripts; you need to serve it through a webserver that is configured to run CGI scripts
<burgestrand> heoa: I cannot help you configuring one to do that, though, I usually use sinatra (http://sinatrarb.com) or rails to do my web development
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<burgestrand> (and with those I do not need to run cgi scripts at all, most often I just run a ruby web server that can run the script within itself)
<heoa> burgestrand: but you still need to change some Apache settings?
dv310p3r [dv310p3r!~dv310p3r@adsl-74-161-100-70.mia.bellsouth.net] has joined #ruby
<heoa> burgestrand: sounds cool, how can I do it without cgi?
<heoa> burgestrand: do I need Sinatra or Rails (sorry no experience with them)?
<burgestrand> heoa: if you just need to do something small (like the example you have) I would start with sinatra because it’s fast to start and you don’t need to know much about sinatra itself
<burgestrand> heoa: try the getting started from here http://www.sinatrarb.com/intro
<burgestrand> heoa: after that, you can put your ruby code inside some other action, like "get '/run_my_flow_stuff'" and make the form post to that location
dekroning [dekroning!~dekroning@541B931D.cm-5-4c.dynamic.ziggo.nl] has joined #ruby
niklasb [niklasb!~codeslay0@p5B311048.dip0.t-ipconnect.de] has joined #ruby
<heoa> burgestrand: http://pastebin.com/NveZCxTS <--- I get this with "$ ruby sinat.rb" with the first example after "$ sudo gem install sinatra"?!
<burgestrand> heoa: don’t forget the "-rubygems" part, it is important if you use ruby 1.8
<burgestrand> Hm, actually, you require rubygems in there anyway. Looks like the gem install of sinatra did not go through.
<heoa> burgestrand: http://pastebin.com/h1YSpRRP ?
<burgestrand> heoa: do you use rvm?
<burgestrand> Really, does look like sinatra did not install.
<heoa> burgestrand: http://pastebin.com/VAUJR6Ug
<heoa> yes you are right
jetblack [jetblack!~jetblack@99-32-20-118.lightspeed.elgnil.sbcglobal.net] has joined #ruby
<burgestrand> heoa: I would try to install the gem without sudo first and see if that works. How did you install ruby?
<heoa> burgestrand: $ sudo apt-get install ruby
<burgestrand> I could almost guess that
<burgestrand> Package managers do a very good job of breaking ruby installations
<burgestrand> always when people have issues with rubygems and their ruby installations it’s their fucking package manager, it pisses me off :(
timonv [timonv!~timonv@140pc227.sshunet.nl] has joined #ruby
<heoa> burgestrand: :D ...don't be sad, I got it already working -- with Ruby 1.9.1 :D
<burgestrand> yay :)
<burgestrand> I could not help you with that problem anyway, so good :p
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
<burgestrand> heoa: you run it with ruby19 sin.rb or something now?
<heoa> burgestrand: yes and the hello-world worked, now reading to get the first example working...
<burgestrand> heoa: :)
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
Brozilla [Brozilla!~Brozilla@ip11-49-212-87.adsl2.static.versatel.nl] has joined #ruby
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
wmoxam_ [wmoxam_!~wmoxam@69-165-163-154.dsl.teksavvy.com] has joined #ruby
holybit [holybit!~alpine_st@c-75-71-177-16.hsd1.co.comcast.net] has joined #ruby
<heoa> burgestrand: http://pastebin.com/UDQU5ZHh when I click the button, it cannot handle the ruby file?!
<banisterfiend> burgestrand: what did u think of drbrain's post
<heoa> but it displays the HTML correctly
<burgestrand> banisterfiend: which post?
smgt [smgt!~simon@76.156.216.81.static.m-dp.siw.siwnet.net] has joined #ruby
<holybit> how to interpolate an array? a = [ 1, 2 ] FileList.new(WORKINGDIR).exclude(a) doesn't seem to get the values in array a into the exclude
<burgestrand> heoa: you do not need it as a CGI anymore, you can put the code from runMe.ru in sin.rb if you want, but if you still want it as a separate file I’ll see if I can make an example that runs it
nej [nej!~nej@86.58.100.99] has joined #ruby
<burgestrand> banisterfiend: will check it out in a moment
berserkr [berserkr!~david@212.122.111.205.dyn.user.ono.com] has joined #ruby
<shevy> hmm
<shevy> why am I always losing against the chess AI :(
demian`_ [demian`_!~demian_@80.149.254.69] has joined #ruby
dasfugufish [dasfugufish!~Adium@68-170-39-205.mammothnetworks.com] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
ggtoo [ggtoo!~ggtoo@122.178.2.240] has joined #ruby
<holybit> interpolate is probably not the right term, but I am still stymied
<shevy> what does interpolate mean
<shevy> do you mean .reject ?
<burgestrand> You could just do: new_array = old_array - array_of_items_to_remove
<burgestrand> holybit: ^
<burgestrand> heoa: got an example for you now
Sailias [Sailias!~jonathan@CPE0018f85e576d-CM001bd7aaaf96.cpe.net.cable.rogers.com] has joined #ruby
<burgestrand> It’s not the safest code ever (you could potentially run *any* file), but it runs
pen_isident_ [pen_isident_!~chatzilla@58.251.87.131] has joined #ruby
<burgestrand> banisterfiend: I recognize the point of having generated files in your gem, but I don’t think I’ve ever had a case where I did not want one of those files in the repository anyway
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
raluxgaza [raluxgaza!~raluxgaza@host-92-24-96-29.ppp.as43234.net] has joined #ruby
<burgestrand> banisterfiend: apart from that, I do enjoy the convenience of doing everything from the gemspec because of bundlers’ ability to grab gems from git repositories
<burgestrand> libraries that don’t have their gemspec as part of their repository, not even on the tagged release versions, are a source of pain for me
frogstarr78 [frogstarr78!~frogstarr@lan.viviotech.net] has joined #ruby
<banisterfiend> burgestrand: the issue for me is that i often want more than one gemspec
<banisterfiend> in the case of platform gems, windows binary gems vs gems that are built on installation
<banisterfiend> and maintaining 2 separate gemspecs is a pain when they share a lot of content
<banisterfiend> in fact it's more like 3 or 4 separate gemspecs
<banisterfiend> using a Rakefile to maange everything is trivial
<banisterfiend> maintaining 3/4 gemspecs is a pain
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<banisterfiend> maybe someone has a solution for my problem though :)
<shevy> ruby world has solutions to problems that work to maximum 95%
<burgestrand> banisterfiend: I feel you, but I must say I believe the case where you actually *need* to do something like this is not for everybody (first off)
<shevy> the remaining 5% will be to create new projects. until they reach the 95% maximum again
<burgestrand> banisterfiend: so yes, there needs to be some way to offload this pain from the developer
<burgestrand> but the users should not be the ones getting inconvenienced in the process
<banisterfiend> burgestrand: well anyone doing C extensions (who cares about windows kids) will encounter this
<shevy> I hate users
<shevy> I am a user too and when I am a user I hate devs
<banisterfiend> burgestrand: well the only inconvenience you're talking about are ppl who are trying to use bundler
<burgestrand> as long as I have a convenient way of saying "I want to install this gem from this location; handle it (moar dots)" I’m fine
<shevy> bundler sucks
<burgestrand> banisterfiend: yeah, pretty much all people using rails
<shevy> damn rails people are powerful
<burgestrand> banisterfiend: and, well, an example of me today when I wanted to try the HEAD version of ruby_parser from GitHub
<burgestrand> banisterfiend: just to see if my own code would build on it
nicoulaj [nicoulaj!~nicoulaj@pas38-5-82-244-59-208.fbx.proxad.net] has joined #ruby
<burgestrand> perhaps bundler is at fault for this, I don’t know
<holybit> here is my rake script, http://pastie.org/2996338, can't seem to get the FileUtils exclude piece to work as the match strings in dist_exclude don't seem to work in the exclude method
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
<shevy> what is .exclude ?
<shevy> something specific to FileList ?
<burgestrand> Yeah
<holybit> shevy: yes
<burgestrand> Not sure how up-to-date that documentation is, but there it is
Rango [Rango!~Scott@88-110-188-238.dynamic.dsl.as9105.com] has joined #ruby
<burgestrand> Perhaps the issue is that they’re directories? Have you tried excluding a file?
<holybit> trying out rake as a replacement to Ant which I am tired off, especially the XML syntax
<burgestrand> Longshot, but hey.
Ilithya [Ilithya!Ilithya@2a02:1610:1:0:20c:29ff:feb3:d0ff] has joined #ruby
RomD [RomD!~Roman@nrbg-d932340b.pool.mediaWays.net] has joined #ruby
<shevy> hehe holybit
<shevy> well pretty everything is better than XML
burgestrand [burgestrand!~burgestra@h-163-174.a155.priv.bahnhof.se] has joined #ruby
<dotsolo> cool, im not the only one that finds XML annoying
<holybit> if i change the arg syntax to exclude to be .exclude('./', './dist/', './offline/') it work perfectly
<Tachyx> is it possible to write if as one liner ?
<shevy> holybit no idea but
<shevy> I'd never want to use something like FileList
<holybit> it's as if by using .exclude(dist_exclude) doesn't not put the array into the exclude piece
<burgestrand> Oh, duh.
<shevy> in pure ruby the solution would be already given
<burgestrand> holybit: exclude(*dist_exclude)
<Mon_Ouie> holybit: You probably want a splat then
<dotsolo> lol, love to splay
<Mon_Ouie> which is what burgestrand used there
<heoa> burgestrand: thanks, it works -- but it takes while I read it -- not yet fully understood the "Result: ..." -part, while it could not just be on the same page as earlier?
<burgestrand> swedish avenger
<dotsolo> splat :]
<holybit> ah!!
<holybit> sorry, total noob, been writing perl for many years and first excursion into ruby
<holybit> i swear I googled hard, but couldn't figure it out
<shevy> cool
<burgestrand> heoa: what do you mean with same page as earlier?
<shevy> perl guy coming to ruby :)
<heoa> burgestrand: clicking the button and staying on the same page
<holybit> i am trying to copy a directory recursively to a new location and exclude certain files and dirs, is there a gem I should look at or is this cook your own territory?
<shevy> in pure ruby sure
<shevy> for recursive copying you can use FileUtils like
<Harzilein> shevy: well, i'm a perl guy as well. just started ruby for rails at work. now when i need to write scripts i do that in ruby too. i have some problems with rvm though, as it seems to only want to manage gems, not random script collections
<shevy> FileUtils.cp_r(this_dir, where_to, { :verbose => true})
<burgestrand> heoa: oh, it’s not how HTML/HTTP works; you must post somewhere. You can post to the same page you are on, but it will still reload the page
<shevy> holybit, just use a .reject on your array first and reject all matches that should not be copied
<Mon_Ouie> In Rake FileUtils is already included
<Mon_Ouie> i.e. you can just do cp_r from, to
<Mon_Ouie> And it is verbose (so it prints "cp -r from to" in the terminal)
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
pantsman [pantsman!~pantsman@2.25.208.217] has joined #ruby
pantsman [pantsman!~pantsman@pdpc/supporter/active/pantsman] has joined #ruby
jimmy1980 [jimmy1980!~jimmy@112.224.3.42] has joined #ruby
<shevy> cool
<shevy> that'll help holybit even more
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
<holybit> thanks for the help all, have to split to drive the kid to the mall … peace to all
|RicharD| [|RicharD|!~|RicharD|@93-41-164-237.ip82.fastwebnet.it] has joined #ruby
<|RicharD|> anyone can please tell me what are
<|RicharD|> ! or ?
Blacktow3x [Blacktow3x!~Blacktow3@196.217.241.18] has joined #ruby
<|RicharD|> and end of a method ?
<|RicharD|> where i can read more ?
<Mon_Ouie> They're just part of the method name
<|RicharD|> not done nothing ?
<Mon_Ouie> ? means it's a question, i.e. it will usually return either true or false
<|RicharD|> for example
<rippa> it's a coding convention
<|RicharD|> def example end
<|RicharD|> i can do example?
<Mon_Ouie> ! means it's dangerous, or that there's a slight difference with the non-bang version
<rippa> |RicharD|: no
<rippa> def example? end
<rippa> now you can
<Mon_Ouie> No, because you defined the example method, not the example? method
<|RicharD|> ah ok
<|RicharD|> so it's just for remember
<|RicharD|> well
<|RicharD|> better*
<|RicharD|> so usualy ? return what ?and ! ?
<|RicharD|> for conventions...
jay_zawrotny [jay_zawrotny!~Jay@c-71-205-193-222.hsd1.mi.comcast.net] has joined #ruby
raythecat [raythecat!~raythecat@cpe-76-88-24-94.san.res.rr.com] has joined #ruby
<heoa> burgestrand: is it necessarily to do such dummy CGI -folder or can you do it without it in sinatra?
<heoa> err necessary
<burgestrand> heoa: I just made it so we have a certain folder to put everything inside, as you can see from the other action (get '/cgi/:file') we decide what it does when we go to /cgi/runMe.ru
<shevy> |RicharD| the convention is that "foo?" returns a Boolean value, either true or false. Cindy.has_kids? # => false
<shevy> |RicharD|.understood_this? # => true
<shevy> and "foo!" would modify the reciever or however it is called.
<shevy> array = %w( a b c ) # => ["a", "b", "c"]
<|RicharD|> for ? ok
<shevy> array.reject! {|x| x == 'a'}
<shevy> array # => ["b", "c"]
<|RicharD|> for ! i haven't know...:(
<shevy> well, there you see a method with !
<shevy> it modifies array, you see that?
<shevy> the first element died
Amirh [Amirh!~amir@2.181.16.51] has joined #ruby
<heoa> burgestrand: but why do we really need even CGI here? Is it possible do it without such dummy file?
<|RicharD|> so ? when the method return a boolean value
<burgestrand> heoa: yup, the sinatra action just calls any kind of file, we can do whatever we want
<heoa> burgestrand: this is basically just running a small code
<|RicharD|> and ! for a method that modific array ?
Tachyx [Tachyx!~tach@81.200.61.23] has joined #ruby
<Mon_Ouie> No, they modify the receiver
<Mon_Ouie> That is, usually, and if there's also a non-bang version of the method
<|RicharD|> you can tell me a code example
<|RicharD|> pls ?
<Mon_Ouie> "foo".upcase! # not an array
quest88 [quest88!~quest88@c-98-207-205-137.hsd1.ca.comcast.net] has joined #ruby
<Mon_Ouie> but e.g. Kernel#exit! doesn't modify anything
<|RicharD|> umh
<|RicharD|> but upcase!
<Mon_Ouie> It just means it's a dangerous variant of Kernel#exit
<|RicharD|> is declarated by me ?
<shevy> |RicharD| it is part of ruby
<shevy> class String
<shevy> |RicharD| you should use IRB
<|RicharD|> ok
<|RicharD|> but it's already defined
<Mon_Ouie> You should use Pry :p
<|RicharD|> as def upcase!
<shevy> or read through the docs to Array and String at least ONCE ;)
<|RicharD|> right ?
<shevy> yes
<|RicharD|> ok
<shevy> class String
<shevy> def upcase!
<|RicharD|> i read the docs about array and string
<|RicharD|> in a book
<shevy> # do something here, then probably use replace()
<|RicharD|> but it not talk about !
<shevy> good
<shevy> but you know "upcase" without "!"?
<shevy> x = "abc"
<shevy> x.upcase!
<shevy> x # => "ABC"
<shevy> now x is "ABC"
<|RicharD|> yes
<|RicharD|> ok
<|RicharD|> so
<|RicharD|> ! it used when change some thing
<|RicharD|> on receiver data
<|RicharD|> right ?
<shevy> yeah
<shevy> but
<shevy> <Mon_Ouie> That is, usually, and if there's also a non-bang version of the method
<shevy> ^^^ don't forget that |RicharD|
<shevy> when you have .upcase! you usually have .upcase too
linduxed [linduxed!~linduxed@194-14-0-85.serioustubes.org] has joined #ruby
<|RicharD|> oki
<|RicharD|> for example i use .upcase for number
<|RicharD|> as the your example
<|RicharD|> 9.upcase(11)
<|RicharD|> instead "abc".upcase! for then have ABC
ank [ank!~ank@c-67-172-16-188.hsd1.pa.comcast.net] has joined #ruby
<shevy> what would 9.upcase(11) do
<heoa> burgestrand: sorry but I cannot understand the root path and the file thing, why like: get '/' do <--- is this just convention or why root?
<shevy> it's a bad example |RicharD| ;)
<shevy> numbers dont have lowercase or upcase
<|RicharD|> yes i have wrong
<|RicharD|> :D
<shevy> also I think they dont have a "foo!" method scheme
<shevy> because they are not real objects or?
<|RicharD|> i saw upto method
<|RicharD|> on your example
<shevy> upto?
<shevy> my example?
<|RicharD|> yes
<|RicharD|> your
<|RicharD|> link
<shevy> ah, look at the one above that
<shevy> "hEllO".upcase #=> "HELLO"
<shevy> .upcase and .upcase!
<burgestrand> heoa: get(path) is the way to tell sinatra which ruby code is executed for which path
<burgestrand> heoa: get '/' { … code … } tells sinatra that when you go to http://localhost:4567/ (notice trailing /) the code in that block will run
<burgestrand> heoa: same if we do "get('/hello') { … code … }", that code will run if we go to http://localhost:4567/hello
<|RicharD|> umh
<|RicharD|> i have tried
<|RicharD|> "hello".upcase and .upcase! same result
<|RicharD|> if instead i do:
<|RicharD|> "HELLO".upcase give me HELLO
<|RicharD|> instead with upcase! give me nil
<shevy> |RicharD| yes but
<shevy> assign "hello" to a variable
<shevy> x = "hello"
<|RicharD|> ok
<shevy> now try .upcase! on x
<shevy> and compare it to .upcase
bier [bier!~bier@p54A5A269.dip.t-dialin.net] has joined #ruby
<|RicharD|> umh i tried with a.upcase
<|RicharD|> and x.upcase!
<|RicharD|> print same thing but then if i do:
<shevy> where does the "a." come from ;)
<|RicharD|> puts a give me hello
<|RicharD|> puts x give me HELLO
<|RicharD|> and with x var i have used .upcase!
<shevy> |RicharD| can you upload your code to pastie.org
<|RicharD|> yes sure
lonny [lonny!~lonny@122.177.184.183] has joined #ruby
hometurf [hometurf!~hometurf@129.21.125.77] has joined #ruby
<shevy> |RicharD| http://pastie.org/2996520
<|RicharD|> shevy: http://pastie.org/2996525
<hometurf> hey guys, anyone know of a way to force ruby to use IPv6 when using the Net classes (such as http and ftp)
michael_mbp [michael_mbp!~Marin@112.134.199.43] has joined #ruby
<shevy> well yeah |RicharD|
Blacktow3x [Blacktow3x!~Blacktow3@196.217.241.18] has quit ["Quitte"]
<|RicharD|> so .upcase
<shevy> |RicharD| with .upcase! you modify self, with .upcase you do not
<|RicharD|> only show the var UPPERCASE
<|RicharD|> but not change it
<shevy> yeah
<|RicharD|> ah ok perfect :D
<shevy> :)
<|RicharD|> so i can use upcase on the fly for show it as i want
<|RicharD|> instead for change it
<|RicharD|> only upcase!
<|RicharD|> so for convention the ! will be used for modify a thing
<|RicharD|> correct ?
<shevy> yes
subsu [subsu!~daniel@c80-217-206-12.bredband.comhem.se] has joined #ruby
<|RicharD|> very good and thx for the information
<hometurf> anyone know a way to force ruby to use IPv6 when making a NET (HTTP, FTP...) request? such as curl's "-6" option
wyhaines [wyhaines!~wyhaines@65.39.118.15] has joined #ruby
dagnachewa [dagnachewa!~dagnachew@modemcable142.238-179-173.mc.videotron.ca] has joined #ruby
JakeyChan [JakeyChan!~JakeyChan@ec2-175-41-238-53.ap-northeast-1.compute.amazonaws.com] has joined #ruby
thone_ [thone_!~thone@g226049152.adsl.alicedsl.de] has joined #ruby
lkba [lkba!~AndChat@bos124.neoplus.adsl.tpnet.pl] has joined #ruby
RDove [RDove!~ronnie@unaffiliated/rdove] has joined #ruby
closedbook [closedbook!~christono@twdp-174-109-172-122.nc.res.rr.com] has joined #ruby
sbanwart__ [sbanwart__!~sbanwart@99.177.126.136] has joined #ruby
wmoxam [wmoxam!~wmoxam@75-119-229-148.dsl.teksavvy.com] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<closedbook> Question on here docs. I tried wrapping one in a function (like a prompt that I could call whenever I like instead of writing it over and over again). However, it get this error: can't find string "BLACKFOREST_PROMPT" anywhere before EOF (SyntaxError)
mattalexx [mattalexx!~mattalexx@pdpc/supporter/active/mattalexx] has joined #ruby
<mattalexx> Is there a way to take an array of values and not only join them but enclose each in quotes?
sbanwart__ [sbanwart__!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
conor_ireland [conor_ireland!~conor_ire@89.100.121.49] has joined #ruby
<conor_ireland> hi
<mattalexx> turn [ 'foo', 'bar' ] into a string that looks like this: 'foo', 'bar'
<conor_ireland> does anyone know any good examples of inheritance used internalyy in the design of ruby?
<Mon_Ouie> closedbook: that means you didn't put the delimiter to end the string in the file
<Mon_Ouie> e.g. foo(<<BAR)\n…\nno BAR here
headius [headius!~headius@71-210-151-185.mpls.qwest.net] has joined #ruby
<closedbook> I did put the delimiter in, but it only works when it's not indented to be in line with the function name (this function is in a class)
failshell [failshell!~failshell@modemcable237.159-58-74.mc.videotron.ca] has joined #ruby
<closedbook> here's the class I'm trying to write: https://gist.github.com/1455676
<failshell> hello. what's a good way to validate an input that receives a domain name? is there a good gem for that?
Beoran__ [Beoran__!~beoran@ip-213-49-93-142.dsl.scarlet.be] has joined #ruby
igors [igors!~igors@201.53.10.123] has joined #ruby
<hometurf> anyone know a way to force ruby to use IPv6 when making a NET (HTTP, FTP...) request? such as curl's "-6" option?
<hometurf> anything i can do with AF_INET6?
maletor [maletor!~maletor@c-69-181-28-195.hsd1.ca.comcast.net] has joined #ruby
<igors> hello. how can i find out the filename loaded when I do `require 'optparse'` for example?
iamjarvo [iamjarvo!~Adium@pool-96-245-10-45.phlapa.fios.verizon.net] has joined #ruby
subsu [subsu!~daniel@c80-217-206-12.bredband.comhem.se] has quit [#ruby]
workmad3 [workmad3!~workmad3@cpc1-bagu10-2-0-cust81.1-3.cable.virginmedia.com] has joined #ruby
KonaB1end [KonaB1end!~KonaB1end@unaffiliated/konab1end] has joined #ruby
<KonaB1end> hi does ruby support a non-interpolated here document? i.e.: s = <<EOF where it behaves like single quotes, not double
<heoa> burgestrand: am I misunderstading the get? https://bitbucket.org/heoa/sinatra-testing/src/a39171aa3562/app.rb . I mixed your code there, just changed that the clicking will return the same file with button but it changes the URL for some reason?!
<burgestrand> heoa: why would it no change the URL?
<heoa> I think my err is on lines 15-20
<burgestrand> heoa: the form action is the attribute that decides where the user ends up when she posts the form
sbanwart__ [sbanwart__!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<burgestrand> heoa: it always changes the page, always; even if you post to the current page, it will reload the page
<burgestrand> this is how the web works; you can do a lot of funky stuff with javascript and post it asynchronously but I can’t help you with that it’s too much to teach
<heoa> burgestrand: is it possible to do some -- repeat?
Knodi [Knodi!~Knodi@c-68-43-246-216.hsd1.mi.comcast.net] has joined #ruby
<KonaB1end> ah found it. s = <<'EOF'
KonaB1end [KonaB1end!~KonaB1end@unaffiliated/konab1end] has quit [#ruby]
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<heoa> burgestrand: I mean on line 6, is it possible to have there some repeat so that it will execute that part infinitely
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<heoa> ?
<burgestrand> heoa: I don’t understand, execute what part infinitely?
<heoa> burgestrand: it is bad coding on lines 15-21, no reuse
<heoa> burgestrand: I am trying to reuse the lines 5-12
<heoa> so that clicking will not change the page...
<heoa> but clicking will return the same page
<burgestrand> heoa: make the action=""
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<heoa> burgestrand: ?
<burgestrand> heoa: the form action, make it empty, it will make the form post to the current URL
<heoa> burgestrand: but then it does not do anything?
<heoa> burgestrand: I want that clicking will return the form and execute the Ruby file
<Mon_Ouie> closedbook: Yes, it has to be at the beginning of the line
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
<Mon_Ouie> Unless you use <<-delimiter
<heoa> burgestrand: click; execute ruby -file; return the form; click; execute ruby -file; return form...
<burgestrand> heoa: in that case I would post to /cgi/:file, but redirect back to /
<closedbook> ah ok
<closedbook> thanks Mon_Ouie.
kennyd [kennyd!~kennyd@93-139-113-29.adsl.net.t-com.hr] has joined #ruby
kennyd [kennyd!~kennyd@93-139-113-29.adsl.net.t-com.hr] has quit [#ruby]
<burgestrand> heoa: updated the code: http://goo.gl/85rU0
<burgestrand> heoa: see line #18
cafesofie [cafesofie!~user@ool-18b97779.dyn.optonline.net] has joined #ruby
Manhose [Manhose!~Manhose@bl18-45-1.dsl.telepac.pt] has joined #ruby
sbanwart__ [sbanwart__!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
stayarrr [stayarrr!~olivererx@dslb-178-009-059-241.pools.arcor-ip.net] has joined #ruby
dotnull [dotnull!~DotNull@173-31-158-182.client.mchsi.com] has joined #ruby
raythecat [raythecat!~raythecat@209.144.63.76] has joined #ruby
<heoa> burgestrand: https://bitbucket.org/heoa/sinatra-testing/changeset/601003837a03 <-- Is there some alert('now here in executable') -command to see where it ends up in code?
<heoa> burgestrand: not yet merged your patch but locally yes, trying to get some alert now that I can see what happens...
<burgestrand> heoa: if you puts, it’ll be shown in the console so you can look in there
<burgestrand> heoa: no idea what your alert thing is supposed to do though
<heoa> burgestrand: browser alert...
<burgestrand> heoa: your ruby code is not run in the browser
perryh [perryh!~root@far2678.urh.uiuc.edu] has joined #ruby
perryh [perryh!~root@unaffiliated/perry753] has joined #ruby
<heoa> burgestrand: https://bitbucket.org/heoa/sinatra-testing/changeset/69e17f491be8, cannot still see the line 7?!
<heoa> even with puts, I mean cannot see it on console
milkpost [milkpost!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
negaduck [negaduck!~negaduck@213.141.130.13] has joined #ruby
sbanwart__ [sbanwart__!~sbanwart@99-177-126-136.lightspeed.bcvloh.sbcglobal.net] has joined #ruby
<heoa> burgestrand: https://bitbucket.org/heoa/sinatra-testing/changeset/981bcbb83a8f <--- I can see this puts but I cannot see the other puts, it does not execute the cgi?! Investigating
<burgestrand> heoa: change %x[#{cgi_path}] to system(cgi_path)
<burgestrand> %x[] traps stdout and returns it as the result of the expression
<burgestrand> system() just lets it print
kartouch [kartouch!~kartouch@kartouch.ic-clear.eu] has joined #ruby
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
MissionCritical [MissionCritical!~MissionCr@unaffiliated/missioncritical] has joined #ruby
apok [apok!~apok@96.24.67.22] has joined #ruby
tydeas [tydeas!dmtrs@gateway/shell/devio.us/x-dlbzhgtsfvewxhpl] has joined #ruby
tydeas [tydeas!dmtrs@gateway/shell/devio.us/x-dlbzhgtsfvewxhpl] has quit [#ruby]
tvo [tvo!~tvo@katapult/developer/tvo] has joined #ruby
closedbook [closedbook!~christono@twdp-174-109-172-122.nc.res.rr.com] has quit [#ruby]
beaknit [beaknit!~nsmc@c-76-100-136-106.hsd1.md.comcast.net] has joined #ruby
failshell [failshell!~failshell@modemcable237.159-58-74.mc.videotron.ca] has joined #ruby
<heoa> burgestrand: thanks got it working, now to other puzzle :)
<burgestrand> :)
<heoa> is there some source('file.ru') -command in Ruby?
<burgestrand> what would it do?
<heoa> I find it slow to copy/paste private API -keys to code not to make them public
<heoa> burgestrand: I have a file in .gitignore that sources the private API key
friskd [friskd!~friskd@cpe-76-172-40-14.socal.res.rr.com] has joined #ruby
<heoa> burgestrand: In my cgi -file, I want just to source the vars.ru -file so that I do not need to copy-paste it to-and-thro...
mikepack [mikepack!~mikepack@c-174-51-77-22.hsd1.co.comcast.net] has joined #ruby
<heoa> ...basically just '$ source file.sh' but now in ruby... how?
<heoa> where file.sh has vars to use later in code
<burgestrand> depends what that file looks like, you need to read it somehow
<burgestrand> you can use require, but local variables do not leak when requiring in ruby
<burgestrand> also, you should know the most common file prefix is rb, not ru
<failshell> I'm coding with Sinatra too right now
<failshell> love it so far
smgt [smgt!~simon@76.156.216.81.static.m-dp.siw.siwnet.net] has joined #ruby
<burgestrand> heoa: but you can, in vars.rb, do $api_token = 'whatever-token', and then require 'vars.rb'
tshauck [tshauck!~tshauck@129.237.222.1] has joined #ruby
raythecat [raythecat!~raythecat@209.144.63.76] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
kassien [kassien!~kassien@218.240.145.56] has joined #ruby
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
manizzle [manizzle!~manizzle@adsl-99-102-133-31.dsl.pltn13.sbcglobal.net] has joined #ruby
<heoa> burgestrand: https://bitbucket.org/heoa/sinatra-testing/src/9409f5304d97/cgi/runMe.rb , is this what you mean? (still get some err)
<heoa> vars.rb is in ./cgi/vars.rb
<heoa> $ ruby1.9.1 ./cgi/runMe.rb fires errs with the vars
brownies [brownies!~brownies@unaffiliated/brownies] has joined #ruby
<heoa> vars.rb contains simply: $APIkey ='xxxxxxxxxxxxxxxx'
<heoa> now on line 12, I am trying to use that
<brownies> mornin'
<heoa> but it fires errs
<heoa> is the line 5 wrong?
<heoa> should it be: require './cgi/vars.rb' ?
<burgestrand> heoa: I cannot guess your errors
<burgestrand> heoa: *what* errors?
sepp2k [sepp2k!~sexy@g224099114.adsl.alicedsl.de] has joined #ruby
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<heoa> burgestrand: excellent question, for some reason, it returns now err with requiring the FD thing: http://pastebin.com/5PCrZSKp
<heoa> investigating...
<failshell> let's say in sinatra, i want a page to display the layout, and then, to add more to it, as the process goes on.
guest42_ [guest42_!natsel@72.20.53.166] has joined #ruby
<failshell> right now, i want to build a tool that will take a domain name as input, and run tests on it
<failshell> i would like each test's output to be displayed as it's ready
<failshell> i just have no clue what technique to use
<burgestrand> failshell: http://www.sinatrarb.com/intro#Streaming%20Responses
<burgestrand> :)
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
<failshell> burgestrand: i knew it would be something simple :) thanks a lot
<failshell> i like sinatra so much
<failshell> i was a pythonista in the past. but I'm moving to ruby these days, like it a lot more
_debo [_debo!~marco.deb@cpc18-enfi16-2-0-cust743.hari.cable.virginmedia.com] has joined #ruby
<heoa> for some reason, it interprets require 'flowdock' to be a file, not a package like rubygems?!
<burgestrand> heoa: it’s not a package, the distinction vs installed gem and file does not exist
<heoa> burgestrand: but I cannot still understand why it started to shout err with this thing, totally unrelated to the change?!
<burgestrand> heoa: you just require, and ruby/rubygems just tries to find it depending on very few rules, but in the end it’s always a file getting required
Indian_ [Indian_!~Indian@unaffiliated/londonmet050] has joined #ruby
<heoa> it is like something has got broken?!
looopy [looopy!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<heoa> with the flowdock
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
<burgestrand> heoa: have you tried ruby1.9.1 -rubygems cgi/runMe.rb
Jrz [Jrz!~jrz@d152222.upc-d.chello.nl] has joined #ruby
<conor_ireland> does anyone know any good code examples of template methods in ruby?
<burgestrand> conor_ireland: what’s a template method?
<Mon_Ouie> If you mean something like C++ template, there is no such thing in Ruby
<Mon_Ouie> Nor is there any need for it, due to duck typing
<conor_ireland> burgestrand: like a PlayGame method that has abstract type methods inside it that are overidden in subclasses
<heoa> burgestrand: http://pastebin.com/AHWrVY1F <-- confused?!
kuber [kuber!~kuber@unaffiliated/kuber] has quit [#ruby]
<burgestrand> conor_ireland: then what Mon_Ouie said :)
<heoa> (perhaps my SSD hdd is getting too hot now and firing random errs)
<conor_ireland> burgestrand: hmm ok thanks Mon_Ouie also
<burgestrand> heoa: all I see is you interrupting the install with ^C
<heoa> burgestrand: yes I tried that, it complains still about the flowdock
<conor_ireland> so you dont use the template design pattern in ruby?
<heoa> burgestrand: yes but look at the invalid things...
<heoa> burgestrand: ok got it installed but still get the odd err with flowdock as file...
<heoa> (I had it installed already so it cannot be that, the flowdock thing is missing)
<burgestrand> heoa: it is installing it on ruby 1.8, but you run your code with ruby1.9.1
<burgestrand> heoa: don’t you have some gem1.9.1 or something?
<burgestrand> (also, ruby 1.9.1 is unstable, you should probably use 1.9.2 or 1.8.7)
cafesofie [cafesofie!~user@ool-18b97779.dyn.optonline.net] has joined #ruby
<heoa> burgestrand: right! Now, this must be because FD has some duplicate spam filters, now I need to get some random Lorm ipsun as message that I can see that it works...
ilyam [ilyam!~ilyam@c-67-188-113-128.hsd1.ca.comcast.net] has joined #ruby
bluOxigen [bluOxigen!ssf@unaffiliated/bluOxigen] has joined #ruby
cdepue [cdepue!~cdepue@200.117.80.85] has joined #ruby
rickmasta [rickmasta!~rickmasta@pool-108-21-213-102.nycmny.fios.verizon.net] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
sbinetd [sbinetd!~sbinetd@94-193-244-239.zone7.bethere.co.uk] has joined #ruby
guest42_ [guest42_!natsel@72.20.53.166] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<asQuirreL> gah fuuuuuuuuuu emacs
<asQuirreL> every time i go to search for something using the rinari search shortcut, I have to remember the shortcut... and then I forget what I'm searching for >.>
<asQuirreL> *every time*
<heoa> is there similar command to LaTex's input{laytout.html} in Ruby?
<asQuirreL> heoa: what does the LaTeX command do?
<heoa> asQuirreL: I would like to replace the lines 7-11 with simple command \input{layout.html}, https://bitbucket.org/heoa/sinatra-testing/src/072e0805b1f6/app.rb
ece1 [ece1!root1@never.at.home.kg] has joined #ruby
<asQuirreL> i'll have a look
<asQuirreL> ah right
Coty91 [Coty91!~coty@96-32-145-105.dhcp.gwnt.ga.charter.com] has joined #ruby
<asQuirreL> so you want to take that html and have it in a file and just call a function and have it appear in that area
<asQuirreL> does <<-HTML..HTML just return a string?
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
<heoa> asQuirreL: yes to 21:27
<asQuirreL> heoa: right, and to :28? :P
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
<heoa> asQuirreL: burgestrand I am not quite sure, Burgerstrand provided me this code :P ...investigating
<asQuirreL> heoa: I see
<heoa> asQuirreL: I am just refactoring :)
<asQuirreL> well why do you want the html in a separate file? :P
<heoa> asQuirreL: because my HTML -file with CSS and etc is very long, hard to read
<heoa> I have all styles and layouts in directory Layouts ready
<asQuirreL> heoa: I see
<heoa> I find it bad coding to insert it there, bad coding indeed...investigating
<asQuirreL> well this is an issue because I'm almost certain that sinatra will break all your relative references
<asQuirreL> regardless of how you do it
Mon_Ouie [Mon_Ouie!~Mon_Ouie@subtle/user/MonOuie] has joined #ruby
<asQuirreL> but yes, it is bad style to be using constants, I take your point :P
<asQuirreL> or literals, even
<heoa> asQuirreL: perhaps something to do with "Embedded Templates"? http://www.sinatrarb.com/intro#Embedded%20Templates
<asQuirreL> heoa: you can just use File.read() to read in your index.html file
<asQuirreL> heoa you could use inline templates
<asQuirreL> but that's probably just as bad
<asQuirreL> if you are against literals
<asQuirreL> it just means the html is all at the end as opposed to in the middle of the ruby
chrxn [chrxn!chrxn@69.4.233.32] has joined #ruby
Clooth [Clooth!~Clooth@ZYYKDCCXXVII.gprs.sl-laajakaista.fi] has joined #ruby
altivec_ [altivec_!~altivec@95.105.22.75.dynamic.ufanet.ru] has joined #ruby
<heoa> asQuirreL: thanks, got it working. This is nice, https://bitbucket.org/heoa/sinatra-testing/changeset/36b8bf6188fe
dcarper [dcarper!~Adium@c-76-125-233-64.hsd1.pa.comcast.net] has joined #ruby
<heoa> asQuirreL: it keeps logic separate from the template :)
<asQuirreL> heoa: that it does :P
<asQuirreL> lmao xD I feature in the commit message, nice :P
raythecat [raythecat!~raythecat@cpe-66-27-147-33.socal.res.rr.com] has joined #ruby
niklasb [niklasb!~codeslay0@p5B311048.dip0.t-ipconnect.de] has joined #ruby
altivec [altivec!~altivec@136.169.139.238] has joined #ruby
malkomalko [malkomalko!~malkomalk@pool-72-68-160-24.nycmny.east.verizon.net] has joined #ruby
<Harzilein> wtf. i always write [[] instead of \[ in regex. in ruby this gives me a warning apparently:
<Harzilein> /home/harzilein/bin/phpbbthread.rb:11: warning: character class has `[' without escape
<asQuirreL> Harzilein: yeah, you need to escape the characters in a character class as well :P
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
<asQuirreL> like this [\[]
<asQuirreL> so you're probably better off just escaping it to begin with :P
<Harzilein> asQuirreL: yeah, i get that from the warning, but why?
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
<asQuirreL> Harzilein: it's less ambiguous for the parser
<Harzilein> asQuirreL: it's a pretty common idiom
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
<asQuirreL> huh, I've never seen that before, although I don't generally try and read other people's regex xD
<Harzilein> only restriction in posix regex is that ] needs to be the first character in the character class
<Harzilein> but [ should be unambiguous
<asQuirreL> Harzilein: so in posix, this doesn't cause any problems: [][] ?
igotnolegs [igotnolegs!~igotnoleg@174-27-220-21.slkc.qwest.net] has joined #ruby
<Harzilein> it doesn't no.
<Harzilein> +,
<asQuirreL> well damn
<rippa> but you can
<rippa> [a[b[c]]]
<asQuirreL> rippa: ew.
<rippa> works in ruby
<asQuirreL> rippa: are those nested classes....?
<rippa> yes
<Harzilein> harzilein@debian:~$ (echo 'foo [ bar' ; echo 'foo ] bar') | grep '[][]'
<Harzilein> foo [ bar
<Harzilein> foo ] bar
<Harzilein> why would i want to nest classes?
<asQuirreL> rippa: that's not what Harzilein wants. He wants the [ to be a member of the character class
scr1bbles [scr1bbles!~scribbles@babel.sn0wcrash.info] has joined #ruby
<rippa> I know
<rippa> I'm just sayian
<rippa> that this regex parser works differently
<rippa> and it may be ambiguous
<Harzilein> asQuirreL: well, the fact that ruby gives meaning to nested classes is an argument to not support specificall having support for recognizing [ and ] as characters in them
<Harzilein> i guess i'll have to get accustomed to escaping with \ then. which is a combined keystroke on international keyboards ;)
<Harzilein> (well, so is [, but at least you don't need to travel a lot while typing)
<asQuirreL> Harzilein: the simple solution there of course, (clearly) is to buy a US keyboard.... xD
<Harzilein> nested character classes... -.-
<asQuirreL> (I'm not from the US, by the way)
<asQuirreL> Harzilein: As an idea, they seem quite nice, and logical
<asQuirreL> I'm never going to use a nester character class though
<asQuirreL> for obvious reasons
RLa [RLa!~RL@133.220.190.90.dyn.estpak.ee] has joined #ruby
Tachyon__ [Tachyon__!~tach@81.200.61.23] has joined #ruby
Tachyon__ [Tachyon__!~tach@81.200.61.23] has joined #ruby
<Harzilein> maybe i should just write a minimal parser for my case. then i can support a whole bunch of nested [] myself %-)
<asQuirreL> Harzilein: that would be the ruby mentality...
Russell^^ [Russell^^!~Russell^^@88.97.51.87] has joined #ruby
<Harzilein> (i want to scrape a phpbb forum and the post count is in square brackets)
<asQuirreL> oic
<asQuirreL> Harzilein: I had to do something similar
<asQuirreL> but it was reversing a to_s on an array
<asQuirreL> this is probably like the millionth time I've posted this particular regex on here, but whatever: /\[([^\[\]]+)\]/
cdepue [cdepue!~cdepue@200.117.80.85] has joined #ruby
tshauck [tshauck!~tshauck@129.237.222.1] has joined #ruby
stephenjudkins [stephenjudkins!~stephen@c-76-115-1-70.hsd1.or.comcast.net] has joined #ruby
daniel_hinojosa1 [daniel_hinojosa1!~danno@c-68-35-182-153.hsd1.nm.comcast.net] has joined #ruby
<rippa> asQuirreL: JSON[array.to_s]
<rippa> works only on numbers and string, ofc
<asQuirreL> rippa: yeah that won't help in my case
<asQuirreL> the array contained my own data type
<asQuirreL> it's for a computer algebra system that incorporates matrices
steph021 [steph021!~steph021@unaffiliated/steph021] has joined #ruby
PaciFisT [PaciFisT!~PeaCE@76-10-149-67.dsl.teksavvy.com] has joined #ruby
mickn [mickn!~user@unaffiliated/mickn] has joined #ruby
kirun_ [kirun_!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
BrianJ [BrianJ!~textual@64.134.224.60] has joined #ruby
<heoa> http://stackoverflow.com/questions/1535999/how-do-i-do-html-forms-with-sinatra <-- how can I access form paremeters in Sinatra?
<heoa> post[1] or post[title] there?
workmad3 [workmad3!~workmad3@84.45.226.85] has joined #ruby
saschaheylik [saschaheylik!~sascha@80-121-34-26.adsl.highway.telekom.at] has joined #ruby
saschaheylik [saschaheylik!~sascha@80-121-34-26.adsl.highway.telekom.at] has joined #ruby
<burgestrand> heoa: params
<shevy> hmm with array.uniq I get a uniq listing of all elements of the array. How to get the non-unique ones?
<burgestrand> heoa: like it says in the answer :)
<asQuirreL> shevy: "array"
workmad3 [workmad3!~workmad3@84.45.226.85] has joined #ruby
<burgestrand> shevy: array - array.uniq perhaps?
<asQuirreL> shevy: array.uniq doesn't only give you the elements that are on their own
<asQuirreL> as in
apeiros_ [apeiros_!~apeiros@77-58-115-24.dclient.hispeed.ch] has joined #ruby
<asQuirreL> [1,1,2,3].uniq => [1,2,3], it's not [2,3]
<burgestrand> heoa: as for your question about splitting up, have a look at the views chapter: http://www.sinatrarb.com/intro#Views%20/%20Templates
<asQuirreL> I've got a question about sinatra....
<asQuirreL> what would you actually use it for? :P
<burgestrand> asQuirreL: is that it?
<burgestrand> asQuirreL: ah :p
<asQuirreL> burgestrand: is what it? :P
<burgestrand> asQuirreL: I use it for a bunch of small-to-medium sized things for one person
<asQuirreL> burgestrand: oh right
<asQuirreL> well, I only ask, because I'm currently working on a rails project
<asQuirreL> which isn't data driven at all
<burgestrand> asQuirreL: might I say, I have nothing against rails, I work with it
<asQuirreL> it only has maybe 5 pages
<asQuirreL> but it's heavy on the AJAX and the ruby
<asQuirreL> and rails was what I turned to first
<asQuirreL> burgestrand: I've got to be honest, I didn't like rails at first :P
emiltin [emiltin!~emil@212.60.120.210] has joined #ruby
<asQuirreL> but I'd come straight from C and C++ to rails
<burgestrand> asQuirreL: yeah, there’s a lot to learn in rails
<asQuirreL> without any ruby in between
<asQuirreL> and it made no sense
<burgestrand> asQuirreL: it’s no longer for mere beginners, it’ll… yeah, make no sense
<burgestrand> asQuirreL: shitload of magic, you write one thing seven things happen and so on
<asQuirreL> the fact that functions had so many signatures threw me
<asQuirreL> (coming from C/ObjC/C++)
<asQuirreL> this was maybe 3 years ago though :P
<burgestrand> ;)
<asQuirreL> gotta say, ruby is my language of choice for scripting
<asQuirreL> for anything that isn't mathematical
<heoa> burgestrand: https://bitbucket.org/heoa/sinatra-testing/src/fa3ad1788469/cgi/tyhmAH.rb <-- did I follow old instructions? Or is that right way of doing?
<asQuirreL> mathematical scripts I do in Haskell
Rory_O [Rory_O!~Rory@63-152-77-195.cdrr.qwest.net] has joined #ruby
<emiltin> hi, i'm trying to use cucumber to test a http daemon. i'm launching it using IO.popen. how can i check if/what it has written to stderr?
<burgestrand> heoa: no, you have a problem here, when you call this tyhmAH.rb, you call it with "system", it is a completely separate process and knows *nothing* about the sinatra environment
<burgestrand> heoa: you cannot access params or anything from sinatra in that script
saschaheylik [saschaheylik!~sascha@80-121-34-26.adsl.highway.telekom.at] has joined #ruby
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<heoa> burgestrand: line 140 to which I am trying to refer: https://bitbucket.org/heoa/sinatra-testing/src/fa3ad1788469/Layout/tyhmaAH.html
<burgestrand> heoa: yes, it still applies, your FD script does not know about sinatra
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<emiltin> if i read() on the pipe returned from popen, then my code seems to blocks if there's nothing to read? is there a way to simply ask what's been written?
<burgestrand> heoa: it looks like you want your FD script and sinatra script to be one and the same
<burgestrand> emiltin: readpartial I believe’s what you might want
<emiltin> burgestrand: ok, thank i'll look at that
<burgestrand> Oh, wait, not that one at all.
<burgestrand> There’s a read_nonblock too, but there’s another one…
<heoa> burgestrand: sorry not following, is the err in System -command or?
<emiltin> burgestrand: hm, but it says it blocks if there's no data available..
<burgestrand> heoa: yes, when you run the FD script with system, you run it as a new process, kind of like if you started it running only “ruby fd_script.rb”
<burgestrand> emiltin: yeah, I noticed, trying to find the one I was actually looking for :p
<emiltin> read_nonblock sounds about right
<heoa> burgestrand: %x[#{cgi_path}] ?
<burgestrand> heoa: yes
<burgestrand> emiltin: I have a vague memory of there existing an IO method that just reads data if it’s available and does nothing if not (as opposed to read_nonblock raising an error)
<burgestrand> can’t find it though
<emiltin> the read methods will only read from stdout by default, right?
<burgestrand> heoa: do you really need the FD script as a separate script?
<burgestrand> emiltin: they’re instance methods on IO, so it’ll read from the IO object that is the receiver
<burgestrand> emiltin: $stdin.read_nonblock, your_io_object.read_nonblock, etc
<emiltin> i'm using IO.popen to launch the process
sbinetd [sbinetd!~sbinetd@94-193-244-239.zone7.bethere.co.uk] has joined #ruby
<burgestrand> emiltin: in that case you get an io as a parameter to the block (or an io as return value)
Spockz [Spockz!~Spockz@21pc198.sshunet.nl] has joined #ruby
<burgestrand> use the method on that object
<emiltin> yeah. but can i read stdout and stderr separately?
<burgestrand> I believe IO.popen only does stdout
<emiltin> hmm googling seems to indicate that open3 could be useful http://www.ruby-doc.org/stdlib-1.9.3/libdoc/open3/rdoc/Open3.html
<burgestrand> emiltin: yes it is, I have a memory it has issues with windows though but I cannot verify that
<emiltin> oh
<emiltin> burgestrand: or i can perhaps redirect stderr to stdout when launching the process?
<burgestrand> emiltin: sure, you can’t tell which from which though
<burgestrand> emiltin: to ruby it’ll just look like stdout
<emiltin> right
<burgestrand> emiltin: but if that’s okay go ahead :)
patant [patant!~patant@h-141-11.a176.priv.bahnhof.se] has joined #ruby
<asQuirreL> Application Error on heroku
<asQuirreL> fuck yeah
<asQuirreL> now I know I'm in business...
<heoa> burgestrand: sorry not following, should the line 132 be 'params'? https://bitbucket.org/heoa/sinatra-testing/src/8aaf3f7e3135/Layout/tyhmaAH.html
<burgestrand> heoa: you *can not* access params in tyhmAH.rb
<burgestrand> here, give me a minute I’ll show you my suggestion
<asQuirreL> *sigh* y u no precompile my assets, heroku?
<samuelkadolph> asQuirreL: Use the cedar stack
<burgestrand> asQuirreL: are you on the cedar…
<burgestrand> that one
<burgestrand> ^^
<asQuirreL> I am indeed....
<asQuirreL> I thought I was anyway
<asQuirreL> I used "heroku create matric --cedar-stack"
<samuelkadolph> You aren't if your assets aren't getting precompiled
<asQuirreL> well motherduck.
<asQuirreL> oops, it's --stack cedar
<asQuirreL> not --cedar-stack
<asQuirreL> heroku could've told me that when I was making an ass of myself >.>
<burgestrand> ;)
bosphorus [bosphorus!~bosphorus@85.102.50.124] has joined #ruby
<asQuirreL> lol, in my repo the logs go "Precompiled assets" "Removing Precompiled assets"
<asQuirreL> xD
<asQuirreL> I could've gone for a sneaky amend and then no one would've known how stupid I am
Knodi [Knodi!~Knodi@c-68-43-246-216.hsd1.mi.comcast.net] has joined #ruby
davidcelis [davidcelis!~david@c-98-246-194-189.hsd1.or.comcast.net] has joined #ruby
<asQuirreL> woooo assets precompiling
<asQuirreL> well... it's not failing straight away
<asQuirreL> oh wait... no... spoke to soon
<asQuirreL> it failed eventually >.>
adambeynon [adambeynon!~adambeyno@82-69-1-211.dsl.in-addr.zen.co.uk] has joined #ruby
perryh [perryh!~root@unaffiliated/perry753] has joined #ruby
<emiltin> burgestrand: oddly enough, using 2>&1 when launching my process mean i can't kill the processes again using Process.kill("KILL", @pipe.pid)
<burgestrand> emiltin: peculiar
<asQuirreL> guys, do you know where it is I add paths to the auto require list?
<emiltin> yeah weird
kirun [kirun!~kirun@78-86-154-194.zone2.bethere.co.uk] has joined #ruby
josh_ [josh_!~josh@74-95-43-126-Oregon.hfc.comcastbusiness.net] has joined #ruby
dbgster [dbgster!~dbgster@CPE0013f7b7170c-CM0013f7b71708.cpe.net.cable.rogers.com] has joined #ruby
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
<burgestrand> asQuirreL: config.autoload_paths — I do recall the name might’ve changed though; put it in config/application.rb either way
<burgestrand> asQuirreL: I do believe there’s a comment in that file about it
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<asQuirreL> burgestrand: I thought so, thanks
<burgestrand> asQuirreL: that’s only for autoloading constants though; if all you want is to require a file before rails boots you can just put the require after the bundler set-up process… which might be in config/boot.rb
<asQuirreL> burgestrand: it's a model class
<asQuirreL> a model class in the non-rails sense
<asQuirreL> so, not an ActiveRecord
<asQuirreL> but a class that does all the heavy lifting and data processing while everything else looks pretty
<heoa> burgestrand: arg...flowdock stopped working totally even with gem1.9.1, I think this is experimental. Apt-get does not have ruby1.9.2, some suggestion?
<heoa> ... cannot test your patch :(
<Rory_O> asQuirreL: put it in models anyway, lots of non ar models get written
<asQuirreL> Rory_O: that's where I put it
<asQuirreL> but it doesn't seem to be getting loaded
<burgestrand> heoa: I don’t know how to install 1.9.2 with apt; I would try ruby 1.8.7 first though
chrxn [chrxn!~chrxn@69.4.233.32] has joined #ruby
<Rory_O> try the console to see if you can reference the class by name. i've written lots of models that don't subclass anything.
<Rory_O> the class name has to match the file name convetions though.
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby
<asQuirreL> uninitialized constant Calculation::Expression (NameError) <-
<asQuirreL> that's the error I get
<asQuirreL> the thing is
<asQuirreL> Calculation is a model
<asQuirreL> and it's referencing Expression
<asQuirreL> which is another model
<burgestrand> asQuirreL: ::Expression
<asQuirreL> Calculation is held in Calculation.rb
<asQuirreL> Expression in Expression.rb
<burgestrand> asQuirreL: try that instead, references it from the global scope instead of from within Calculation
<Rory_O> you want to make calculation/expression.rb
<Rory_O> models/calculation/expression.rb
<asQuirreL> Rory_O: but it's needed in other controllers
<Rory_O> It should still get autoloaded.
<Rory_O> look at how rails files are structured. class_name.rb is in the root and children are in class_name/child.rb
<asQuirreL> that's just confusing...
<asQuirreL> but I have no controller called "Calculation"
<asQuirreL> it's called Calculate
<Rory_O> Why does that matter? You're talking about models.
<asQuirreL> so what i want is calculate/calculation.rb
<asQuirreL> calculate/expression.rb
<asQuirreL> ?
<heoa> ruby1.8 does not have sinatra?
<burgestrand> heoa: it does
<Rory_O> You said you had a model named Calculation::Expression
<Rory_O> And you want to autoload that model.
<heoa> $ sudo gem1.8 install sinatra --worked but when I do $ ruby1.8 app.rb, it complains that sinatra does not exist?!
<asQuirreL> Rory_O: no, I have a model named Calculation
<asQuirreL> and a model named Expression
<burgestrand> heoa: do you have require 'rubygems' in app.rb?
<asQuirreL> I'm refereincing Expression inside Calculation
<burgestrand> asQuirreL: like I said before, reference it using ::Expression
<asQuirreL> so ruby just assumed that I was referring to a local constant
<Rory_O> so it's just class Expression?
<asQuirreL> Rory_O: yeah
<asQuirreL> burgestrand: you have no idea how much code I would have to change to do that
<Rory_O> then it should just go as expression.rb in models.
workmad3 [workmad3!~workmad3@84.45.226.85] has joined #ruby
<asQuirreL> right, I'll give that a try
<asQuirreL> without the uppercase
<Rory_O> I misunderstood I thought you were trying to autoload Calculation::Expression
<asQuirreL> no, that was just the way the ruby error presented itself :P
<burgestrand> heoa: lots of information, love it :)
<burgestrand> Ah yes, require_relative will not work on 1.8, change that to just "require" — strange… oh shit, it looks like you are using the broken rubygems from apt too, I forgot about that one
<burgestrand> heoa: sorry, but your package manager has broken your rubygems installation, I have no idea how to fix it
<burgestrand> heoa: this is my theory, anyway, I might be wrong
<Rory_O> Ruby from apt has been broken for years. Try rvm or rbenv instead of using the system one.
<burgestrand> It’s been known to work every once in a while during full moon.
<burgestrand> But that’s rare and has never been observed.
<heoa> Rory_O: rvm and rbenv, can I get them from apt-get?
<asQuirreL> still no dice with these models
<Rory_O> rvm is really easy to install, rbenv is harder but more clean.
<burgestrand> asQuirreL: try eager-loading expression.rb
<asQuirreL> burgestrand: yeah, I will
<heoa> Rory_O: I think you mean ruby-rvm from apt-get?
<burgestrand> asQuirreL: and if that does not do it, you could declare the nested constant yourself
<Rory_O> I would stay away from anything ruby from apt.
<burgestrand> asQuirreL: class Calculator; Expression = ::Expression; end
<burgestrand> asQuirreL: but that’s kinda ugly and should probably be avoided ;)
marvelous [marvelous!~batman@f050091025.adsl.alicedsl.de] has joined #ruby
<asQuirreL> the burgestrand yeah...
<asQuirreL> I don't like the look of that xD
<asQuirreL> the odd thing is that this has been working fine in the production environment, on my computer
<asQuirreL> I never got this error
apucacao [apucacao!~apucacao@S0106602ad075859e.vc.shawcable.net] has joined #ruby
<davidcelis> RBenv isn't hard to install
<marvelous> hey there - simple mongoid question - creating a index over two/three columns directly in the model? http://pastie.org/2997601
<burgestrand> asQuirreL: production environment eager-loads your models, I believe
<asQuirreL> oh.
<asQuirreL> well then
<Rory_O> Well, rbenv isn't hard, but you have to know how to build ruby. RVM takes care of that.
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby
ChampS_ [ChampS_!~ChampS@p54B4AF0F.dip.t-dialin.net] has joined #ruby
<asQuirreL> burgestrand: hmmm
<asQuirreL> eagerloading still causes the error
<asQuirreL> could it be this
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
<asQuirreL> even with eagerloading, calculation.rb gets loaded first
<asQuirreL> and the reference to Expression is in the singleton instance initialization
<burgestrand> How would it be loaded first if you load expression.rb first?
<asQuirreL> I didn't
<asQuirreL> I just eagerloaded everything
vjacob [vjacob!~vjacob@94-195-174-165.zone9.bethere.co.uk] has joined #ruby
spinagon [spinagon!~rippa@87-253-30-87.pppoe.yaroslavl.ru] has joined #ruby
<asQuirreL> but if it did it in alphabetical order
<asQuirreL> then this would happen
<asQuirreL> ah fuck it, I'll just require the models directly in application.rb
<asQuirreL> I've had enough of this crap
fridim_ [fridim_!~fridim@2a01:e35:2ece:f2d0:223:4eff:fe6c:c754] has joined #ruby
<heoa> Rory_O: ...any distro with pre-installed ruby things? (I don't like doing sysadmin hings while programming...)
<heoa> waiting for rvm to install things...irritating
rpowell [rpowell!~rpowell@CPE-121-217-11-112.lnse1.cht.bigpond.net.au] has joined #ruby
<shevy> lol
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
malkomalko [malkomalko!~malkomalk@66-234-41-82.nyc.cable.nyct.net] has joined #ruby
<asQuirreL> hmm, now it's saying that there is no such file to load
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
<asQuirreL> srsly heroku
<asQuirreL> I fucking hate you.
<spinagon> yeah
<spinagon> it says 'Web process failed to bind to $PORT
<spinagon> what does that even mean
fbe^ [fbe^!~becker@static.75.57.4.46.clients.your-server.de] has joined #ruby
fbe^ [fbe^!~becker@static.75.57.4.46.clients.your-server.de] has quit [#ruby]
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
<asQuirreL> burgestrand: lil help? xD
<burgestrand> asQuirreL: how are you trying to require it?
<asQuirreL> burgestrand: like this: File.expand_path("../../models/matrix.rb", __FILE__)
<asQuirreL> in config/application.rb
<asQuirreL> and that gives me the error: no such file to load '/app/models/matrix.rb'
<burgestrand> asQuirreL: I’d probably do Rails.root.join('app/models/matrix')
<burgestrand> asQuirreL: and drop the .rb suffix, should not be needed :)
<asQuirreL> burgestrand: I've tried that too, but I'll try it again
milkpost [milkpost!~dec@173-28-195-157.client.mchsi.com] has joined #ruby
<asQuirreL> burgestrand: alright, I'll do that
andrewhl [andrewhl!~andrew@24-246-15-43.cable.teksavvy.com] has joined #ruby
<asQuirreL> undefined method for nil
<asQuirreL> Rails.root hasn't been defined yet...
eugynon [eugynon!~terje@236.80-202-126.nextgentel.com] has joined #ruby
<asQuirreL> burgestrand: I went from a mild dislike of heroku to a severe loathing tonight
<burgestrand> asQuirreL: I’m pretty sure this is a Rails issue and not a Heroku issue
<asQuirreL> burgestrand: well whatever, my loathing is directed at heroku xD
looopy [looopy!~looopy@pool-141-156-48-174.washdc.btas.verizon.net] has joined #ruby
<burgestrand> ;)
<heoa> Installed ruby-1.9.2 from RVM and errs: http://pastebin.com/Upm6Qn0h
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<heoa> openssl err?!
<burgestrand> asQuirreL: alright, a final idea then, put in place an after_initialize hook
<asQuirreL> where? :P
<burgestrand> asQuirreL: trying to figure that out :p
luckyruby [luckyruby!~luckyruby@125-187.96-97.tampabay.res.rr.com] has joined #ruby
<burgestrand> asQuirreL: ah yes, config.after_initialize do … end
<burgestrand> asQuirreL: from inside that block Rails should be defined and all things should be set-up
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
<asQuirreL> burgestrand: right, I'll try that
<burgestrand> heoa: you use RVM now, yes?
<heoa> burgestrand: yes
<asQuirreL> I'm trying a last ditch effort inside boot
statarb3 [statarb3!~CoreD@546A56AA.cm-12-3b.dynamic.ziggo.nl] has joined #ruby
statarb3 [statarb3!~CoreD@unaffiliated/statarb3] has joined #ruby
<burgestrand> heoa: http://beginrescueend.com/packages/openssl/ — try the things from the *second* white box, not first one
mengu [mengu!~mengu@unaffiliated/mengu] has joined #ruby
<burgestrand> (if you do try the first one you might need to install the openssl development packages yourself on your system; if you know how to do that and which they are you could try the first option if you’d rather do that)
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
davidcelis [davidcelis!~david@c-76-115-58-79.hsd1.or.comcast.net] has joined #ruby
mickn [mickn!~user@unaffiliated/mickn] has joined #ruby
Pip [Pip!~Pip@unaffiliated/pip] has joined #ruby
wmoxam [wmoxam!~wmoxam@76-10-155-204.dsl.teksavvy.com] has joined #ruby
wmoxam [wmoxam!~wmoxam@pdpc/supporter/active/wmoxam] has joined #ruby
johnduhart [johnduhart!~quassel@46.105.138.12] has joined #ruby
<asQuirreL> burgestrand: yeah it didn't work
<asQuirreL> and now I'm getting a random error about unbalanced end keywords
<burgestrand> asQuirreL: didn’t work because of the unbalanced end?
<asQuirreL> burgestrand: but it's in application.rb
<asQuirreL> and it's not unbalanced
<asQuirreL> it's the stock application.rb
<burgestrand> you lost me
<asQuirreL> it's in config.application.rb
<asQuirreL> config/application.rb
<asQuirreL> but it's the file that rails generated
<asQuirreL> I took everything out
<asQuirreL> I made sure by undoing everything
<burgestrand> sounds like you broke it, just check it out from git
<asQuirreL> burgestrand: ...
<asQuirreL> gah
Boohbah [Boohbah!boohbah@gateway/shell/anapnea.net/x-firrncbflrkzkcyy] has joined #ruby
<shevy> that is understandable
<shevy> squirrels aren't the brightest
<asQuirreL> >.>
<asQuirreL> I swear I didn't break it :P
jimmy1980 [jimmy1980!~jimmy@112.224.2.116] has joined #ruby
<asQuirreL> I have a feeling rails is breaking me
<shevy> hmm
<shevy> I broke rails :)
<shevy> I swear I followed the tutorial but suddenly the index page was full with JS exceptions
mmokrysz [mmokrysz!~mmokrysz@pdpc/supporter/student/mmokrysz] has joined #ruby
<burgestrand> asQuirreL: if it was working before, you made some changes, you undid them, and now it does not work
<burgestrand> asQuirreL: I’m sorry, I cannot see your code, but that does sound like you broke it :p
<asQuirreL> >.> it does seem like that, doesn't it
<shevy> yeah
<shevy> there are indicators
* asQuirreL promises he is a competent coding squirrel
<shevy> but we can find a patsy to blame if we all agree on it
<shevy> a fox perhaps
<asQuirreL> I've reverted to a better time in Git now anyways
<asQuirreL> shevy: maybe a goat
<shevy> hmm git
<shevy> git does not like me
<asQuirreL> I hear they're good at scapegoating
<asQuirreL> shevy: yeah it was a dodgy experience
<shevy> when git breaks, my ultimate weapon of choice is rm -rf .git
<asQuirreL> but I'm getting the same error as when I started
<shevy> which kinda defeats the purpose of versioning history doesn't it?
<asQuirreL> shevy: it does, yes
<asQuirreL> I had a painful experience just now, trying to change the position of head
<asQuirreL> I changed the position
<asQuirreL> and then I thought that wasn't enough
<asQuirreL> so I created a new branch
<asQuirreL> merged the two branches
<asQuirreL> and tried to push it
<asQuirreL> and had a minor panic attack when it said everything was up to date
<asQuirreL> seriously, my computer is trolling me today
<asQuirreL> I'm on v26 on heroku >.>
<shevy> lol
<shevy> I thought you meant your head
<shevy> then I read branch and thought "wtf, is he a tree"
<mfridh> I actually read that too
<shevy> but it makes sense, it's a squirrel after all!
<mfridh> I imagined him fidgeting in his chair because he had too many acorns in his wallet
<shevy> hmm
<shevy> I should do that one day
<shevy> go to some place and try to pay with acorns
<shevy> and videotape the resulting look-on-their-faces
<asQuirreL> shevy: you should have a squirrel costume for added effect
<asQuirreL> "Heroku receiving push" you're damn straight you are >.> and if you don't work, I'mma make you receive my fist in your face
Mohan [Mohan!~nixh0st@unaffiliated/mohan] has joined #ruby
timonv [timonv!~timonv@140pc227.sshunet.nl] has joined #ruby
camilo [camilo!~camilo@wpa162063.Wireless.McGill.CA] has joined #ruby
<asQuirreL> I hate rails as well now
<burgestrand> :p
eugynon [eugynon!~terje@236.80-202-126.nextgentel.com] has joined #ruby
james_cotterill [james_cotterill!~james_cot@host81-135-86-165.range81-135.btcentralplus.com] has joined #ruby
<asQuirreL> well fuck
<asQuirreL> burgestrand: now I've got the ActiveRecord ConnectionNotEstablished
<asQuirreL> error
<asQuirreL> because I don't have a database gem
<asQuirreL> but I don't *need* a database gem
<asQuirreL> how do I tell rails to ignore that? :P
<burgestrand> never seen that before; what’s firing it?
<burgestrand> asQuirreL: ^
nari [nari!~nari@p62e5b3.totrnt01.ap.so-net.ne.jp] has joined #ruby
<burgestrand> heoa: I see no error
<asQuirreL> burgestrand: I know the error, I get it everytime because I keep forgetting to do a db:migrate
<asQuirreL> but for once, I actually *meant* to not migrate a db
<asQuirreL> no worries, I found a stackoverflow article to tell me how to fix this
<burgestrand> asQuirreL: please link it to me, I’m curious to see what might cause it
<asQuirreL> burgestrand: you get it when rails can't connect to a database for any reason
<davidcelis> burgestrand: He has no gem to connect to the DB, so ActiveRecord is complaining
<burgestrand> Peculiar. Oh well.
<davidcelis> Not really that peculiar. ActiveRecord requires a database connection even for initializing.
<heoa> burgestrand: Sinatra doesn’t know this ditty.
<asQuirreL> burgestrand: yeah, I do it by accident, normally, but this project doesn't need a database
iocor [iocor!~textual@unaffiliated/iocor] has joined #ruby
<burgestrand> So essentially you set-up a rails project to not use AR but forgot to actually exclude AR?
<burgestrand> or rails didn’t get it or whatever
<asQuirreL> burgestrand: I forgot to exclude AR, yeah :P
<burgestrand> Alright, got it :)
<asQuirreL> but fuck it, cos I got the error I got before again
<asQuirreL> but this time in a different context
<burgestrand> Was under the impression you used partly AR-models and partly non-AR models. That clears up the confusion.
<asQuirreL> it got a tiny bit further before it fell flat on its face
<asQuirreL> burgestrand: nope, all non-AR
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
<Tachyon__> how can i pass gsub first parameter as string? for example "hello".gsub("^h","e")
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<apeiros_> Tachyon__: just like that
<Tachyon__> it doesn't work
<apeiros_> it does work
<Tachyon__> the string in it is not interpreted as regexp
<apeiros_> but maybe not the way you intend it to…
<apeiros_> of course not
<apeiros_> you said you wanted to pass it as a string…
<apeiros_> so what do you want now - string or regex?
<Tachyon__> well i need to do regexp replacement
<apeiros_> then what stops you from passing a regex?
<Tachyon__> the regexp is user entered
<apeiros_> maybe you should have asked that question then…
<apeiros_> Regexp.new(var) or /#{var}/
<Tachyon__> ah!
<Tachyon__> great :)
<apeiros_> beware
<Tachyon__> thx vm :)
<Tachyon__> hm?
<asQuirreL> okay, if this last one doesn't work, I'm going to stop.
<apeiros_> it is trivial to create a regexp that'll DoS your machine
<heoa> burgestrand: it must be in the l15: https://bitbucket.org/heoa/sinatra-testing/src/c5c7a36108bf/app.rb, why post here?
<Tachyon__> that's true :)
<burgestrand> heoa: ah, you are posting the form to the wrong URL with the wrong method
kd0t|away [kd0t|away!~kd0t@212.117.173.78] has joined #ruby
<heoa> burgestrand: yes that post makes no sense, the flowdock app handles it somehow
eugynon [eugynon!~terje@236.80-202-126.nextgentel.com] has joined #ruby
<burgestrand> heoa: no, your form is directed towards /cgi/runMe.ru but you have no action handling that URL
<burgestrand> heoa: you have one handling /flowdock, however
<asQuirreL> okay, I give up
<asQuirreL> ...for now
<asQuirreL> I have an interview tomorrow as well >.> there were probably more productive uses of my time to be had
raythecat [raythecat!~raythecat@cpe-66-27-147-33.socal.res.rr.com] has joined #ruby
<shevy> like on the toilet!!!
ziggles [ziggles!~ziggles@c-24-6-247-92.hsd1.ca.comcast.net] has joined #ruby
<asQuirreL> right...
<apeiros_> interview on sunday? o0
<asQuirreL> apeiros_: it's for 4 days
<asQuirreL> it's not a job interview
<asQuirreL> it's a university interview
<asQuirreL> for Oxford :P
<apeiros_> still… on sunday? :)
<bratsche> Good luck :)
<apeiros_> bratsche does it right of course - good luck, too
<asQuirreL> thanks xD
<asQuirreL> and I don't believe there are any interviews on the Sunday, the interviews are Monday and Wednesday
<asQuirreL> *Monday and Tuesday
bwlang [bwlang!~anonymous@static-71-245-233-146.bstnma.fios.verizon.net] has joined #ruby
<asQuirreL> seriously though, heroku
<asQuirreL> y u so difficult
<asQuirreL> it blows my mind
<bratsche> I've only used it once, but it seemed super simple.
<asQuirreL> bratsche: >.>
<asQuirreL> well my developement environment's been working fine
<asQuirreL> but the second I try and move to heroku
<asQuirreL> there's a problem with class caching
<asQuirreL> and then there's an issue with ActiveRecord
<asQuirreL> then there's an issue with it not being able to reference the model classes
<bratsche> I use EC2 for everything else. It's not as simple to use, but it gives us more flexibility.
<asQuirreL> well I just wanted to get this up and running to see what it would look like
<asQuirreL> but apparently that's not going to happen >.>
<asQuirreL> maybe if I dup'd the development environment as the production environment...
<asQuirreL> it's worth a try, let's see...
<bratsche> Good luck with that too then. :)
Newbs [Newbs!~textual@host-2-98-240-209.as13285.net] has joined #ruby
randym [randym!~randym@EM111-191-88-142.pool.e-mobile.ne.jp] has joined #ruby
<heoa> burgestrand: works by changing the post to get: https://bitbucket.org/heoa/sinatra-testing/changeset/ab672a81f0aa
<asQuirreL> bratsche: lol, thanks xD
<burgestrand> heoa: that’s because you have not set the form method to post
<asQuirreL> everyone in the ruby channel seems to be a lot more calm and level headed than the people in the #iphone channel
<asQuirreL> their solution to everything is "buy another iPod, test it on that"
<incluye> there are various levels of crazy on freenode
baroquebobcat [baroquebobcat!~nick@c-67-176-80-121.hsd1.co.comcast.net] has joined #ruby
Natch| [Natch|!~natch@178.73.217.15] has joined #ruby
<shevy> #iphone is very high crazy
<asQuirreL> so... I got a web page
<shevy> but it's nothing compared to #php
<asQuirreL> it's an error
<asQuirreL> at least it's an improvement on nothing
<shevy> an error page
<asQuirreL> I just want this shit to work >.>
<burgestrand> heh
<asQuirreL> see what I mean
<burgestrand> It really looks like this autoload thing is not your friend
<asQuirreL> unintialized constant >.>
<asQuirreL> no
<asQuirreL> I want to hurt it.
<davidcelis> it would appear that ApplicationController::Calculation was not initialized
<burgestrand> Where have you placed your models? In which directory and under what filenames?
<bratsche> This seems like more of a #RubyOnRails problem than a #ruby problem. :)
<Newbs> Anyone here dealt with phonegap?
<davidcelis> and yeah, definitely a #rubyonrails question
<asQuirreL> davidcelis: what it would
<asQuirreL> *that
<asQuirreL> burgestrand: they are called Calculation, Expression and Matrix
<asQuirreL> and they are in the files
<asQuirreL> calculation.rb, expression.rb and matrix.rb
cafesofie [cafesofie!~user@ool-18b97779.dyn.optonline.net] has joined #ruby
<asQuirreL> in the location 'app/models'
<davidcelis> asQuirreL: What's the definition of your calculations_controller look like
<asQuirreL> davidcelis: that's the thing... there isn't one
<asQuirreL> Calculation (the model)
<asQuirreL> isn't an activerecord
<davidcelis> so you have no controllers except ApplicationController?
<asQuirreL> davidcelis: no, the controllers are called CalculateController and TestController
<asQuirreL> but the models are called Calculation, Expression and Matrix
<burgestrand> Really strange that the autoloading of those does not kick in.
casey [casey!d0362dbb@gateway/web/freenode/ip.208.54.45.187] has joined #ruby
<davidcelis> yeah Rails doesn't like it when you don't name a controller after the model correctly
<burgestrand> Even in production when they should be eagerly loaded.
<casey> hi
<davidcelis> pretty sure it doesnt like it even if they aren't AR models
<casey> anyone know what the latest working version of ruby-debug for 1.8.7 is?
Indian [Indian!~Indian@unaffiliated/londonmet050] has joined #ruby
<burgestrand> davidcelis: you can’t possibly mean you need a controller for each model in your application
<asQuirreL> davidcelis: but they're meant for different things....
<asQuirreL> what about if I moved the models to the lib folder?
<davidcelis> asQuirreL: If they aren't AR models, that's probably where they should be.
<burgestrand> … no, that’s just weird
<asQuirreL> I'll try and see if that works
* asQuirreL crosses his fingers
<casey> rails controllers aren't really linked to models
<asQuirreL> ...and toes
<casey> unless you're using some scaffolding
<casey> or something
<apeiros_> davidcelis: rails doesn't bother how your models are named in relation to controllers using models
<casey> it doesn't matter
<casey> what your model name is...
<apeiros_> davidcelis: also rails doesn't bother whether models in app/models inherit from AR
<burgestrand> asQuirreL: this is rails 3.1?
<apeiros_> the only thing rails cares about is whether the relation of classname and filename matches - and that only for autoloading either.
<asQuirreL> yep
jbrokc [jbrokc!~jbrokc@c-98-228-139-230.hsd1.il.comcast.net] has joined #ruby
looopy_ [looopy_!~looopy@c-68-34-92-100.hsd1.md.comcast.net] has joined #ruby
<heoa> burgestrand: yes you are rigth, got it working also that way :)
<apeiros_> (oh, and routes <-> controllers matters too, but you can override that)
<burgestrand> heoa: :)
<casey> does anybody have ruby-debug working with 1.8.7?
<casey> if so, can you give me the gem version(s)
Axsuul [Axsuul!~Axsuul@75-140-75-52.dhcp.mtpk.ca.charter.com] has joined #ruby
dyer [dyer!~dyer@108-193-172-174.lightspeed.tukrga.sbcglobal.net] has joined #ruby
<asQuirreL> shit.
<asQuirreL> shit shit shit shit shit shit shit shit shit shit shit shit shit
<asQuirreL> it only wook me 3 hours >.>
<asQuirreL> *took
<asQuirreL> but it LIVES
<jbrokc> i don't even know if this is the right way of going about using conditional ? : expansion in ruby, but does it look right? https://gist.github.com/ca5dd11082a22009a5cb
<asQuirreL> jbrokc: it's meant to be used inline
<asQuirreL> it's called the ternary operator
<jbrokc> asQuirreL: oh yeah that's the name of it
<jbrokc> damn, okay - thanks
<davidcelis> asQuirreL: so how'd you fix it?
<casey> i think that will parse ok...
<asQuirreL> you can just use an if statement though
<asQuirreL> davidcelis: well, a whole bunch of things
<casey> but yes if statement is better
<asQuirreL> but I ended up moving them to lib
<asQuirreL> then adding lib to autoload
<asQuirreL> then adding lib to eager load
<asQuirreL> now the final step
<casey> why 'simplify' by making it harder to read
<asQuirreL> revert to the production environment
<jbrokc> i know, but just changing one parameter value into 5 lines of code feels dirty
<asQuirreL> and see if it all still works
<jbrokc> (true -> false as the third argument to fabricate)
<asQuirreL> jbrokc: oh right
casey [casey!d0362dbb@gateway/web/freenode/ip.208.54.45.187] has quit [#ruby]
<asQuirreL> then what you want is this
<asQuirreL> Fixtures.fabricate(Application.redis, fix, (i==1))
<asQuirreL> that does what you want in a line
<jbrokc> didn't think inline was possible in this case, that's really cool though
<davidcelis> jbrokc: Ternaries are really meant to be used on a single line. You should switch that to an if-else, or do what asQuirrel said
<asQuirreL> jbrokc: most things are expressions in ruby, so yeah, that works
<jbrokc> asQuirreL: thanks
<asQuirreL> jbrokc: np
<asQuirreL> davidcelis: wish me luck, I'm going for the production environment
<asQuirreL> shit. it works
<asQuirreL> I think I may cry from the sheer joy of the occassion
incorrect [incorrect!~francis@cpc7-cmbg14-2-0-cust43.5-4.cable.virginmedia.com] has joined #ruby
<asQuirreL> burgestrand: check it out :D it works.... for now
<burgestrand> asQuirreL: awesome :)
<asQuirreL> I will probably break it soon
<burgestrand> asQuirreL: still *really* strange your models did not load properly
jbrokc [jbrokc!~jbrokc@c-98-228-139-230.hsd1.il.comcast.net] has quit [#ruby]
<burgestrand> asQuirreL: I tried creating a new rails 3.1 application without AR and trying to mirror your set-up as much as possible
<burgestrand> no issues, everything loads fine
rramsden [rramsden!~rramsden@s64-180-62-209.bc.hsia.telus.net] has joined #ruby
<asQuirreL> burgestrand: I was told in the #rubyonrails channel that autoloader relies on the names matching, nothing else
<burgestrand> asQuirreL: yeah, and yours do, judging by what you’ve said
MrCheetoDust [MrCheetoDust!~farhankha@cpe-76-94-123-32.socal.res.rr.com] has joined #ruby
<asQuirreL> burgestrand: no, they don't :P
<asQuirreL> the files are calculation.rb
<asQuirreL> and calculate_controller.rb
<asQuirreL> calculate /= calculation
<burgestrand> Yeah, CalculateController and Calculation model?
<davidcelis> technically
<davidcelis> it should be CalculationsController
<davidcelis> controller name uses .pluralize
<asQuirreL> davidcelis: yeah but the CalculateController isn't used to manage calculate instances
<asQuirreL> the Calcluate controller is used to perform calculations and manage Expressions
<asQuirreL> it's really fucked up, :P
<asQuirreL> but the ClaculateController is actually just the interface for a single (persistent) instance of Calculation
<asQuirreL> but whatever, it works now :P
<asQuirreL> thankfully
<asQuirreL> even class caching works (i.e. the full production environment)
<asQuirreL> *phew8
<asQuirreL> now I never have to think about that again
<asQuirreL> I'm off to sleep now :P
<asQuirreL> night everyone, thanks for the help xD