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/
_whitelogger joined #ruby
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/
austinbv_ joined #ruby
ignis joined #ruby
wyhaines joined #ruby
jbw joined #ruby
sentinal8473 joined #ruby
sentinal8473 left #ruby
jgrimes joined #ruby
_|christian|_ joined #ruby
S2kx joined #ruby
<sythe> shevy: How about now?
<shevy> no idea but this supports my belief, the error message is total and utter crap :>
<Dyscrete> sythe, are you running on a local instance or are you deploying with a service, for example heroku?
<sythe> Hmm
<sythe> I don't know
randym joined #ruby
<sythe> It runs on passenger!
<sythe> I know that
<Dyscrete> well I know heroku doesn't allow writing to disk
savage- joined #ruby
<Dyscrete> the app may not be able to write to /tmp/RackRewindableInput20111127-658216-1qzxq5m.lock
<Dyscrete> try to chmod +rw access on /tmp
replore_ joined #ruby
ignis joined #ruby
<Dyscrete> if it's running on Heroku you can't write to /tmp folder
nanoyak joined #ruby
nerded joined #ruby
<sythe> ok
<sythe> 755?
<yfeldblum> might want to set the TMPDIR variable? or configure unicorn?
cooper joined #ruby
<yfeldblum> also, is this bamboo or cedar? with bamboo the filesystem (except for the app's log/ and tmp/ dirs) are readonly; with cedar, the whole filesystem including /tmp is read/write
akem joined #ruby
akem joined #ruby
jbw joined #ruby
JonnieCache joined #ruby
austinbv joined #ruby
voxel joined #ruby
voxel joined #ruby
Seisatsu joined #ruby
austinbv_ joined #ruby
wyhaines joined #ruby
P1515185 joined #ruby
ryanf joined #ruby
awesome__ joined #ruby
jbw joined #ruby
Aaaarg joined #ruby
seivan joined #ruby
bwright joined #ruby
<sythe> Hmm
<sythe> I have no idea
<sythe> Wait...are you joking?
<sythe> Ruby on Rails, with Heroku, Passenger and Bamboo
<sythe> C'mon...
<sythe> That sounds ridiculous to anyone
LittleBill902 joined #ruby
LittleBill902 joined #ruby
Sliker joined #ruby
notbrent joined #ruby
<sythe> Thanks for the help, guys
<sythe> My hosting account has been compromised again...so...no dice fixing that for now :(
rsampaio joined #ruby
jbw joined #ruby
ignis joined #ruby
zedUNDgi_ joined #ruby
bwright joined #ruby
fladamd joined #ruby
tomzx joined #ruby
mxweas_ joined #ruby
advorak joined #ruby
bwlang joined #ruby
havenn joined #ruby
tyman joined #ruby
zedUNDginger joined #ruby
<tyman> Why doesn't this simple example raise an error? https://gist.github.com/1398737
zenergi joined #ruby
iamjarvo_ joined #ruby
<ryanf> can you be more specific about what it isn't doing?
<tyman> ryanf: it's literally ignoring it...zero happens
<ryanf> so the program isn't exiting?
austinbv joined #ruby
<tyman> y...it exits fine...no output I meant...sorry
<ryanf> why would it output anything?
_kinderman joined #ruby
<tyman> the rescue clause should pick up that exception raised right?...oh shit...i didn't print the erorr
<tyman> :-)
<ryanf> :)
<tyman> lol
<tyman> geez
<tyman> i need to step away for the day i think
<tyman> thx ryanf
<zedUNDginger> ryanf: hey ryan what's up
<ryanf> hi, not much
<ryanf> had some brunch earlier, it owned
<ryanf> right now I think I am going to try to get something up on rynftz.gr
<ryanf> beyond the current tribute to fine russian engineering
<zedUNDginger> ryanf: hehe
<zedUNDginger> ryanf: what's your site going to be about?
<zedUNDginger> will u blog?
<ryanf> probably not, I'm just gonna put up a simple landing page I think
<ryanf> I don't want to just have an empty blog there, that's lame
booginga joined #ruby
Mahoek joined #ruby
JumpMast3r joined #ruby
xiphias joined #ruby
<xiphias> anything like py2exe for ruby?
jds joined #ruby
nari joined #ruby
<zedUNDginger> xiphias: yes, look at ocra
<xiphias> awesome
hSATAC joined #ruby
ckrailo joined #ruby
macmartine joined #ruby
poisonar1s joined #ruby
<poisonar1s> Is Ruby used professionally for any reason but RoR?
<xiphias> ruby doesn't exist just for RoR
dv310p3r joined #ruby
<poisonar1s> xiphias: I know, I'm asking if any companies use Ruby for anything other than RoR?
<xiphias> dunno
<xiphias> well
<xiphias> i know one company does
<xiphias> i know the two employees
<xiphias> they used to deploy wxruby apps
pen_isident joined #ruby
_catch joined #ruby
wyhaines joined #ruby
roaminghorse joined #ruby
jwmann joined #ruby
sorin joined #ruby
fuzzles joined #ruby
mtkd joined #ruby
rgrinberg joined #ruby
eerdogan joined #ruby
Manhose joined #ruby
ryanf joined #ruby
nerdy joined #ruby
nerded joined #ruby
jcromartie joined #ruby
<jcromartie> I have a Ruby program that coordinates some filesystem actions (copying files, creating archives, etc.), and it calls a few subprocesses. But if I wanted to start some asynchronous processes that run after the Ruby program exits, is that possible? Or am I better off using Bash for a control program?
Targen joined #ruby
zipperdo joined #ruby
roaminghorse joined #ruby
zipperdo left #ruby
<mystline> hi everyone, when trying to crease a session store for redmine i get the following error
<mystline> rake aborted!no such file to load -- rails/all
<mystline> i have set GEM_PATH to the right place, confirmed that rails is installed and the right version
<zedUNDginger> mystline: join #rubyonrails
<mystline> zedUNDginger: oh sure, i forgot that this wasn't a rails specific chan.
<zedUNDginger> mystline: we hate rails here more than we hate hell and all montagues
scribble1 joined #ruby
<mystline> i'll remember that
p0y joined #ruby
macmartine joined #ruby
scribble1 joined #ruby
juarlex joined #ruby
bpfh joined #ruby
flip_digits joined #ruby
sdavis joined #ruby
LittleBill902 joined #ruby
beseku left #ruby
Manhose_ joined #ruby
joshrendek joined #ruby
sorin joined #ruby
esparkman joined #ruby
thone_ joined #ruby
Amirh joined #ruby
IrishGringo joined #ruby
sdavis joined #ruby
esparkman joined #ruby
esparkman joined #ruby
esparkman joined #ruby
esparkman joined #ruby
esparkman joined #ruby
esparkman joined #ruby
Draco_ joined #ruby
pen joined #ruby
sdavis joined #ruby
randym joined #ruby
namidark joined #ruby
satyavvd joined #ruby
zedUNDginger joined #ruby
rsampaio joined #ruby
dagnachewa joined #ruby
brianherman joined #ruby
brianherman joined #ruby
vitoravelino joined #ruby
brianherman joined #ruby
Brozilla joined #ruby
Lord-Harlot joined #ruby
pabloh joined #ruby
Draco_ joined #ruby
beseku joined #ruby
Seisatsu joined #ruby
kuadrosx joined #ruby
kuadrosx joined #ruby
pencilcheck joined #ruby
x0F__ joined #ruby
pabloh joined #ruby
iamjarvo joined #ruby
kdrsx joined #ruby
marcuspat joined #ruby
roaminghorse joined #ruby
austinbv joined #ruby
macmartine joined #ruby
dhruvasagar joined #ruby
robbyoconnor joined #ruby
JumpMast3r joined #ruby
eerdogan joined #ruby
kuadrosx joined #ruby
gayasentinel joined #ruby
Ruthenium joined #ruby
textcash joined #ruby
mikepack joined #ruby
tyler_ joined #ruby
dhruvasagar joined #ruby
SaneWarning joined #ruby
mxweas_ joined #ruby
rup3rt joined #ruby
<rup3rt> Given that its "11/28/2011 05:00 ", how do I parse this to a ruby unix_timestamp?
rpowell joined #ruby
kdrsx joined #ruby
dhruvasagar joined #ruby
kuadrosx joined #ruby
<shevy> rup3rt perhaps Date.parse "11/28/2011" # => #<Date: 4911787/2,0,2299161> not sure about the time
n8ji joined #ruby
<jcromartie> [0..-1][0..-1][0..-1][0..-1]
<rup3rt> thanks shevy.. i found 11/28/2011 05:00 to be parsed by DateTime.strptime("11/28/2011 05:00", "%m/%d/%Y %H:%M").
<shevy> cool
<rup3rt> now im trying to workout how to specify that the DateTime has a timezone (Melbourne)....
wedtm joined #ruby
dhruvasagar joined #ruby
radic joined #ruby
eft joined #ruby
gregorz joined #ruby
dhruvasagar joined #ruby
tmart joined #ruby
LittleBill902 joined #ruby
LittleBill902 joined #ruby
poisonar1s joined #ruby
krz joined #ruby
canuck3141 joined #ruby
iband joined #ruby
dhruvasagar joined #ruby
Norrin joined #ruby
acts_as_david joined #ruby
macmartine joined #ruby
dhruvasagar joined #ruby
perryh- left #ruby
bluOxigen joined #ruby
xol joined #ruby
kuadrosx joined #ruby
ksinkar joined #ruby
JumpMast3r joined #ruby
dv310p3r joined #ruby
kdrsx joined #ruby
Nisstyre joined #ruby
dhruvasagar joined #ruby
WerbDerver joined #ruby
xpot-mobile joined #ruby
h4mz1d joined #ruby
dhruvasagar_ joined #ruby
booginga left #ruby
manizzle joined #ruby
mxweas_ joined #ruby
smgt joined #ruby
gener1c_ joined #ruby
seivan joined #ruby
minijupe joined #ruby
austinbv joined #ruby
<jcromartie> am I blind, or does Test::Unit have literally no documentation at all
<jcromartie> and other tuts
<jcromartie> but there's no rdoc for it?
Cervajz joined #ruby
<jcromartie> there's ri
<jcromartie> hmm
xpot-mobile joined #ruby
abstrusenick joined #ruby
canuck3141 joined #ruby
becom33 joined #ruby
<becom33> what is a good way to get ruby app text to speak ?
trivol joined #ruby
roaminghorse joined #ruby
beseku left #ruby
dankest joined #ruby
vmatiyko joined #ruby
<mitchty> if you're on osx, use say, everything else, dunno
becom33 joined #ruby
dhruvasagar joined #ruby
djdb joined #ruby
cook1es joined #ruby
eerdogan joined #ruby
mxweas_ joined #ruby
Aaaarg joined #ruby
ghosTM55 joined #ruby
zedUNDginger joined #ruby
tobym joined #ruby
JohnBat26 joined #ruby
perryh joined #ruby
becom33 joined #ruby
iamjarvo joined #ruby
yxhuvud joined #ruby
h4mz1d joined #ruby
Telling joined #ruby
MUILTFN joined #ruby
gayasentinel1 joined #ruby
mxweas_ joined #ruby
jorum joined #ruby
burgestrand joined #ruby
pen joined #ruby
dkannan joined #ruby
stephenjudkins joined #ruby
emanu joined #ruby
macmartine joined #ruby
becom33 joined #ruby
bluOxigen joined #ruby
nimred joined #ruby
p1d joined #ruby
speggey joined #ruby
Mchl joined #ruby
LouisJB joined #ruby
Clooth joined #ruby
thecreators joined #ruby
austinbv joined #ruby
xpot joined #ruby
zedUNDginger joined #ruby
stephenjudkins joined #ruby
james_cotterill joined #ruby
austinbv_ joined #ruby
Sliker joined #ruby
stephenjudkins joined #ruby
marcuspat joined #ruby
djdb joined #ruby
Doppp joined #ruby
batlock666 joined #ruby
Doppp left #ruby
mafolz joined #ruby
ph^ joined #ruby
gener1c joined #ruby
burgestrand joined #ruby
zommi joined #ruby
workmad3 joined #ruby
becom33 joined #ruby
bosphorus joined #ruby
Morkel joined #ruby
robotmay joined #ruby
heftig joined #ruby
ph^_ joined #ruby
benja-M-_ joined #ruby
moshef joined #ruby
satyavvd joined #ruby
luckyruby joined #ruby
skim1776 joined #ruby
iocor joined #ruby
Johnnus_ joined #ruby
fermo joined #ruby
pi3r joined #ruby
pen joined #ruby
skim1776 left #ruby
becom33 joined #ruby
trivol joined #ruby
eerdogan joined #ruby
apeiros_ joined #ruby
becom33 joined #ruby
zedUNDginger joined #ruby
stephenjudkins joined #ruby
Codif joined #ruby
DaZ joined #ruby
ikaros joined #ruby
tayfunoziserikan joined #ruby
BiHi joined #ruby
gregorg joined #ruby
iocor joined #ruby
aj910martin joined #ruby
adambeynon joined #ruby
Seisatsu joined #ruby
robotmay joined #ruby
ammar01 joined #ruby
dnjaramba joined #ruby
hurikhan|Work joined #ruby
hukl joined #ruby
jorum joined #ruby
MUILTFN joined #ruby
dr_bob joined #ruby
jr00n joined #ruby
ephemerian joined #ruby
jbpros joined #ruby
popsch joined #ruby
jorum joined #ruby
<popsch> how can I use a rubygem in my ruby script? require 'solidassert' produces an error, although it's installed on the drive in the right directory (gem install). I always get a LoadError
<popsch> oh. I have to require rubygems first.
Behi joined #ruby
p1d joined #ruby
probst joined #ruby
jgrimes_ joined #ruby
Aaaarg joined #ruby
havenn joined #ruby
workmad3 joined #ruby
stephenjudkins joined #ruby
alienvenom joined #ruby
vmatiyko left #ruby
smgt joined #ruby
akem joined #ruby
xol joined #ruby
xhr joined #ruby
tatsuya_o joined #ruby
_debo joined #ruby
benj joined #ruby
user__ joined #ruby
tyman joined #ruby
havenn joined #ruby
fortysixandtwo joined #ruby
thecreators joined #ruby
stoffus joined #ruby
ksinkar joined #ruby
psino joined #ruby
psino left #ruby
Mch1 joined #ruby
psino joined #ruby
hukl joined #ruby
skim1776 joined #ruby
<skim1776> is there any book or article about good practice of splitting files in ruby project - organizing code blocks, dividing it by modules and files, including local files?
Helius joined #ruby
<apeiros_> wouldn't know a good article. but basically you map modules & classes to files
<apeiros_> that is: Foo goes to lib/foo.rb, Foo::BarBaz goes to lib/foo/barbaz.rb
<apeiros_> executables go to bin/, toplevel you've got your Rakefile, Gemfile, gemname.gemspec, README, LICENSE etc.
eerdogan joined #ruby
<apeiros_> that's about it. rest depends on what you've got additionally. if you do unit testing, you'd also have a test or spec dir
suzuken joined #ruby
<shevy> skim1776 lib/ is the most important directory of your project
suzuken left #ruby
<skim1776> the most difficult question - is when put some code into module or put it into separate file
<skim1776> *into separate class
tayy joined #ruby
<apeiros_> skim1776: module and files are different concepts
<skim1776> apeiros_, yeah I meant to say module or class
<shevy> you mean module vs. class?
<apeiros_> ok. but that's unrelated to how to split stuff up into files…
<shevy> that's a question I have not understood myself that much :-)
<apeiros_> it's a very difficult question for which no generic answer exists.
<apeiros_> good API design is hard.
rpowell joined #ruby
<skim1776> shevy, I thought there's some book or anything about it
iocor joined #ruby
<apeiros_> there's lots of books about patterns
<shevy> pffft books
<apeiros_> I think there's even one with a focus on applying those patterns to ruby
<apeiros_> many patterns that are very important in other languages make little sense or are simply a natural part of ruby
<zedUNDginger> does does does do-do-do-do-do does does does d-d-d-d-d-d does this tr-tr-tr-tr-trick work in r-r-ruby 1.8.7? head, *tail = array
<shevy> skim1776 well, always put your project into a namespace
<apeiros_> zedUNDginger: yes. though I'd have thought you'd know such things :)
<shevy> yes zedUNDginger
<apeiros_> zedUNDginger: but I prefer: head, *tail = *array
<shevy> head will use the first member, the rest goes to tail
<shevy> hmmmm
<zedUNDginger> apeiros_: th-th-th-th-ankyou vvvery much
<shevy> *$var
josephwilk joined #ruby
<shevy> *$_
DaZ joined #ruby
<shevy> I could use $_ variables :)
<shevy> but I hate the $ character in scripts
<apeiros_> banister on drugs again? o0
sepp2k joined #ruby
<shevy> yeah
<shevy> he is losing his grip on the real world
<shevy> slowly but steadily
workmad3 joined #ruby
akem joined #ruby
akem joined #ruby
randym joined #ruby
jgrimes joined #ruby
senny joined #ruby
oponder joined #ruby
jamiemill joined #ruby
vmatiyko joined #ruby
ikaros joined #ruby
bier|tp joined #ruby
jbpros joined #ruby
JohnBat26 joined #ruby
hinogi joined #ruby
hinogi joined #ruby
workmad3 joined #ruby
timonv joined #ruby
timonv joined #ruby
iocor joined #ruby
nari joined #ruby
fridim_ joined #ruby
xhr_ joined #ruby
dazoakley joined #ruby
tk_ joined #ruby
felipegb joined #ruby
heftig joined #ruby
dr_bob joined #ruby
bier joined #ruby
jensn joined #ruby
vitoravelino joined #ruby
vitoravelino joined #ruby
thecreators joined #ruby
emptyflask joined #ruby
jamiemill joined #ruby
Natch| joined #ruby
xhr joined #ruby
Adman65 joined #ruby
beckybunny joined #ruby
tvw joined #ruby
preller joined #ruby
preller joined #ruby
Pip joined #ruby
rsampaio joined #ruby
<beckybunny> hi! i was wondering is anyone could help me with the 'spreadsheet' excel manipulation gem? i wrote a script that takes an excel file, a sheet index, a column letter and a row index which converts dates in a funny format given by an weather monitoring station (ammonia sensor and things) into a sensible format you can use to make graphs and things. however the output file it generates is corrupted x__x;. http://pastebin.com/m1FCtsM7
kennethreitz joined #ruby
<beckybunny> for the time being i'm just exporting them to a text file and getting people to copy paste in the results
<beckybunny> but...
<beckybunny> there are allot of these files :P
justinmcp joined #ruby
ph^ joined #ruby
<ccooke> beckybunny: how is the output corrupted?
dnjaramba joined #ruby
[]Tsukasa[] joined #ruby
<[]Tsukasa[]> http://pastie.org/2932878 what am i missing here
<beckybunny> when opening the file in excel it says "File error: data may have been lost".
<ccooke> []Tsukasa[]: ruby 1.8?
LittleBill902 joined #ruby
<beckybunny> also as an example: an input file that's 123kb produces an output file thats 61kb
xec joined #ruby
<[]Tsukasa[]> ccooke: rvm use 1.9.3
rclark joined #ruby
xec joined #ruby
<ccooke> []Tsukasa[]: hmm. rarely use rvm, but doesn't that provide a frontend to gem? "rvm gem"?
dnjaramba joined #ruby
<[]Tsukasa[]> ccooke: also ran rvm gem install rb-appscript and with a test file it still says it can't find appscript and I have require 'appscript' and include Appscript as per the site
iamjarvo joined #ruby
lorandi joined #ruby
jensn_ joined #ruby
closedbracket joined #ruby
skim1776 left #ruby
<ccooke> beckybunny: and it's an xls file, so it's rather hard to work out what's missing
<beckybunny> ccooke: yeah :(
<beckybunny> ccooke: if only there was some sort of xml based spreadsheet format :P
<beckybunny> o m g <3
<ccooke> beckybunny: fits your issue, with the 50% reduction in file size
<beckybunny> thanks so much ccooke :)
<ccooke> n
<ccooke> p
<beckybunny> i was searching for ages : P i dunno how i didn't find that. thanks again :)
xhr joined #ruby
<ccooke> []Tsukasa[]: I'd suggest looking in your gem directories to see which one has installed the appscript files
<[]Tsukasa[]> ccooke: I figured it out I had to add it to a gemspec file to be pulled over into the environment
<ccooke> []Tsukasa[]: ah ha
<ccooke> []Tsukasa[]: interesting
<[]Tsukasa[]> its working now :)
jgrimes joined #ruby
eerdogan joined #ruby
jgrimes_ joined #ruby
jgrimes joined #ruby
replore joined #ruby
jgrimes_ joined #ruby
jr00n joined #ruby
advorak joined #ruby
eerdogan joined #ruby
bwwrd joined #ruby
renanoronfle joined #ruby
esparkman joined #ruby
marcin_m joined #ruby
<marcin_m> how i can pull out the domain name not ip address ?
<marcin_m> request.host gives me ip address
yamada joined #ruby
smgt joined #ruby
ikaros joined #ruby
skim1776 joined #ruby
rickmasta joined #ruby
berkes joined #ruby
<skim1776> how can I implement concurrent function if I should store its result in a global variable and run it in 3 nested cycles?
BiHi joined #ruby
AndChat- joined #ruby
burgestrand joined #ruby
<ccooke> marcin_m: context? what sort of object is "request"? (there are dozens of possible things you could be using :-)
<ccooke> skim1776: do you mean concurrent as in threads running at the same time, or nested in the sense that there is one thread of execution which runs through a three-level-deep nested loops?
jbpros joined #ruby
<skim1776> there's a function which is run in the 3 nested loops, I want to make it concurrent
<ccooke> skim1776: can you give some example code?
<ccooke> not everything can sensibly be made concurrent
<skim1776> there's a function which accepts x and y and returns x**5 + y**5
<ccooke> the important question is how much the processing depends on previous answers
<skim1776> I need to run it for all x and y between 0 and 10
<skim1776> sorry and z**5
<skim1776> I iterate x, y, z from 0 to 10 in 3 cycles and calculate the answer
<skim1776> the result is the sum of all calculations
<skim1776> as you can guess it's really slow
<ccooke> damn, meeting
demian`_ joined #ruby
zedUNDginger joined #ruby
tommyvyo joined #ruby
tatsuya_o joined #ruby
xhr_ joined #ruby
Paladin joined #ruby
adambeynon joined #ruby
shevy joined #ruby
LBRapid joined #ruby
benj_ joined #ruby
tayy joined #ruby
v0n joined #ruby
xhr joined #ruby
kedare joined #ruby
wyhaines joined #ruby
hxmws joined #ruby
<hxmws> Hi All, I'm new to ruby and am looking for some help with string manipulation. I have the following string Test/Folder and am looking to print only Folder. Any ideas of the best way to do this?
<hxmws> i've looked at string.split
<hxmws> and string.gsub but cant really figure it out
Sliker joined #ruby
workmad3 joined #ruby
cantonic joined #ruby
emmanuelux joined #ruby
rickmasta joined #ruby
nanderoo joined #ruby
vmatiyko left #ruby
tayfunoziserikan joined #ruby
<apeiros_> hxmws: File.dirname
<apeiros_> but yes, string.split is an approach too, if you want to see how it'd work with that, then please paste up the code you currently have with split (e.g. on pastie.org )
theRoUS joined #ruby
theRoUS joined #ruby
<hxmws> apeiros_, will the file.dirname work even though its just a string?
<apeiros_> hxmws: as the docs can tell you, File.dirname is intended to work with strings.
<apeiros_> note, case matters
<apeiros_> File.dirname != file.dirname
<apeiros_> it's File.dirname(string)
bwlang joined #ruby
<hxmws> apeiros_, thanks for the info on dirname. The problem is I am looking to output the last level of the directory tree
<hxmws> i.e Test/Folder
<hxmws> I only want to see Folder
<linduxed> ok, so i've got to write the code for score(dice) in this piece of code https://gist.github.com/1400445
<apeiros_> err, yeah, sorry, I gave you what'd give "Test", not "Folder"
<apeiros_> basename is the other side
<hxmws> ahhh cool
<hxmws> not seen that one before
<hxmws> i'll have a read up :-)
<apeiros_> linduxed: require File.expand_path(File.dirname(__FILE__) + '/edgecase') <-- that's bad style
<linduxed> my idea was that i start off by creating an array with six zeroes, and then increment position 3 (for instance) if i hit a three when iterating through dice
<linduxed> apeiros_: blame the coders of rubykoans
<apeiros_> then I blame them
<linduxed> apeiros_: i haven't written anything in that file yet
<linduxed> and i promise you that my ruby skills won't make it prettier ;-)
samxor joined #ruby
<linduxed> but back to my questions
<apeiros_> that makes me sad…something intended to teach starts with a terrible practice on the first line of code… :-S
<linduxed> first of all, is it a good idea (that thing about creating an array with zeroes), and secondly, how do i do it?
blitzMN joined #ruby
<apeiros_> whether it's a good idea is what you should experience while writing/learning
<linduxed> hmmm
<apeiros_> how to do it: take a look at Array::new
<linduxed> yeah i guess that's true
<apeiros_> ri Array::new
<linduxed> in irb?
<apeiros_> in your shell
<apeiros_> assuming you installed ruby completly, with docs. (with rvm, that needs the additional step `rvm docs generate`)
<linduxed> yeah i've got ri
<apeiros_> you need the doc data too ;-)
<apeiros_> so if it says "nothing known about Array::new", then you're missing the doc data.
<linduxed> no i got some output
cyri_ joined #ruby
p0y joined #ruby
jtrudeau joined #ruby
advorak joined #ruby
Kamoi joined #ruby
cakepie joined #ruby
yekta joined #ruby
moshef joined #ruby
yfeldblum joined #ruby
<cakepie> I am having troubles compiling 1.9.3-p0 under Lion, having this exact issue: http://redmine.ruby-lang.org/issues/5194 (Yes, I used "--with-gcc=clang". And I have installed Xcode 4.2. It's happening both on my brand new MacBook Air and on my old iMac.)
dyer joined #ruby
<cakepie> Did anyone here manage to compile it at all? Without using rvm or the likes.
SplitNova joined #ruby
<apeiros_> look what rvm does and do it without?
p0y_ joined #ruby
skim1776 left #ruby
<cakepie> Good point, but not that easy, without installing rvm. :-)
<apeiros_> well, if you want to make it more difficult on yourself, that's your problem I guess…
<apeiros_> rvms source is online
jcromartie joined #ruby
muzzle_fuzzle joined #ruby
<cakepie> There's no special flags for 1.9.3-p0 in rvm, except for a "--clang" flag which is simply passed as "CC=clang".
JamieD joined #ruby
ph^_ joined #ruby
<cakepie> Just curious if someone managed to compile it under Lion with clang.
ramusara joined #ruby
Synthead joined #ruby
ephemerian left #ruby
Draco_ joined #ruby
smgt joined #ruby
clockwize joined #ruby
nerded joined #ruby
iocor joined #ruby
nkbuff joined #ruby
rsampaio joined #ruby
tomzx joined #ruby
ruby_newbie joined #ruby
grekko joined #ruby
<ruby_newbie> hello
<ruby_newbie> can't build bdb
<ruby_newbie> /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- features (LoadError)
<ruby_newbie> whein i " ruby extconf.rb"
<ruby_newbie> does someone knows anything about it?
evantravers joined #ruby
Telling joined #ruby
arpegius joined #ruby
<Tasser> ruby_newbie, ruby-rbot?
<ruby_newbie> yeah
<Tasser> they've got an own channel, ask them
<ruby_newbie> ok
dv310p3r joined #ruby
Tuxist joined #ruby
anderse joined #ruby
Paladin joined #ruby
rippa joined #ruby
conntrack left #ruby
kuadrosx joined #ruby
notbrent joined #ruby
thepix joined #ruby
benja-M- joined #ruby
tatsuya_o joined #ruby
tatsuya_o joined #ruby
ecolitan_ joined #ruby
norex joined #ruby
jwill joined #ruby
benja-M- left #ruby
jr00n joined #ruby
moshef joined #ruby
seivan joined #ruby
iocor joined #ruby
sdavis joined #ruby
_debo joined #ruby
bier|tp joined #ruby
cdepue joined #ruby
bier joined #ruby
sethetter joined #ruby
JumpMast3r joined #ruby
p0y joined #ruby
<sethetter> I'm trying to use test/unit assertions for a Sinatra application, but am getting NoMethodErrors for them with RSpec and Rack/Test
<sethetter> http://pastie.org/2933601 -- is there anything wrong going on here? or should I have access to the test/unit/assertion methods?
crankycoder joined #ruby
<jcromartie> weird… does Nokogiri create temp files or something?
<jcromartie> oh shit, never mind
manizzle joined #ruby
<apeiros_> sethetter: while I probably won't be able to help you, take this bit of advice: *always* include exceptions you get
pen joined #ruby
<apeiros_> it's really annoying for people who want to help having to puzzle that kind of information together.
strife25 joined #ruby
james_co_ joined #ruby
james_c__ joined #ruby
tayfunoziserikan joined #ruby
tayy joined #ruby
Cervajz joined #ruby
dotnull joined #ruby
<sethetter> apeiros_: thanks i'll keep that in mind. I was running this code through RSpec, so I just had the failure it provided me with, which was NoMethodError
<sethetter> apeiros_: unless I missed something, in which case it was a noob mistake of mine.
<apeiros_> all it says is "NoMethodError"? nothing more? it doesn't even tell you how to run it to get more information?
<linduxed> if i want to address the first element in an array, would it be arrayname[0] or arrayname[1] ?
<samuelkadolph> linduxed: ruby arrays start at 0
<linduxed> ok
<apeiros_> as in most languages ;-)
<linduxed> yeah, but i needed to make suret
<linduxed> *sure
moondiamond joined #ruby
notbrent joined #ruby
<linduxed> also, what's the best way to do arrayname.each_but_not_really_each_because_id_like_to_start_iterating_at_a_different_element_than_the_first_one ?
<apeiros_> well, irb: ["a","b","c"][1] # => "b"
<apeiros_> obviously index 1 is the 2nd item…
<apeiros_> iterate: slice
<apeiros_> ary[2..-2].each …
<apeiros_> that'll iterate from 3rd element to 2nd last
<linduxed> oh ok
jr00n joined #ruby
<linduxed> that should do it, thx
tomhsx joined #ruby
Rango joined #ruby
<ccooke> linduxed: or, if you want a more generic approach...
<theRoUS> when i use builder to implement a #to_xml method for my class, the #target! method keeps getting intercepted by #method_missing so i get "<target/>" in my xml result
<ccooke> linduxed: array.drop(10).each
<ccooke> will drop the first ten items
<samuelkadolph> How is that more generic?
<ccooke> samuelkadolph: because not everything you iterate on will be an array
<ccooke> samuelkadolph: whereas drop() will work on any enumerable
iamjarvo joined #ruby
tvw joined #ruby
LBRapid joined #ruby
<linduxed> hmmm i just realized something
<samuelkadolph> Hmm, forgot about that method.
<linduxed> i wanted to do something like "amounts[1..-1].each do |amount|" then "if amount >= 3" then something would happen
<linduxed> that something would be multiplying the amount, by the current position
<linduxed> kinda like multiplying what's in the position i with i
<ccooke> linduxed: so, with_index ?
<linduxed> which makes me think this would be best made iterative with the old while method
<linduxed> ccooke: oh, that's a variable?
<linduxed> that's nice
<linduxed> or is it? because that's what i'd need, i think
<ccooke> linduxed: with_index is an enumerable method. returns a new enumerable that returns an array containing the value from the original enumarable, plus the inde
<linduxed> whoa
cantonic joined #ruby
<linduxed> digestion time
<ccooke> linduxed: so: array.each.with_index do |array_item, index| ... ; end
<linduxed> oh ok
<apeiros_> ccooke: there isn't any method that does the opposite of Enumerable#drop, right?
<linduxed> i'll try that then, thx
<ccooke> apeiros_: which opposite?
<apeiros_> or rather, at the opposite end of the enumeration
sheng_ joined #ruby
<ccooke> apeiros_: that would be hard to do efficiently
<apeiros_> i.e. enum._???_(n).each # omit the last N iterations
Draco_ joined #ruby
<apeiros_> ccooke: not really
<ccooke> apeiros_: ... well... enumerable.reverse.drop(n).reverse would *do* it...
<apeiros_> same technique as with each_cons e.g.
Guedes joined #ruby
Guedes joined #ruby
<apeiros_> you buffer up until you get n items, then yield the first until iteration is over
albemuth joined #ruby
<Tasser> apeiros_, no lookahead ;-)
<apeiros_> Tasser: none needed
<apeiros_> could of course be optimized if the enumeration implements #length
luke-- joined #ruby
<Tasser> apeiros_, the theory of enumerations is that they are like streams - you don't know how much further they go
sheng_ left #ruby
<apeiros_> Tasser: hence optimization
<ccooke> Tasser: the method apeiros_ suggested doesn't need to know the length
<apeiros_> not all things are the same, and it makes little sense to pretend they were
Azure joined #ruby
alindeman joined #ruby
linusoleander joined #ruby
linusoleander left #ruby
clockwize_ joined #ruby
pen joined #ruby
jgarvey joined #ruby
berkes joined #ruby
<linduxed> how do i say "if the input argument is an empty list, break here and return nil" ?
sdavis left #ruby
<benj_> depends if you care whether it's not really a list
<linduxed> well let's assume i know it's gonna be a list
<benj_> what do you mean by list exactly, Array? Enumerable?
<linduxed> array
<benj_> if I know it's an array, I'd use: return nil if arg.empty?
<linduxed> haha, speaking pythonese over here
kevinbond joined #ruby
<shevy> zsss sSszz szszsss ?
norex joined #ruby
<shevy> that was "quo vadis?" in pythonese
seivan joined #ruby
<linduxed> benj_: should i add that right after the signature?
<linduxed> at the end of the def line?
cantonic joined #ruby
<benj_> if that makes you happy
<benj_> sounds like a fine place to put it
<linduxed> benj_: well dude, i don't know where it *should* be put
enikar joined #ruby
<benj_> I'd put it as the first line of the method
<linduxed> ok
<linduxed> i'll try that
<benj_> what don't you know, whether it will work or whether it's good practice or "idiomatic"?
<benj_> I don't follow any particular religions on how to write my code
eugynon joined #ruby
<benj_> on the other hand I wouldn't do something asinine like "unless arg.empty? .... (looooong block here).... else return nil"
kuadrosx joined #ruby
Adman65 joined #ruby
benja-M-_ joined #ruby
pen_isident joined #ruby
burgestrand joined #ruby
<linduxed> ok... i'm stuck here https://gist.github.com/1400874
<linduxed> line 53 doesn't seem to be doing anything
skim1776 joined #ruby
<linduxed> it doesn't subtract three from the position inspected
<linduxed> amount - 3 doesn't work either
centipedefarmer joined #ruby
dhruvasagar joined #ruby
Paladin joined #ruby
<linduxed> should i do "amount -= 3"
<linduxed> ?
<linduxed> hmmm, that didn't work either
ank joined #ruby
<rippa> your method looks really complicated
<linduxed> rippa: that's what happens when you don't know how to code properly
<rippa> I did it like this
<linduxed> rippa: but i was told to just code, then iron out the style later
<linduxed> oh
<rippa> not that I know how that works anymore
<linduxed> well, that's probably what i should strive for
cantonic_ joined #ruby
wedtm joined #ruby
timonv joined #ruby
<burgestrand> I like linduxed’s version better
<burgestrand> Because it’s readable :p
<linduxed> burgestrand: yeah but then again i should probably aspire to _be able to_ do it like rippa
<linduxed> which atm i can't
<linduxed> wouldn't be able to come up with that
<rippa> I like unreadable code
<rippa> because I do it for pleasure
<linduxed> but anyway, back to my question... why doesn't my line 53 do anything?
dyer joined #ruby
clockwize joined #ruby
<burgestrand> Is it run?
<linduxed> well... i don't know?
clockwize joined #ruby
<linduxed> it should be... i mean it's in the code
clockwize_ joined #ruby
<rippa> try printing out your data before and after that line
dv310p3r joined #ruby
ghanima joined #ruby
cantonic joined #ruby
moshef joined #ruby
<linduxed> puts is the ruby equivalent of python's print, right?
steph021 joined #ruby
steph021 joined #ruby
_kinderman joined #ruby
dch4pm4n joined #ruby
<linduxed> hmmm
<linduxed> in irb it looks like it... but it also seems to return nil
<linduxed> for some reason...
paraglade joined #ruby
<rippa> because it returns nil
<rippa> what it should return?
<rippa> arguments?
<rippa> try p
ikaros joined #ruby
<deryl> linduxed: yes it returns nil. it OUTPUTS whatever you passed to it
<deryl> different from its *return* value
<linduxed> ok
<deryl> linduxed: also that looks like a _ not a - on line 53
<deryl> looks like you have _= not -=
bean joined #ruby
<linduxed> deryl: well maybe that's the font on gist, it's most definitely -
<deryl> ok
jr00n joined #ruby
<deryl> yeah its the font. paste it into irssi and it shows right
nonotza joined #ruby
alex__c2022 joined #ruby
<any-key> Odd, I have a class Foo < Struct.new(:id), and inside I print out id (which is 1 in this case); when I do "id ||= 0" it assigns 0 to id
<any-key> how does that even work??
<deryl> then its not seeing id var as being set
ryanf joined #ruby
<deryl> for whatever reason. (only addressing the work comment)
<any-key> but I can manipulate it and print it out
<any-key> and yet as far as the interpreter is concerned it's nil
jorum joined #ruby
dyer__ joined #ruby
<deryl> interesting. idk why its doing that. i can only say use irb or pry to see whats going on
<any-key> The class of id is Fixnum
<any-key> How the fuck is that fucking nil
flip_digits joined #ruby
<any-key> I think I'm going to rip my hair out
<deryl> potentially calling the wrong 'id' when puts'ing?
pootpoot joined #ruby
<any-key> nope, sanity check confirms that everything is correct
LiquidInsect joined #ruby
<deryl> ok
<linduxed> THERE we go
<linduxed> small change needed to line 53
<linduxed> was just a question of adjusting the correct position
<skim1776> so, concurrency in ruby is impossible? only in other implementations?
jbw joined #ruby
<Mon_Ouie> Concurrency is possible
ethndbst joined #ruby
<Mon_Ouie> But you won't get parallelism in MRI
lkba joined #ruby
jbpros joined #ruby
austinbv joined #ruby
<skim1776> Mon_Ouie, so I have to use another implementation like Jruby oro rbx?
Targen joined #ruby
dyer joined #ruby
zedUNDginger joined #ruby
akemrir joined #ruby
linusoleander joined #ruby
<burgestrand> skim1776: if you want parallel computation in a single process, yes
<any-key> class Foo < Struct.new(:id); def bar; puts id; id ||= 0; puts id; end; end
<any-key> There has to be a good reason that "Foo.new(1).bar" prints out 1 and then 0
Draco_ joined #ruby
Morkel joined #ruby
v0n joined #ruby
mklappstuhl joined #ruby
moshef_ joined #ruby
kuadrosx joined #ruby
dkr joined #ruby
airhorns joined #ruby
<kke> i believe id does something you didn't expect
<kke> are you sure it shouldn't be @id?
vmatiyko joined #ruby
<rippa> id is method
<rippa> accessor
<any-key> So, initially there isn't a local id defined, so it falls through to self.id...after doing id ||= 0 it creates a local id
<rippa> yes
probst joined #ruby
jimgg joined #ruby
moshef_ left #ruby
moshef_ joined #ruby
moshef_ left #ruby
moshef_ joined #ruby
moshef_ left #ruby
<burgestrand> Cool. Turns out x ||= y does not equal x || x = y, even if it’s kinda close!
moshef_ joined #ruby
<kke> there was a blog post about that
<burgestrand> kke: ooh; you have a link?
<Afal> I'm guessin the second sets x as y regardless?
<burgestrand> Afal: no, x ||= y and x || x = y is very similar in that neither of them sets x unless x is defined; except in some edge cases (like the example above where x is a method accessor)
<burgestrand> or… other way around; they only set X if X is non-truthy
<samuelkadolph> x ||= y is x || x = y. The only cavet is that when you have a local variable on the left handside, it will be created and set to nil before the line itself is run
chessguy joined #ruby
<Afal> :\
<samuelkadolph> It's why, x = x works but x by itself gives you a NameError
<burgestrand> kke: thanks
<any-key> kke: thanks for the link
theRoUS joined #ruby
theRoUS joined #ruby
vmatiyko left #ruby
zenergi joined #ruby
james_cotterill joined #ruby
craigglennie joined #ruby
cdepue joined #ruby
linusoleander joined #ruby
IrishGringo joined #ruby
strife25 joined #ruby
james_co_ joined #ruby
mikepack joined #ruby
burgestrand joined #ruby
cakepie joined #ruby
<cakepie> Has anyone here compiled 1.9.3-p0 with clang?
iocor joined #ruby
cloudgeek joined #ruby
jorum joined #ruby
sdavis1 joined #ruby
Vendethiel joined #ruby
ianbrandt joined #ruby
tyman joined #ruby
preller joined #ruby
preller joined #ruby
moshef_ joined #ruby
Y_Ichiro joined #ruby
tayy joined #ruby
dankest joined #ruby
eywu joined #ruby
macmartine joined #ruby
eldariof joined #ruby
Shamgar joined #ruby
Ankhers joined #ruby
kW_ joined #ruby
<kW_> Hello! Does a ruby-based network graphing and monitoring solution exist?
cbuxton joined #ruby
kartouch left #ruby
tayy_ joined #ruby
daniel_hinojosa joined #ruby
kartouch joined #ruby
Beoran_ joined #ruby
tayy joined #ruby
crescendo joined #ruby
<linduxed> when i see variables starting with a @, is this some convention that class variables are generally called stuff starting with a @, or does that have a syntactical meaning?
paraglade left #ruby
<rippa> instance vars start with @
<rippa> always
<rippa> if id doesn't it's local
<rippa> *it
jds joined #ruby
<linduxed> sorry, meant instance vars
alfism joined #ruby
<linduxed> noticed it in the code now
<rippa> class vars start with @@ but don't use them
moted joined #ruby
niklasb joined #ruby
<mklappstuhl> After running my tests I get a list of "Failed examples" this moves the failed/passed test count out of my terminal window... Is there a way to hide this list? It's above the counter anyway
kuadrosx joined #ruby
sepp2k joined #ruby
adeponte joined #ruby
zenergi joined #ruby
Brozilla joined #ruby
robotmay joined #ruby
alfism joined #ruby
Russell^^ joined #ruby
stephenjudkins joined #ruby
quest88 joined #ruby
Russell^^ joined #ruby
apeiros_ joined #ruby
beckybunny joined #ruby
jensn joined #ruby
lorandi joined #ruby
skim1776 left #ruby
visof joined #ruby
tacco joined #ruby
visof joined #ruby
<tacco> hi everyone.. i can't find a fix for that supir ssl bug..
<tacco> /usr/lib/ruby/1.8/openssl/ssl-internal.rb:30: [BUG] Segmentation fault
<visof> ello
<visof> hello
<tacco> does anybody have a idea?
<tacco> hi visof
<visof> can i do this, hash = {}; hash[:one][:apple] += 1 ?
jrist joined #ruby
shadoi joined #ruby
travisjeffery joined #ruby
<visof> i want it hash that it's key value and it's value another hash that it's key value and it's value array
<visof> how can i do it?
<samuelkadolph> visof: Put a hash inside a hash
marcuspat joined #ruby
<visof> samuelkadolph: how?
<samuelkadolph> The same way you put anything in a hash? Hash#[]=
<visof> samuelkadolph: i did that as i showed
<visof> hash = {}; hash[:one][:apple] += 1
<samuelkadolph> No you didn't
<visof> ?
kuadrosx joined #ruby
<visof> samuelkadolph: please show it to me?
<samuelkadolph> hash[:one] = {}
shadoi joined #ruby
gearaholic joined #ruby
shadoi joined #ruby
mayankkohaley joined #ruby
booginga joined #ruby
Pip joined #ruby
Pip joined #ruby
sorin_ joined #ruby
n8ji joined #ruby
moshef joined #ruby
Manhose joined #ruby
mrsolo joined #ruby
silky joined #ruby
Draco_ joined #ruby
strife25 joined #ruby
rebagliatte joined #ruby
james_cotterill joined #ruby
<macmartine> If I have a symbol :business, what's the best way to use it to call the model of that name: Business.find(1) ?
<apeiros_> macmartine: #rubyonrails. and iirc active support has constantize
<apeiros_> might need to combine it with something like .to_s.camelcase
<shadoi> macmartine: Object.const_get(:business.capitalize).send(:find)
vmil86 joined #ruby
<deryl> apeiros_: Symbols aren't just rails are they?
<shadoi> Object.const_get(:business.capitalize).send(:find, 1)
<shadoi> rather
elevenarms joined #ruby
<macmartine> ok, thanks guys, this works too: :business.to_s.capitalize.constantize.find(1)
<apeiros_> deryl: no, symbols aren't, but constantize and camelcase are
<deryl> ah
<deryl> thanks :)
akemrir joined #ruby
<apeiros_> you can achieve something similar by const_get and capitalize, but they don't attribute for lots of things
cbuxton1 joined #ruby
eignerchris joined #ruby
beckybunny joined #ruby
<shadoi> constantize() does basically the same thing, just accounts for multiple levels of modules/classes, etc.
josh___ joined #ruby
dyer joined #ruby
<apeiros_> correct
<apeiros_> and camelcase also cares about the mapping of foo_bar to FooBar, while capitalize would make that Foo_bar
<shadoi> *nod*
kenperkins joined #ruby
<shadoi> without rails I'd probably pull in Extlib if I needed general usage.
<apeiros_> while I'm not much of a fan of AS, I'd use those methods within rails instead of capitalize + const_get
<apeiros_> outside of rails I think you've got a design issue if you need that :)
bosphorus joined #ruby
<apeiros_> (inside rails too, but there we call it "opinionated code")
<shadoi> Works nice for serialization of REST models, I think that's the only place I use it.
<apeiros_> I've used it for the usual suspects - mapping options where methods map to classes (similar to belongs_to, has_many etc.)
Draco__ joined #ruby
Paladin joined #ruby
dv_ joined #ruby
eft left #ruby
niklasb joined #ruby
jangosteve joined #ruby
Avi` joined #ruby
kenichi joined #ruby
cloudgeek left #ruby
paraglade joined #ruby
akem joined #ruby
hooper joined #ruby
adamkittelson joined #ruby
tatsuya_o joined #ruby
travisjeffery joined #ruby
tyman joined #ruby
IrishGringo joined #ruby
shadoi joined #ruby
vmatiyko joined #ruby
minijupe joined #ruby
Paladin joined #ruby
tvo joined #ruby
stkowski joined #ruby
EddieBluh joined #ruby
vmatiyko left #ruby
headius joined #ruby
sepp2k joined #ruby
ChampS_ joined #ruby
cyri_ joined #ruby
berkes joined #ruby
shadoi1 joined #ruby
badabim joined #ruby
akemrir joined #ruby
Danielpk left #ruby
<tyman> Anyone experiencing problems with autotest not watching all your specs. Any ideas what's causing this? https://gist.github.com/1401422
|PiP| left #ruby
btanaka joined #ruby
akemrir joined #ruby
Paladin joined #ruby
Fretta joined #ruby
voodoofish430 joined #ruby
clockwize joined #ruby
Revernd joined #ruby
strife25 joined #ruby
iamjarvo joined #ruby
crankyco_ joined #ruby
kirun joined #ruby
<jwmann> Guys
<jwmann> I'm literally stuck
artOfWar joined #ruby
<jwmann> Okay, I have this code: http://d.pr/5j37 I'm expecting this output => forward?path=node/1 ; What I actually get is forward?path=node%2F1 ; What should I do?
cbuxton joined #ruby
clockwize joined #ruby
tmart joined #ruby
<Ankhers> jwmann: first, this is the ruby channel, according to your link, you're stuck with PHP
<jwmann> ROFL
<jwmann> Not again!!!
<jwmann> GAHHHH
<jwmann> *facepalm*
<Ankhers> on the other hand, you're still getting what your expecting.
skim1776 joined #ruby
<Ankhers> check out php.net/url_decode
<skim1776> hey, who wanna do some pair programming?
<jwmann> Ankhers: Okay :)
<Ankhers> jwmann: $2F is the same as a /
<Ankhers> %2F rather
<jwmann> Ankhers: Yea I know but this l() function is converting it to url safe version instead of actually going to the link.
<Ankhers> jwmann: What framework, I've never heard of an l function for php.
<jwmann> I love how I'm getting better support here than their channel xD
<jwmann> l() is a drupal function
<loocorez> Sounds like drupal to me... drupal has an l()
<jwmann> loocorez has the right idea
<jwmann> This specific one is the drupal 6 version
hjdivad left #ruby
yekta joined #ruby
skim1776 left #ruby
mrsolo joined #ruby
cdepue joined #ruby
<Ankhers> Unfortunately, I'm not well versed with drupal. I believe there is a drupal channel on here that you may be able to go to and find the help you're looking for.
maletor joined #ruby
clockwize joined #ruby
<jwmann> Ankhers: Haha okay :)
<jwmann> Ankhers: WOW I feel like a double retard today; I need more coffee
<Ankhers> We all have our days.
<jwmann> Ankhers: Not only did I post this question in the wrong channel but apparently I was trying to fix a problem that wasn't actually a problem X_______x
<jwmann> UGGHHHHHH
<loocorez> What was the solution? After staring at your code for a few minutes, I can't figure out anything wrong with it. Didn't try it, of course, but...
<Ankhers> lol, I tip my hat to you sir.
<jwmann> Haha
<jwmann> There was actually nothing wrong
<tyman> Anyone experiencing problems with autotest not watching all your specs. Any ideas what's causing this? https://gist.github.com/1401422
<jwmann> Since I didn't make the module that generates that specific node; I was told to remove the issue where the character were encoded. so I did but that last character was still being encoded little did I realize that the module was kool with that and worked as intended.
<jwmann> *sigh*
<loocorez> So it is still being encoded? It's just not a problem for your case?
dasfugufish joined #ruby
kenichi joined #ruby
akemrir joined #ruby
Draco_ joined #ruby
SplitNova joined #ruby
soulnafein joined #ruby
amacgregor joined #ruby
<jcromartie> why does Tempfile give me unix-style paths in Cygwin on one machine, but Windows-style paths on another machine?
<apeiros_> today is a hard day on me
<soulnafein> Hello! What's the cutting edge profiling technique for Ruby 1.9 apps? I need to speed up an importer script I would like something to visualize call graphs and so on.
<apeiros_> snide, cynical comment after snide, cynical comment…
* apeiros_ must stay nice…
pantsman joined #ruby
pantsman joined #ruby
dyer__ joined #ruby
<jcromartie> both are RUBY_PLATFORM = 1386-cygwin
<jcromartie> but one gives me temp files in /tmp/.....
<jcromartie> the other in C:\Documents and Settings\BLAH BLAH BLAH\
<jcromartie> I think I just need to pass the explicit temp directory
h4mz1d joined #ruby
jbpros joined #ruby
bwwrd joined #ruby
berkes joined #ruby
<jcromartie> there we go
parus joined #ruby
kuzushi joined #ruby
muzzle-fuzzle joined #ruby
nerded_ joined #ruby
psino left #ruby
marcuspat joined #ruby
sdwrage joined #ruby
soulnafein joined #ruby
<soulnafein> Hello again, I've got disconnected! What's the cutting edge profiling technique for Ruby 1.9 apps? I need to speed up an importer script I would like something to visualize call graphs and so on.
<muzzle-fuzzle> hi there, could someone look at this please , i stuck on "bundle install" https://gist.github.com/1401647 < should i need a special version of eventmachine to use this with openssl and git?
<muzzle-fuzzle> thankyou
stephenjudkins joined #ruby
xol joined #ruby
strife25 joined #ruby
dr_bob joined #ruby
Balgan joined #ruby
alaska joined #ruby
<alaska> Is there any way to issue map-reduce commands from the mongo gem?
cmetaclfe joined #ruby
akemrir joined #ruby
cmetaclfe left #ruby
amacgregor_osx joined #ruby
siksia joined #ruby
Draco_ joined #ruby
Lord-Harlot joined #ruby
kf8a joined #ruby
cmetaclfe joined #ruby
wyhaines joined #ruby
<cmetaclfe> I'm having issue with render_to_string in a custom class
spoq joined #ruby
JumpMast3r joined #ruby
<spoq> hi
<apeiros_> cmetaclfe: #rubyonrails
<apeiros_> hi spoq
<cmetaclfe> anyone know how to get render_to_string to work in a custom class in /lib
<spoq> any ops around?
cmetaclfe left #ruby
<eugynon> hi spoq
<apeiros_> spoq: why?
adeponte joined #ruby
<spoq> WHY?
<apeiros_> yes, why are you asking for an op?
<spoq> who gave you the permission to ask questions?
<eugynon> oh my
seivan joined #ruby
<amacgregor_osx> lol
<apeiros_> spoq: you might see an op earlier than you think.
<eugynon> you got to love them angry teens ;)
<spoq> you people should be glad that i am a peacemaker, not a crinimal
<amacgregor_osx> more like a little troll
<apeiros_> spoq: if you've got something ruby related, ask it. otherwise, go.
<eugynon> haha
<spoq> *yeah right*
<amacgregor_osx> chan chan chan !!
Adept` joined #ruby
iocor joined #ruby
<eugynon> but yeah spoq, we are glad you are not an criminal thou...
<spoq> i demand an immediate +v here.
<Ankhers> spoq: not sure if you're trying to be funny, but this should be a good read for you: http://www.mikeash.com/getting_answers.html
was kicked by apeiros_: get off the drugs
<amacgregor_osx> lol
<apeiros_> he wanted to see an op after all, didn't he…
<eugynon> true mate!
<amacgregor_osx> indeed
marcuspat joined #ruby
Hellojer_ joined #ruby
ilyam joined #ruby
<Ankhers> apeiros_: I tip my hat to you good sir.
<apeiros_> yw
<apeiros_> he's funny. in my query.
<apeiros_> you've gotta love some of 'em trolls
<eugynon> do you really dare speaking with him? What if he turns criminal on you man? ;)
Paladin joined #ruby
<amacgregor_osx> hahaha
<apeiros_> g
<amacgregor_osx> hey guys does anyone have experience with MacRuby ?
manizzle joined #ruby
jbw joined #ruby
<Ankhers> amacgregor_osx: what is your issue?
<amacgregor_osx> ohh no particular issue I'm just getting stared and I was looking for resources, books, screencasts etc
mrsolo joined #ruby
<Ankhers> http://www.macruby.org/ should be a good start.
siksia joined #ruby
<amacgregor_osx> lol ty
ilyam_ joined #ruby
Mohan joined #ruby
Mohan joined #ruby
paraglade left #ruby
<eugynon> if you ever wonder about anything amacgregor_osx, google is a good friend... :)
rebaglia_ joined #ruby
<amacgregor_osx> eugynon: whats that?
xol joined #ruby
<amacgregor_osx> who is google?
<eugynon> lol
thecreators joined #ruby
<amacgregor_osx> also are there any ops around?
<apeiros_> you demand +v too?
<amacgregor_osx> on second though never mind :D
<eugynon> i didnt mean to be rude in any way amacgregor_osx, so dont go mental now ;)
<apeiros_> I'm sorry, I'm all out of v's today, but I've got a couple of b's left - want one? :D
<amacgregor_osx> lol just joking around
<amacgregor_osx> apeiros_: lol
<apeiros_> demand is just too high…
* deryl demands he not be +v'd!
<apeiros_> but seriously, sometimes I wonder about the motivation of people like spoq…
cyri_ joined #ruby
<amacgregor_osx> some of like mysteries should remain unknown or do you really want to know what he was thinking ??
<eugynon> could be interesting, i guess...
lorandi joined #ruby
<alaska> He's still on, you could always /msg him, if you're brave :)
<eugynon> yeah, too bad im not that brave ;)
<eugynon> maybe after 1/2 beer i could ....
<Ankhers> half a beer?
<eugynon> yeah
<Ankhers> I wish I were a light weight when it came to drinking...
<eugynon> its ment like a joke thou... 1/2 beer == crazy_teens
<eugynon> ;)
Guedes joined #ruby
Guedes joined #ruby
jrist joined #ruby
sandstrom joined #ruby
LittleBill902 joined #ruby
csavola joined #ruby
ChampS_ joined #ruby
thecreators joined #ruby
sorin_ left #ruby
nerded joined #ruby
<alaska> Okay, so I have a class method (I think) that I'm looking for info on. It appears in the list when I do 'ri Mongo::Collection', but how do I drill down to that method's documentation, if any? Or is that as deep as it goes?
Guedes joined #ruby
Guedes joined #ruby
<apeiros_> ri Mongo::Collection::class_method
<apeiros_> :: for class methods, # for instance methods. the latter requires quoting in some shells (as it's treatet as a comment otherwise)
benja-M-__ joined #ruby
<Mon_Ouie> You can use ri Foo.bar
<Mon_Ouie> It means "either class method or instance method"
GreaseMonkey joined #ruby
<alaska> Ahhh. There we go. Excellent. Turns out, it's actually an instance method. Thank you very very much.
ilyam joined #ruby
iocor joined #ruby
hukl joined #ruby
cooper joined #ruby
soulnafein left #ruby
paraglade joined #ruby
badabim joined #ruby
Na_Klar joined #ruby
<Na_Klar> Where do I orientate when I want to realize windowed applications with ruby? Just basically
<Asher> on the mac?
<Na_Klar> no neccessarrily ..
<Na_Klar> something cross-compatible?
<shellox> Na_Klar another german? ;)
<deryl> shoes
<Na_Klar> shellox, how did you even know? :P
<deryl> shoes, red shoes, green shoes, whatever.
<shellox> Na_Klar: weil der nick deutsch ist :P
<shellox> kann aber auch ch oder at sein ;)
<Na_Klar> shellox, smart boy ^^
<Na_Klar> deryl, shoes .. I'll have a look, ty
<shellox> the best in a circle of 5 m ;)
<deryl> welcome.
<Asher> yeah shoes is the best bet for cross-platform
cooper joined #ruby
cooper joined #ruby
n8ji joined #ruby
Axsuul joined #ruby
cableray joined #ruby
red13 joined #ruby
bosphorus_ joined #ruby
havenn joined #ruby
Azure joined #ruby
workmad3 joined #ruby
Asher joined #ruby
Norrin joined #ruby
vootey joined #ruby
sdwrage joined #ruby
tshauck joined #ruby
shadoi joined #ruby
xol joined #ruby
minijupe joined #ruby
ethndbst joined #ruby
ethndbst joined #ruby
ctwiz joined #ruby
amacgregor joined #ruby
nonotza joined #ruby
Skaag joined #ruby
workmad3 joined #ruby
Rango joined #ruby
Draco_ joined #ruby
Guedes joined #ruby
Guedes joined #ruby
burgestrand joined #ruby
jamiemill joined #ruby
preller joined #ruby
preller joined #ruby
ryan0x2 joined #ruby
Azure|dc joined #ruby
alex__c2022 joined #ruby
_debo joined #ruby
axl_ joined #ruby
sandstrom joined #ruby
xhubert joined #ruby
cantonic joined #ruby
raythecat joined #ruby
Draco_ joined #ruby
h4mz1d joined #ruby
zulax joined #ruby
<zulax> in a each_line iterator, how do i call the next line before the loop?
Manhose joined #ruby
<zulax> so that i can read multiple lines in 1 iteration
raythecat joined #ruby
_debo_ joined #ruby
<apeiros_> zulax: each_line.each_slice(n) do |*lines|
<zulax> file.each_line do |line| -> line.next ->done
<zulax> apeiros_, so if i want to read 4 lines, does n = 4?
robbinn joined #ruby
Jake232 joined #ruby
<apeiros_> zulax: yes. see Enumerable#each_slice for more information.
<apeiros_> requires at least ruby 1.8.7 to work
Eth4n joined #ruby
rpowell joined #ruby
nimred joined #ruby
<zulax> ok, its working
jarjar_prime joined #ruby
<Mon_Ouie> You don't need the (explicit) splat in the argument list of the block
<zulax> thanks
jamiejackson joined #ruby
Damien__ joined #ruby
cableray joined #ruby
tommylommykins joined #ruby
* tommylommykins is staring at tvm
<tommylommykins> rvm
<tommylommykins> What's the most sensible, recent, stable ruby to get?
<subtle_newbie> 1.9.3
king313 joined #ruby
king313 joined #ruby
<burgestrand> ^ seconded, unless you have a reason to use anything lower
sie left #ruby
<tommylommykins> [ruby-]1.9.3-preview1
<tommylommykins> [ruby-]1.9.3-rc1
<tommylommykins> [ruby-]1.9.3[-p0]
<tommylommykins> [ruby-]1.9.3-head
<tommylommykins> Which one? :D
<indigo_> -p0
<tommylommykins> Cheers :)
clockwize joined #ruby
EddieBluh joined #ruby
<indigo_> Enjoy :)
<jamiejackson> Hi, I'm very very new to ruby and ror, and I'm trying to get a rails application going that i've inherited running. when i hit the app in a browser, i get "Please install the jdbc adapter: `gem install activerecord-jdbc-adapter` (no such file to load -- java)"
benja-M-__ joined #ruby
<burgestrand> Usually, -p*highestnumberyoucanfind*
<burgestrand> So, 1.9.3-p0 in this case :)
<jamiejackson> i tried that command, of course, but no dice. know what i should be looking for?
<apeiros_> tommylommykins: rc means "release candidate" and happens before the release
<tommylommykins> it appears to be working
<tommylommykins> Thanks for the help :)
ikaros joined #ruby
* indigo_ wonders how fast he could finish his work projects if he learned Rails
stephans joined #ruby
matti joined #ruby
nimred joined #ruby
<burgestrand> Probably not that much faster, but you might enjoy it more ;)
tatsuya_o joined #ruby
<indigo_> burgestrand: I mostly write online applications for summer programs, lots of CRUD
robotmay joined #ruby
dd2284 joined #ruby
jensn joined #ruby
Lord-Harlot joined #ruby
dd2284 left #ruby
stephenjudkins joined #ruby
xol joined #ruby
<burgestrand> indigo_: sweet, maybe there’s lots of time to win there then :)
austinbv joined #ruby
Skaag joined #ruby
Pip joined #ruby
savage- joined #ruby
Pip joined #ruby
ckrailo joined #ruby
cantonic_ joined #ruby
nanderoo joined #ruby
jorum joined #ruby
looopy joined #ruby
quest88_ joined #ruby
Ankhers left #ruby
Draco_ joined #ruby
<v0n> I have a wonderful question:
<v0n> does anyone know the PHP equivalent to: `ids = array.collect { |obj| obj.id }`?
<zedUNDginger> v0n: ruby can do better than that
<zedUNDginger> v0n: ids = array.map(&:id)
nanderoo left #ruby
workmad3 joined #ruby
robacarp joined #ruby
<v0n> zedUNDginger, hum, I didn't know the &: notation
<deryl> yeah this is only the 2nd time i've seen that notation
Behi joined #ruby
<v0n> not really readable :/
vitoravelino joined #ruby
vitoravelino joined #ruby
robacarp left #ruby
benja-M-__ joined #ruby
csavola left #ruby
emmanuelux joined #ruby
minijupe joined #ruby
fra000 joined #ruby
shadoi joined #ruby
<v0n> shadoi, thanks
pootpoot left #ruby
Draco_ joined #ruby
tommylommykins left #ruby
randym joined #ruby
Draco__ joined #ruby
<v0n> shadoi, yep, really good :)
stephenjudkins joined #ruby
eywu joined #ruby
dasfugufish joined #ruby
nerded joined #ruby
looopy joined #ruby
atmosx joined #ruby
looopy_ joined #ruby
hydrozen joined #ruby
tayy joined #ruby
tommylommykins joined #ruby
Adman65 joined #ruby
* tommylommykins has been using netbeans to write ruby. In thge context of someone who is coding for fun and not using rails, is this reasonable?
<tommylommykins> Or is there anything that is better/more-up-to-date/possibly-more-preferable-for-me?
<subtle_newbie> nope
<subtle_newbie> use vim, luke
<subtle_newbie> pure fun
<atmosx> yeah
<atmosx> I use textmate for fun
<atmosx> and I don't use rails
deryl joined #ruby
vovik joined #ruby
<vovik> does anyone know the difference between # coding: … and # encoding: … ?
<atmosx> vovik: so, there IS a difference?
<Mon_Ouie> None, Ruby just supports more than one format to specify the encoding
<atmosx> I put the # encoding: UTF-8 line to all my scripts
<vovik> so both are used to set the source encoding, right?
<subtle_newbie> atmosx: you pretty
<subtle_newbie> vovik: yes
<vovik> atmosx: that's what i'm asking is if there is a difference
<vovik> Mon_Ouie subtle_newbie thanks guys
<subtle_newbie> yw
albemuth joined #ruby
tvw joined #ruby
<tommylommykins> ooh
<tommylommykins> also, what's the best way to get hold of offline documentation?
tatsuya_o joined #ruby
* tommylommykins is currently paying £5 per day for internets D:
<subtle_newbie> ri
<subtle_newbie> tommylommykins: ^
<Adman65> hmm
<Adman65> i figure I'll just writ the damn thing over again instead of trying to refactor it :/
<subtle_newbie> its sad
<atmosx> subtle_newbie: I like women.
<atmosx> hahaha
<subtle_newbie> me too, also i like people that make their soft with utf8 default encoding
crankycoder joined #ruby
IrishGringo joined #ruby
<atmosx> good night ppl
<subtle_newbie> gn
<atmosx> subtle_newbie: I use Greek chars :-P so it's kind of a must in a UTF-8 environment
<atmosx> heheh anyway
<atmosx> good nighht
milkpost_ joined #ruby
emmanuelux joined #ruby
Axilla joined #ruby
_kinderman_ joined #ruby