<aces23up>
can any one help me with the enumberable min_by?
<cirwin>
aces23up: first do a select, then a min_by
<cirwin>
it's better to be explicit than clever :)
<prateekp>
Spaceghostc2c: what is Arr Vee Emm
<Spaceghostc2c>
Say it aloud.
<prateekp>
ok
<aces23up>
cirwin yes lol..
<prateekp>
RVM
gmci has quit [Read error: Operation timed out]
<aces23up>
clever gets me into trouble.
fbernier has quit [Ping timeout: 240 seconds]
macmartine has joined #ruby
<aces23up>
would select be slower if for instance the array was really big than combining them somehow?
<aces23up>
I also need this to be somewhat fast.
<prateekp>
Spaceghostc2c: So by doing $ rvm get latest would the latest ruby be installed
<bnagy>
you could look at sorting
<Spaceghostc2c>
prateekp: Read the documentation on installing and prerequisites.
<prateekp>
yeah the prereq is ruby and others
<aces23up>
cirwin ok one other question, if i do a select and it returns nil, and I chain that to a min_by is there a better way to remove errors other than enclosing it in a begin/rescue?
dross has quit [Ping timeout: 245 seconds]
<unixabg>
Spaceghostc2c: yes I will move, but it is hard to change when things are working well.
<prateekp>
but which ruby should i use
<Spaceghostc2c>
1.9.3
<aces23up>
or should I have 2 lines, instead of chaining?
<Spaceghostc2c>
Or Jruby. :D
<prateekp>
but my main aim is to install the latest version
<Spaceghostc2c>
aces23up: You tell me.
<prateekp>
how to install ruby1.9.3
<Spaceghostc2c>
prateekp: 1.9.3 is the latest C ruby that isn't Rubinius. Jruby is my favorite.
<Spaceghostc2c>
prateekp: rvm.io
<cirwin>
aces23up: select won't return nil
<cirwin>
detect might
<cirwin>
but select always returns an array
<aces23up>
cirwin ok.
<prateekp>
rvm.io?
hemanth has quit [Read error: Connection reset by peer]
alta has quit [Ping timeout: 245 seconds]
hemanth has joined #ruby
<aces23up>
cirwin really? crap.. I might have some logic jacked..
<aces23up>
I have been assuming it returns nil on no find.
<cirwin>
select?
<aces23up>
yes select / find_all I use the later
<cirwin>
nah, select will return the empty array
<cirwin>
detect will return the first item, or nil if there weren't any
<aces23up>
hrmm.
<aces23up>
ok.
<aces23up>
crap
<bnagy>
which is what you want
<aces23up>
yes
<bnagy>
cause you want to chain select to sort
<aces23up>
for this instance.
<bnagy>
well it's almost always what you want :)
<aces23up>
but for some other logic I had in my head it returns nil.
<aces23up>
yeh, I was just using it wrong.
<bnagy>
I would use reject in this case
<bnagy>
cause positive logic is usually easier to read
<bnagy>
ary.reject {|e| too many fails}.min_by { whatever }
<aces23up>
is mosltly how I code.. i don't like using unless statements.
<bnagy>
unless is fine
<bnagy>
if good > unless bad > if !good
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
<bnagy>
in your pastie, I wouldn't normally do it like that
<bnagy>
return if condition means 'nothing to do' not 'something bad happened'
<bnagy>
like in a sort method you could return str if str.empty?
krz has joined #ruby
codefyre_ has joined #ruby
<epochwolf>
I am forking a gem and I need to get rid of jeweler. I need an alternative way to make a gem. Could someone link me to an up to date tutorial or screencast?
<bnagy>
but if the thing doesn't have Comparable then you'd want to raise
hunglin has quit [Quit: Leaving.]
codefyre has quit [Ping timeout: 255 seconds]
codefyre_ has quit [Client Quit]
rakm has quit [Ping timeout: 272 seconds]
Eldariof-ru has joined #ruby
<Paradox>
epochwolf, bundler is quite nice
<Paradox>
uh
<Paradox>
hold on
Sheehan has quit [Quit: Sheehan]
rakm has joined #ruby
tonini has joined #ruby
h4mz1d has quit [Ping timeout: 272 seconds]
<Paradox>
epochwolf, hold on, let me find a tutorial
<Paradox>
RubyPanther, thats essentially how bundler's gem create works
<Paradox>
it just creates a few rake tasks that help
<RubyPanther>
Just write a gemspec and use rubygems as the gem tool, it is easy you don't need an extra weird tool like jeweler
<Paradox>
bundle gem
<Paradox>
use bundle gem to create a new gem
savage- has quit [Remote host closed the connection]
<Paradox>
then you can do rake install to build and install the local version
<Paradox>
and rake publish to push it and tag a git commit
<cirwin>
why is that a feature of bundler :/
krusty_ar has quit [Ping timeout: 248 seconds]
<Paradox>
idk but its in there
* cirwin
thinks bundler needs taking down a notch or two
<RubyPanther>
"Using tools that are built into Ruby and Rubygems creates a more streamlined, conventional experience for all involved. Instead of trying to figure out what command to run to create a gem, expect to be able to run gem build mygem.gemspec"
<derick_skibotn>
I built Ruby 1.9.2-p320 from source on fedora 16, installed in /usr/local, but there's no /usr/local/lib/ruby/.../include with ruby.h and other header files. How do I install it so RbConfig knows about the include dir?
Eldariof-ru has quit []
lkba has quit [Ping timeout: 248 seconds]
itnomad has quit [Ping timeout: 252 seconds]
macmartine has quit [Quit: macmartine]
ananthakumaran has quit [Quit: Leaving.]
Chryson has quit [Quit: Leaving]
macmartine has joined #ruby
dross has joined #ruby
tyman has quit [Remote host closed the connection]
tyman has joined #ruby
mikepack has quit [Remote host closed the connection]
schovi has quit [Remote host closed the connection]
ziggles has quit [Remote host closed the connection]
derick_skibotn has quit [Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.0.11/2009060313]]
eywu has quit [Quit: Leaving.]
werdnativ has joined #ruby
cirwin has quit [Ping timeout: 260 seconds]
mnaser has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
CheeToS has joined #ruby
fantazo has joined #ruby
skinny_much has joined #ruby
macmartine has quit [Quit: macmartine]
wookiehangover has quit [Quit: i'm out]
ViperMaul has quit [Ping timeout: 260 seconds]
wookiehangover has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
Seventoes has quit [Ping timeout: 245 seconds]
hemanth has joined #ruby
Seventoes has joined #ruby
delinquentme has quit [Quit: Leaving]
boobah has joined #ruby
zigidias_ has quit [Remote host closed the connection]
srid has joined #ruby
Nisstyre has joined #ruby
eywu has joined #ruby
eywu has quit [Client Quit]
ryan0x2 has quit [Remote host closed the connection]
brianpWins has quit [Remote host closed the connection]
<prateekp>
how ro run rvm
<prateekp>
i have installed it but now how to run it
<Cork>
did you run the initialize script?
<prateekp>
what is it
BeLucid has quit [Ping timeout: 245 seconds]
<prateekp>
i have done $ curl -L https://get.rvm.io | bash -s stable --ruby
<Cork>
it should output the command on the screen after installation
macmartine has joined #ruby
<prateekp>
run 'source blah blah'
<prateekp>
can u tell me
bier_ has joined #ruby
<Cork>
you need to import the rvm script into your shell
<Cork>
alternatively you could logout and in again
<prateekp>
how do i do that
bier has quit [Ping timeout: 265 seconds]
ananthakumaran has joined #ruby
<Cork>
with the source command, or just normally
<prateekp>
logout from computer and then come back again ?
<Cork>
that should work too yes
<prateekp>
yes it worked
macmartine has quit [Client Quit]
<prateekp>
now can i install the latest ruby with rvm
andreime has quit [Quit: Konversation terminated!]
<Cork>
rvm install 1.9.2
<Cork>
opps 1.9.3 apparently :)
burgestrand has joined #ruby
<bnagy>
latest stable is 1.9.3p194
Niamkik has joined #ruby
vectorshelve has joined #ruby
jgrevich_ has joined #ruby
jgrevich has quit [Read error: Connection reset by peer]
jgrevich_ is now known as jgrevich
abstrusenick has joined #ruby
vladiim has quit [Quit: vladiim]
nipra has joined #ruby
Helius has joined #ruby
csprite has quit [Quit: ChatZilla 0.9.88.2 [Firefox 12.0/20120420145725]]
mockra has quit [Remote host closed the connection]
Tricks has quit [Quit: No Ping reply in 180 seconds.]
Tricks has joined #ruby
savage- has joined #ruby
Ontolog has quit [Remote host closed the connection]
vladiim has joined #ruby
Ontolog has joined #ruby
Sheehan has joined #ruby
und has joined #ruby
und has left #ruby [#ruby]
nipra has quit [Ping timeout: 252 seconds]
d3vic3 has quit [Ping timeout: 264 seconds]
Helius has quit [Remote host closed the connection]
d3vic3 has joined #ruby
Ontolog has quit [Ping timeout: 246 seconds]
digitalcakestudi has quit [Ping timeout: 245 seconds]
austinbv has joined #ruby
nai has quit [Remote host closed the connection]
jgrevich has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
Sheehan has quit [Quit: Sheehan]
becom33 has quit [Ping timeout: 250 seconds]
mockra has joined #ruby
zz_chrismcg is now known as chrismcg
chrismcg is now known as zz_chrismcg
samuel02 has joined #ruby
jgrevich has joined #ruby
nachtwandler has joined #ruby
vitor-br has quit [Quit: Saindo]
nipra has joined #ruby
cirwim has joined #ruby
austinbv has quit [Ping timeout: 250 seconds]
banisterfiend has quit [Remote host closed the connection]
savage- has quit [Remote host closed the connection]
musee has joined #ruby
godzirra has joined #ruby
josefig has quit [Quit: Computer has gone to sleep.]
quest88 has joined #ruby
nipra has quit [Remote host closed the connection]
Ethan has quit [Quit: *poof*]
ceradon has quit [Ping timeout: 245 seconds]
Ethan has joined #ruby
becom33 has joined #ruby
Ethan has left #ruby [#ruby]
Ethan has joined #ruby
ceradon has joined #ruby
robert__ has joined #ruby
djdb has joined #ruby
fantazo has quit [Ping timeout: 272 seconds]
banisterfiend has joined #ruby
shadoi has quit [Quit: Leaving.]
vladiim has quit [Quit: vladiim]
mnaser has quit [Quit: Computer has gone to sleep.]
robert__ has quit [Ping timeout: 265 seconds]
BeLucid has joined #ruby
mayankkohaley has quit [Ping timeout: 240 seconds]
quest88 has quit [Quit: quest88]
vladiim has joined #ruby
EzeQL has quit [Ping timeout: 250 seconds]
mayankkohaley has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
williamcotton has quit [Quit: williamcotton]
ringotwo has quit [Remote host closed the connection]
senny has joined #ruby
Progster has joined #ruby
schovi has joined #ruby
workmad3 has joined #ruby
maesbn has joined #ruby
dekroning has joined #ruby
SpinningWheels has quit [Ping timeout: 260 seconds]
EzeQL has joined #ruby
kkiero has quit [Read error: Operation timed out]
benjaminsull_ has joined #ruby
<benjaminsull_>
hi
dekroning has quit [Ping timeout: 255 seconds]
SpinningWheels has joined #ruby
austinbv has joined #ruby
burgestrand has quit [Quit: Leaving.]
becom33 has quit [Quit: Leaving]
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
Morkel has joined #ruby
<prateekp>
i have intalled gem but it shows error on typing any command
<Paradox>
generally, on virgin systems that dont have ruby
<prateekp>
bnagy - what i neeed to install
<Paradox>
use a package manager to install ruby
<Paradox>
then uninstall that version and use rvm to install it
<bnagy>
prateekp: I am not 'the internet'
<Paradox>
that way you get deps and a modern version of ruby
vladiim has quit [Quit: vladiim]
mockra has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
francisfish has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
moosya has quit [Ping timeout: 260 seconds]
jprovazn_away is now known as jprovazn
vladiim has joined #ruby
<vectorshelve>
is it fine if I use selenium to generate rspec test cases.. or is it better to write everything own my own ? It would be pretty much the same thing ryt ?
prometheus has quit [Ping timeout: 272 seconds]
<cirwim>
vectorshelve: can selenium write tests for you?
davidcelis has joined #ruby
<vectorshelve>
In selenium once I record actions I can export it as rspec and unit test cases and all.. so it would pretty much be the same thing ryt ? I mean an rspec for that particular action /
thecreators has joined #ruby
<cirwim>
vectorshelve: oh cool
<cirwim>
just be careful
<cirwim>
because it will generate tests that refer to specific xpaths
<cirwim>
it might not be very semantic
<cirwim>
so it will be fragile
<vectorshelve>
cirwim: but I am more worried about whether this is the right way since I am lazy to sit and write downs stuffs.. this would be easier.. but this would have a front end based approach...
seoaqua has quit [Quit: Leaving]
<cirwim>
vectorshelve: well, selenium tests are *slow*
<cirwim>
and not very thorough
<cirwim>
it's good to have a few to check that the app basically works
<vectorshelve>
cirwim: yeah.... wished If there were some automated tools to write test cases. :( I cant sit down and write test cases.. :-X
<cirwim>
:)
<vectorshelve>
hemanth: hai bhai
<cirwim>
vectorshelve: I find it quite theraputic in a way
<cirwim>
though I used to hate it
nachtwandler has quit [Quit: leaving]
<vectorshelve>
cirwim: but I have tried out the exported rspec unit test cases and functional test cases.. via @selenium they are good.. within their limitations
sspiff has joined #ruby
sspiff has quit [Changing host]
sspiff has joined #ruby
<hemanth>
vectorshelve, hey
<cirwim>
vectorshelve: cool
<vectorshelve>
cirwim: why theraputic ?
<cirwim>
are you using the selenium recorder thing?
<cirwim>
vectorshelve: I normally write tests after the hard design work is done
<cirwim>
so it's just a relaxing typing excersize
jgrevich has quit [Quit: jgrevich]
<vectorshelve>
hemanth: any solutions for my above query since u develop testing frameworks urself :)
<hemanth>
?
<vectorshelve>
hemanth: any tools to generate automated test cases.. rspec
<joni>
how can i order through association ie. has_many :foos, :through => :bar, :order => "barname"
<joni>
^ does not work, neither does :order => "foos.barname"
<vectorshelve>
cirwim: I have an app its running.. its for that I need to create test cases now..then refactor the code... all purpose of making the app more robust and bug free
<hemanth>
vectorshelve, many would lose their jobs if you do that ;) but their must be a gem ...
<joni>
actually example is confusing, lets try better
<banisterfiend>
hemanth: do you have any c extension jews?
<banisterfiend>
hemanth: gems*
<joni>
how can i order through association ie. has_many :foos, :through => :bar, :order => "fooname"
<hemanth>
banisterfiend, nope
<vectorshelve>
hemanth: but I have tried selenium I record actions then export them as rspec but its not that good..its all xpath based
<banisterfiend>
hemanth: noob
<hemanth>
planning to make one!
<hemanth>
:D
<banisterfiend>
:P jk
dekroning has joined #ruby
<joni>
or :order => "foos.fooname", does not work on rails 2
<hemanth>
ya accept that
<cirwim>
vectorshelve: could you write one and send it to me pls
<vectorshelve>
cirwim: which one ?
<cirwim>
a tool to autogenerate tests :)
<cirwim>
I think haskell have something
<hemanth>
banisterfiend, any suggestions of C extensions gem?
<banisterfiend>
hemanth: nah im just looking for c extensions to test
<vectorshelve>
cirwim: but it isnt something impossible... fund me to start a company I will get it done with some cool developers and sell it to clients.. we will share the profit too what say /
<hemanth>
banisterfiend, meh
TPFC-SYSTEM has joined #ruby
<Hanmac>
hemanth did you pick an interesting lib?
<cirwim>
vectorshelve: sounds great
<hemanth>
Hanmac, libcurl
<vectorshelve>
cirwim: :)
<cirwim>
will £3.40 be enough?
<vectorshelve>
hemanth: which is the mostly used development language in linux ?
QaDeS has joined #ruby
<hemanth>
Hanmac, wget's lib?
<hemanth>
vectorshelve, :)
<vectorshelve>
cirwim: yeah
alup has joined #ruby
<vectorshelve>
hemanth: whats with that smile ?
<Hanmac>
isnt there allready an curl gem?
<cirwim>
typhoueuesueses uses cur
<vectorshelve>
Hanmac: curious to know if anyone contributed to linux with ruby.. :) these days
thecreators has quit [Remote host closed the connection]
rodasc has joined #ruby
crodas has quit [Write error: Broken pipe]
denysonique has quit [Excess Flood]
shevy has quit [Ping timeout: 327 seconds]
<cirwim>
vectorshelve: I doubt they'd put ruby in the kernel :)
<banisterfiend>
Hanmac: if i buy u a red miniskirt with a crowbar on it will u become the official pry cheerleader
iamlacroix has joined #ruby
SpinningWheels has quit [Quit: Leaving.]
yxhvuud has joined #ruby
<hemanth>
lol
Eldariof-ru has joined #ruby
Natch_z has joined #ruby
Aaton_off has quit [Write error: Broken pipe]
matled has quit [Write error: Broken pipe]
kalleth_ has quit [Write error: Broken pipe]
yxhuvud has quit [Write error: Broken pipe]
matled- is now known as matled
Natch has quit [Remote host closed the connection]
danheberden has quit [Quit: oh noes]
Natch_z is now known as Natch
nilg has joined #ruby
Gavilan has joined #ruby
fgwaegeawgfwa has quit [Remote host closed the connection]
kalleth_ has joined #ruby
danheberden has joined #ruby
<vectorshelve>
banisterfiend: epic
bosphorus has joined #ruby
Aaton has joined #ruby
heftig has quit [Quit: leaving]
<sepp2k>
cirwim: I know you were kidding, but for my sanity's sake: You can't just tell grub to run pry. Grub can't run ruby files (or ELF binaries for that matter).
tyman has quit [Quit: tyman]
piotr_ has joined #ruby
AlbireoX`Laptop has quit [Remote host closed the connection]
andrewhl has quit [Remote host closed the connection]
<banisterfiend>
cirwim: u just got TOLD
cherrypeel has joined #ruby
<cirwim>
damn
<politoed>
bam
manizzle has joined #ruby
fgwaegeawgfwa has joined #ruby
dekroning has quit [Read error: Connection reset by peer]
hoelzro|away is now known as hoelzro
<Cork>
is there a way to do something similar to c switch fall-through in ruby?
Tryke_ has joined #ruby
pureluck_ has joined #ruby
t4lk3r_ has joined #ruby
caveat-_ has joined #ruby
kalleth_1 has joined #ruby
dasuchin_ has joined #ruby
nimred_ has joined #ruby
bnagy_ has joined #ruby
wereHams1er has joined #ruby
elspeth has joined #ruby
zaiste_ has joined #ruby
libertyp1ime has joined #ruby
mxweas_ has joined #ruby
igotnolegs has quit [Quit: Computer has gone to sleep.]
sleetdrop has joined #ruby
<Hanmac>
Cork: you mean: case 1;case 2; case 3; ...code ... ; case 4 ...?
<banisterfiend>
Cork: Yeah
<banisterfiend>
Cork: one sec
apeiros_ has joined #ruby
<Cork>
well actually case 1: first code; case 2: additional code; break; case 3: other code
<Cork>
banisterfiend: ended using a two dimensional array instead and flatten
vlad_starkov has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
arturaz has joined #ruby
darthdeus has joined #ruby
Progster has quit [Ping timeout: 272 seconds]
ipoval has quit [Quit: ipoval]
dhodgkin has joined #ruby
cherrypeel has quit [Quit: Leaving]
jesly has joined #ruby
Khyron320 has joined #ruby
brianpWins has joined #ruby
Doc_X has joined #ruby
Siphonblast has joined #ruby
wvms has joined #ruby
thedonvaughn has joined #ruby
francisfish has joined #ruby
Spaceghostc2c has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
swistak35 has quit [Ping timeout: 260 seconds]
iori has joined #ruby
henn1nk has joined #ruby
Tasser has joined #ruby
jarednorman has joined #ruby
Koshian has joined #ruby
marienz has joined #ruby
heftig has joined #ruby
Stefunel has joined #ruby
srid has joined #ruby
srid has quit [Changing host]
srid has joined #ruby
srid has joined #ruby
dkannan has joined #ruby
<Stefunel>
what's the best way of running a bash command from a ruby script? I see there is exec, system, %x[]
perryh_away is now known as perryh
perryh is now known as perryh_away
<bnagy>
there are about a million ways
dhodgkin has quit [Ping timeout: 255 seconds]
jesly has quit [Ping timeout: 272 seconds]
<bnagy>
mainly it depends on what you want to do with your io and result codes etc
<bnagy>
I don't think there's a single 'best' way
timonv has joined #ruby
blacktulip has joined #ruby
<Stefunel>
the basch scripts outputs a line and that is the result I want and preferably do a x = result_of_bash_command
gilead has joined #ruby
<bnagy>
probably any of the ones you just mentioned then
Criztian has joined #ruby
gilead has quit [Client Quit]
gilead_ has joined #ruby
nai_ has quit [Read error: Connection reset by peer]
nai has joined #ruby
<Paradox>
i like ` `
<Paradox>
but the others work just as well
jesly has joined #ruby
gilead_ has quit [Client Quit]
lectrick has joined #ruby
marienz has quit [Ping timeout: 600 seconds]
abstrusenick has quit [Quit: abstrusenick]
marienz has joined #ruby
<Stefunel>
thanks
jamesaxl has joined #ruby
workmad3 has joined #ruby
tatsuya_o has joined #ruby
berserkr has joined #ruby
benjaminsull_ has quit [Ping timeout: 245 seconds]
rakunHo has quit [Read error: Connection reset by peer]
iocor has joined #ruby
jesly has quit [Ping timeout: 265 seconds]
atmosx has quit [Ping timeout: 276 seconds]
execute is now known as _axx
atmosx has joined #ruby
tayy has joined #ruby
virunga has joined #ruby
akem has quit [Ping timeout: 248 seconds]
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
freeayu has quit [Quit: 离开]
qwerxy has joined #ruby
tayy has quit [Ping timeout: 264 seconds]
ryanf has quit [Quit: leaving]
hemanth has quit [Read error: Connection reset by peer]
raposa has joined #ruby
<Stefunel>
how would I check if an object is of a certain class? I need to check if an object is a hash or an array, but doing object.class == "Hash" doesn't seem to work as expected
dhodgkin has joined #ruby
superbaloo has left #ruby ["WeeChat 0.3.6-dev"]
<Mon_Ouie>
That's because you're comparing a Class with a String
<Mon_Ouie>
Use Object#is_a?
hemanth has joined #ruby
<Stefunel>
ah
<bnagy>
but it's usually a bad code smell
<bnagy>
google "duck typing"
<Mon_Ouie>
Yeah, prefer duck typing when possible
raposa has left #ruby [#ruby]
monkegjinni has joined #ruby
seoaqua has joined #ruby
tayy has joined #ruby
<Jackneill>
http://codepad.org/tRGVFQIf can you help me? i having trouble with threads. i got nothing for puts :/
charliesome has joined #ruby
prtksxna has joined #ruby
<bnagy>
did you check and see if there's an exception?
<bnagy>
also you might want to look into join
davidw has joined #ruby
<bnagy>
once you've created your threads [t1,t2,t3].map(&:join)
iori has quit [*.net *.split]
Tasser has quit [*.net *.split]
jarednorman has quit [*.net *.split]
Koshian has quit [*.net *.split]
henn1nk has quit [*.net *.split]
jarednorman has joined #ruby
henn1nk has joined #ruby
Koshian has joined #ruby
krz has quit [Read error: Connection timed out]
iori has joined #ruby
sgronblom has joined #ruby
Tasser has joined #ruby
<sgronblom>
I'm trying to figure out when and what changes my Rails view_paths for ActionMailer::Base. Is there some sort of simple AOP-style approach I can use to find out?
<bnagy>
try #rubyonrails
<sgronblom>
It's not really a Rails question
<sgronblom>
That's just a bit of context to make it easier to understand why I ask the question.
<Paradox>
you could use pry and its plugins to step through your program
<sgronblom>
But then I could just use the debugger
<bnagy>
well I have NFI what view_paths, ActionMailer or AOP are, so it looks like a rails question to me
<sgronblom>
bnagy: Ok, I'll get rid of the Rails stuff. How can I find out when/what updates and array in a program?
<sgronblom>
an array
<bnagy>
with a debugger?
t4lk3r_ has quit [Ping timeout: 264 seconds]
<sgronblom>
If there wer some simple before/after_line_executed callbacks it would be easy.
<bnagy>
assuming it could be changed by any of a billion things
<sgronblom>
Yeah but then I have to do it manually right?
<sgronblom>
As far as I know ruby's debugger doesn't support breakpoints for when an expression changes.
<bnagy>
it doesn't have watchpoints??
t4lk3r has joined #ruby
<sgronblom>
Does it?
tayy has quit [Remote host closed the connection]
<bnagy>
if you know what kind of change you could make a sneaky class that overloads things like push with log caller[1], arg; super
<bnagy>
but that's a bit awful
<bnagy>
you could do the whole lot with a BasicObject and method_missing
<sgronblom>
Yeah but I don't know if it gets updated by using push
<bnagy>
assuming you know where the array is created so you can swap in the new obj
<sgronblom>
The whole array could be reassigned or maybe it would concatenate or anything
<banisterfiend>
bnagy: can u tell me some gems that you use that use c exts
peerAU has quit [Ping timeout: 272 seconds]
<bnagy>
not many, anymore
<sgronblom>
So I would have to put in a log statement in all methods
<bnagy>
sgronblom: read the bit about method_missing
eighty4_ is now known as eighty4
eighty4 has quit [Changing host]
eighty4 has joined #ruby
apok has joined #ruby
cheekymonk3y has joined #ruby
<sgronblom>
hmm, well the debugger does have conditional breakpoints
<sgronblom>
hmm that would actually be good enough i think
<bnagy>
in my debugger lexicon you'd want watchpoints
<bnagy>
cause you're watching a bit of memory
<bnagy>
but I have never even looked at the ruby debugger
cheekymonk3y has left #ruby [#ruby]
peerAU has joined #ruby
<sgronblom>
Well in this case I know what elements the array has in one of my checkouts and what it has in the other
<Paradox>
banisterfiend, i did a complete gem install
<Paradox>
reinstall
<Paradox>
hold on
niklasb has joined #ruby
<sgronblom>
so i can simply set a condition to stop when it has two elements
<Paradox>
let me dig up my logs from that
<Paradox>
i had a spattering of ones with native code
<sgronblom>
bnagy: thanks for helping me brainstorm though
rails has joined #ruby
<bnagy>
np
nari_ has quit [Ping timeout: 248 seconds]
<bnagy>
someone should sketch up that logging thing as a module... assuming they haven't already
<Paradox>
banisterfiend, damnit, i cleared my terminal window
<Paradox>
no dice
hemanth has quit [Read error: Connection reset by peer]
<bnagy>
I dunno if you can nom every method when you're extended though
hemanth has joined #ruby
werdnativ has quit [Quit: werdnativ]
<sgronblom>
this is so lame, condition needs me to specify a breakpoint
niklasb has quit [Ping timeout: 245 seconds]
<sgronblom>
bnagy: so this is usually known as watch in other debuggers?
<Paradox>
banisterfiend, this may not be what you're looking for, but here are gems that have extensions on my machine
<banisterfiend>
sgronblom: can't you monkeypatch the methods that peforms the change, and then issue 'up' to see teh caller?
niklasb has quit [Ping timeout: 252 seconds]
<sgronblom>
banisterfiend: view_paths extends Array so there are multiple methods that could change it
ephemerian has joined #ruby
<bnagy>
catphish leaves with a broken regex that will snap as soon as someone puts his term in (brackets) etc
rails has quit [Ping timeout: 248 seconds]
<sgronblom>
managed to get set_trace_func to work but it's very sensitive to errors
<sgronblom>
and it doesn't output what error it runs into
lewis1711 has joined #ruby
<sgronblom>
So I have to be really careful about trying to get the value of ActionMailer::Base.view_paths
<Jackneill>
bnagy: are you hungarian?
lewis1711 has left #ruby [#ruby]
<sgronblom>
Module.const_defined? doesn't seem to work inside of it...
mohits has quit [Read error: No route to host]
<banisterfiend>
sgronblom: interesting what does it say
<bnagy>
Jackneill: no, Tanzanian, why?
<Jackneill>
just your name sounds like very hungarian, sorry :)
<sgronblom>
ah, it seems like the 1.8 version of const_defined wants me to lookup by string
<Jackneill>
cause i am hungarian
jimeh has joined #ruby
<cjs>
Not only that, his name is even in Hungarian notation if you re-capitalize it as bNagy. :-)
<banisterfiend>
Jackneill: his first name is Atilla
<bnagy>
my dad is hungarian. I'm not really tanzanian, tbh
<bnagy>
actually Bela is a pretty cliche hungarian name
peerAU has quit [Quit: I thought what I'd do was, I'd pretend I was one of those deaf-mutes.]
<Jackneill>
yep
<bnagy>
not that it's mine
<bnagy>
but it starts with b
<bnagy>
cjs: true
<bnagy>
HAHAHAHAHAH hungarian notation joke
<bnagy>
...ok I'll get my coat
<banisterfiend>
bnagy: i found it funny nags
<banisterfiend>
im still chuckling to myself
<bnagy>
DON'T YOU PATRONISE ME!
* bnagy
bursts into tears
<Jackneill>
nagy means in hungarian: big
<banisterfiend>
Jackneill: is atilla a popular name
<sgronblom>
So how do you check if a module is defined?
AllanMacGregor has joined #ruby
<seoaqua>
could someone help me with Rspec?
AllanMacGregor has quit [Read error: Connection reset by peer]
<Jackneill>
banisterfiend, yes, pretty much
<bnagy>
defined? Modname?
AllanMacGregor has joined #ruby
<bnagy>
without the second ? pbviously
<sgronblom>
ah defined? is an operator?
<sgronblom>
why not just a Kernel method?
emmanuelux has joined #ruby
<bnagy>
dunno, offhand, check the docs or the banisterfiend
<hoelzro>
sgronblom: because defined? needs to not actually evaluate its argument to work properly
dr0p has joined #ruby
RainbowD_ has joined #ruby
<banisterfiend>
sgronblom: it's not a method
rails has joined #ruby
<banisterfiend>
sgronblom: because it looks up the name in the current scope, it's more powerful than a method
niklasb has joined #ruby
<sgronblom>
Ah it works like that
<banisterfiend>
sgronblom: defined? my_method
<banisterfiend>
rather than defined? :my_method
<banisterfiend>
Yeah
piotr has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
piotr_ has quit [Ping timeout: 264 seconds]
Sgeo has joined #ruby
<sgronblom>
ah this is really tricky to do
<sgronblom>
method_defined? doesn't seem to work
<sgronblom>
if ActionMailer::Base.method_defined?(:view_paths) gives me a const_missing
niklasb has quit [Ping timeout: 244 seconds]
Sgeo has left #ruby [#ruby]
rouss has joined #ruby
cousine has joined #ruby
<sgronblom>
yes
<sgronblom>
works
<sgronblom>
i was defining it in the wrong place
<ichilton>
Why would rspec be filtering a test out?
ramblex has joined #ruby
<Jackneill>
http://codepad.org/peFNqRDJ can you help me? i got: tabornok.rb:46:in `<main>': undefined method `connect' for #<Tabornok:0x9312a50 @logger=#<Logger:0x9312a3c>> (NoMethodError)
nilg has quit [Read error: Operation timed out]
cjs has quit [Read error: Operation timed out]
nilg has joined #ruby
omry has joined #ruby
freeayu has joined #ruby
skinny_much has quit [Quit: Leaving...]
<bnagy>
Jackneill: which isn't surprising since it doesn't have a connect method
<sgronblom>
your class Tabornok doesn't have amethod called connect
<ij>
apeiros_: Failed, hoped maybe I'm doing it wrong.
<ij>
Tasser: :-) can't
<Tasser>
ij, talk to the officials about speed, just in case ;-)
<ij>
The officials do not have time right now to rewrite.
<ij>
meaning port
<Tasser>
ij, to answer your question, why not simply try it? a simple irb snippet should do it
<ij>
13:01:01 ij | apeiros_: Failed, hoped maybe I'm doing it wrong.
<Hanmac>
Tasser : i am a fefe reader too :D
<Hanmac>
i will read it until my coverment blocks the site
<kapowaz>
anyone here used Sprockets in a Sinatra project? I'm trying to work out how you can (at least temporarily) disable it in development mode, so that page requests take less than a year each.
hemanth has quit [Read error: Connection reset by peer]
<Tasser>
kapowaz, don't load it?
hemanth has joined #ruby
Spooner has joined #ruby
d3vic3 has quit [Quit: leaving]
nai has quit [Remote host closed the connection]
<kapowaz>
that's not exactly a solution
<kapowaz>
if I'm using it to parse LESS files, I can't just *remove* it
<kapowaz>
I need to fall back to static, generated versions if I'm to disable it.
<kapowaz>
there must be some way of doing this (I'm sure it exists if you're using it in Rails) but I haven't any idea how you do it when you're using it ad-hoc (i.e. with Sinatra)
<ij>
I saw you can make a class, that you assign to a variable name or some weird shenanigans like that. Can you do that with modules?
boo1 has joined #ruby
umttumt has quit [Remote host closed the connection]
<sepp2k>
ij: Yes.
<ij>
How?
<Tasser>
ij, foo = Module
<ij>
Ooh, hmm. But that class was also anonymous, I think.
<sepp2k>
my_module = Module.new or my_module = MyExistingModule
<sepp2k>
Depending on what you mean.
<boo1>
Could someone explain me, what is a major difference between 'rails -v' and 'bundle exec rails -v', considering that rails is installed in current rvm gemset?
<boo1>
gem list rails -> rails (3.0.7)
<boo1>
bundle show rails -> /home/boo1ean/.rvm/gems/ruby-1.9.2-p180@someset/gems/rails-3.0.7
<boo1>
which rails -> /home/boo1ean/.rvm/gems/ruby-1.9.2-p180@someset/bin/rails
<sepp2k>
Note that when you do, class Foo ... end or module Foo ... end you're already creating a class/module and assigning it to a variable. Just with the restriction that the variable has to be a constant in that case - not a local variable.
bitsar2 has quit [Ping timeout: 260 seconds]
<sepp2k>
ij: Yes, if you want it to be anonymous, you want Module.new
niklasb has quit [Ping timeout: 265 seconds]
ringotwo has joined #ruby
malkomalko has joined #ruby
ringotwo has quit [Remote host closed the connection]
umttumt has joined #ruby
rails has quit [Changing host]
rails has joined #ruby
sejo has joined #ruby
ringotwo has joined #ruby
Shahor has joined #ruby
Shahor has quit [Client Quit]
prateekp has quit [Ping timeout: 252 seconds]
kaB00M has joined #ruby
kpshek has joined #ruby
ringotwo has quit [Remote host closed the connection]
<Hanmac>
kaB00M; i used them, whats your question?
<kaB00M>
Do you like the new version?
ringotwo has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
liluo has joined #ruby
kaB00M has left #ruby [#ruby]
samuel02 has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
Asher has quit [Ping timeout: 240 seconds]
bluenemo has joined #ruby
sleetdro_ has joined #ruby
Asher has joined #ruby
<ij>
Where in the hell is the parser in redcloth gem?
sleetdro_ has quit [Remote host closed the connection]
sleetdrop has quit [Read error: Connection reset by peer]
sleetdrop has joined #ruby
<Tasser>
ij, c exteions?
bluenemo has quit [Read error: Operation timed out]
iocor has quit [Quit: Computer has gone to sleep.]
<ij>
Yes. Fuck.
<ij>
Oh, god. :[
<atmosx>
what?
Niamkik has quit [Quit: leaving]
<umttumt>
:[
mwilson_ has quit [Excess Flood]
mdaisuke has quit [Remote host closed the connection]
<ij>
atmosx: code
mwilson_ has joined #ruby
mwilson_ has quit [Excess Flood]
<atmosx>
thought you called
<atmosx>
k
mwilson_ has joined #ruby
SqREL has quit [Quit: Leaving]
Lachryma has joined #ruby
<ij>
Oh, haha.
prtksxna_ has joined #ruby
prtksxna has quit [Read error: Connection reset by peer]
SqREL has joined #ruby
mayankkohaley_ has joined #ruby
mayankkohaley has quit [Ping timeout: 272 seconds]
nirakara has joined #ruby
mayankkohaley_ is now known as mayankkohaley
niklasb has joined #ruby
<ij>
I need line-brakes(<br/>s only) in redcloth to become new paragraphs. Is there a sane way to do it?
Asher1 has joined #ruby
Niamkik has joined #ruby
b26 has joined #ruby
Asher has quit [Ping timeout: 272 seconds]
larissa has joined #ruby
iamlacroix has quit [Remote host closed the connection]
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
sleetdrop has quit []
mohits has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
BiHi has joined #ruby
bluenemo has joined #ruby
kill-9_ has joined #ruby
<Tasser>
ij, search n dest^Wreplace ?
Criztian has quit [Remote host closed the connection]
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
philips has quit [Excess Flood]
Progster has joined #ruby
fgwaegeawgfwa has left #ruby [#ruby]
philips has joined #ruby
umttumt has quit [Remote host closed the connection]
umttumt has joined #ruby
jesly has quit [Ping timeout: 248 seconds]
nanderoo has joined #ruby
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
kalleth_1 is now known as kalleth
mrmist_ is now known as mrmist
liluo has quit [Remote host closed the connection]
fearoffish has joined #ruby
gtuckerkellogg has joined #ruby
krusty_ar has joined #ruby
fbernier has joined #ruby
jrist-afk is now known as jrist
_br_ has quit [Excess Flood]
liluo has joined #ruby
timonv has quit [Remote host closed the connection]
frishi has quit [Quit: Leaving...]
_br_ has joined #ruby
ken_barber has joined #ruby
mvangala_home has joined #ruby
jxf has joined #ruby
prtksxna has joined #ruby
prtksxna_ has quit [Read error: Connection reset by peer]
canton7 has joined #ruby
jstew has joined #ruby
jcromartie has joined #ruby
mvangal__ has joined #ruby
ph^ has quit [Remote host closed the connection]
ph^ has joined #ruby
mengu has joined #ruby
iocor has joined #ruby
jgarvey has joined #ruby
mvangala_home has quit [Ping timeout: 272 seconds]
pk1001100011 has joined #ruby
eurek has joined #ruby
ph^ has quit [Ping timeout: 250 seconds]
crankycoder has joined #ruby
jesly has joined #ruby
timonv has joined #ruby
yugui_zzz is now known as yugui
bluOxigen has quit [Ping timeout: 244 seconds]
emmanuelux has quit [Quit: @+]
liluo has quit [Remote host closed the connection]
sailias has joined #ruby
<rking>
Hrm. I wonder why ~/.rbenv/bin/ doesn't have ruby, etc. (only rbenv and ruby-local-exec)
alindeman has quit [Ping timeout: 240 seconds]
jxpx777 has joined #ruby
<rking>
rbenv versions shows 1.9.3-p194, and it's selected.
tommyvyo_ has joined #ruby
cakehero has joined #ruby
<workmad3>
rking: is it .rbenv/bin or .rbenv/shims that has the binaries?
<rking>
workmad3: Ahh, you're right.
nanderoo has quit [Quit: Leaving.]
<cakehero>
For some reason I get an error saying that capistrano after I have installed it via gem, is there some checks I could do to figure out why?
<rking>
Yep, shims goes in $PATH, not bin.
<rking>
cakehero: I can't believe you the whole thing.
tk___ has joined #ruby
<cakehero>
Not sure I understand that sentence - maybe you are missing a word?
<rking>
Then you get my point. =)
<rking>
Reread your last.
<cakehero>
heh
<cakehero>
Indeed
<cakehero>
For some reason I get an error saying that capistrano isn't available after I have installed it via gem, is there some checks I could do to figure out why?
<rking>
cakehero: Probably it installed to a different ruby.
<cakehero>
so I left and re-entered that directory and it is switching to the right version
<cakehero>
b/c of the .rvmrc file
<rking>
Right, rvm.
<rking>
cakehero: My recommendation is to switch to rbenv and watch things magically get less painful.
<cakehero>
I tried installing as sudo and regular user
<cakehero>
aiyah
pu22l3r has joined #ruby
awarner has joined #ruby
<fbernier>
Any reason why json parsing does not default to symbolize_keys => true ?
dr_diamond has quit [Quit: Bye !]
<rking>
I'm going to give rvm2 a real look, but I'm completely done with rvm1. It's too complicated for what it does. rbenv is like, one change to $PATH (which I did the wrong one a few minutes ago, but that was the entirety of the debugging: figuring out what's wrong with that one change)
<hoelzro>
rking: I'm pretty new to Ruby; what are the chief benefits of rbenv over rvm?
adeponte has quit [Read error: Connection reset by peer]
<apeiros_>
fbernier: because that'd be a memory leak
adeponte has joined #ruby
<rking>
hoelzro: rvm's implementation monkeys with so many things about the shell environment. Everything gets wrapped in functions that do indirect things.
<cakehero>
rking would I be able to use rbenv while the rest of the team user rvm? I'm relatively new to ruby
atmosx has quit [Ping timeout: 276 seconds]
<rking>
cakehero: Oh, no, that'd be a bad idea.
<fbernier>
apeiros: ah, so symbolizing the keys requires more memory?
<rking>
cakehero: Then we can debug your rvm issue.
<apeiros_>
fbernier: no, the symbols require memory
<cakehero>
okay - and I can say to use rbenv on the next project =)
<cakehero>
heh
<apeiros_>
and a symbol is never gc'ed
EzeQL has quit [Ping timeout: 240 seconds]
<hoelzro>
fbernier: symbols never get GC'd
dsa has quit [Client Quit]
<fbernier>
oh
crankycoder has quit [Remote host closed the connection]
<rking>
cakehero: Basically the "gem" referred to when you said, "gem install capistrano" was not installing to the same path as when you later invoked it.
<hoelzro>
rking: what do you use to install rubies into rbenv?
<apeiros_>
you should *never* symbolize unvalidated userinput
<hoelzro>
because iirc, rbenv doesn't do that by itself
pu22l3r has quit [Remote host closed the connection]
EzeQL has joined #ruby
<rking>
hoelzro: ruby-build
<apeiros_>
you should also not symbolize any potentially infinitely varying data
<cakehero>
rking so what paths should I check? I see that it installed it for my app and for my version of ruby (basing that on the path I see it calls)
<fbernier>
apeiros_: makes sense, never thought about that ... thanks
pu22l3r has joined #ruby
jesly has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
geekbri has joined #ruby
<cakehero>
/Users/dkullmann/.rvm/gems/ruby-1.9.3-p125@mhealth/bin/cap <---- health === application, ruby version === correct.
Mon_Ouie has quit [Ping timeout: 260 seconds]
Mon_Ouie has joined #ruby
adeponte has quit [Read error: Connection reset by peer]
<rking>
cakehero: Oh, odd.
<cakehero>
So that file calls gem 'capistrano' version and load Gem.bin
<cakehero>
(that file isn't where the error is)
vectorshelve has quit [Quit: Page closed]
adeponte has joined #ruby
<cakehero>
it looks like that uses a site_ruby version
crankycoder has joined #ruby
<cakehero>
when it calls load
<rking>
cakehero: Maybe it's a gemset thing then.
jxf has quit [Ping timeout: 264 seconds]
jxf has joined #ruby
<cakehero>
<--- newb, can you elaborate?
<cakehero>
Should I be installing capistrano, specifically, with sudo?
<rking>
cakehero: OK, so the problem trying to be solved is gem versions
<cakehero>
I'm not sure what effect that has on RVM
adeponte has quit [Read error: Connection reset by peer]
<cakehero>
^--- ok - listing
<cakehero>
*listening
henn1nk has left #ruby ["WeeChat 0.3.6"]
adeponte has joined #ruby
<rking>
A given project has a specific set of dependencies. The chaotic way to do things is ad-hoc try to get them installed in the dev/staging/live envs all similarly.
<workmad3>
cakehero: if you're using rvm, don't install gems with sudo
withnale has joined #ruby
<cakehero>
workmad3 - ok, acknowledged
<rking>
But it gets really complicated when you try to simultaneously run several projects with several different gem requirements.
yfeldblum has quit [Ping timeout: 276 seconds]
<cakehero>
rking well there is a bundle that was installed initially, but capistrano wasn't part of it
<rking>
So rvm invented "gemsets". It's the thing after the "@" in your directory there, "mhealth"
<cakehero>
GEmfile?
<cakehero>
oh I see
<cakehero>
Right, this gem set is for my application
<rking>
Yeah, Gemfiles are the other (and better) way to solve the same problem.
nanderoo has joined #ruby
<rking>
That uses Bundler.
depy has joined #ruby
Targen has quit [Read error: Operation timed out]
plastics has joined #ruby
<cakehero>
So initially i used bundle install and all those gems installed properly
schickung has joined #ruby
<cakehero>
Then I installed capistrano separately and it' snot working
<cakehero>
I also installed vagrant separately
<cakehero>
which had, actually, the same problem and was resolved when I installed it from a package instead of a gem
<cakehero>
So maybe in the process of installing new gems I screwed up this gem set
<rking>
Keep in mind that both gemsets and Bundler are ♡ing you by trying to reduce $: to a minimum, so you don't accidentally have a gem inadvertently work in one place (like your dev env) then fail in your production env.
carloslopes has joined #ruby
<rking>
Yeah.
<rking>
Is the rest of the team using gemsets?
<cakehero>
I believe everyones using the same thing I am
<cakehero>
I followed their instructions to install, heh
<rking>
Ahh, could be a glitch.
<rking>
(In the install instructions)
<cakehero>
Or maybe I didn't execute them in the proper order
<cakehero>
Can I blow away this gem set and restart?
<rking>
Yep, totally.
<cakehero>
rm -rf (repo + .rvm file) ?
<rking>
That's a bit of a big hammer
<rking>
But sure.
<cakehero>
but i have to tell rvm to remove the gemset also?
<cakehero>
b/c it's like
<rking>
Oh wait, I was thinking you were referring to ~/.rvm
<cakehero>
in ~/.rvm somewhere
<Hanmac>
PS: when you do rm -rf PLEASE me carefull that your string is escaped
<rking>
Only removing the repo and its .rvm file is the little hammer. =)
<cakehero>
Is there a medium sized hammer?
<rking>
Yep.
<cakehero>
Maybe something with a leather grip
eurek has quit [Quit: Computer has gone to sleep.]
<rking>
I'm looking up how to nuke a gemset from within rvm now
RainbowDashh has quit [Quit: SLEEP MODE. <REDACTED SUBORBITAL QUOTE HERE>]
Niamkik has quit [Ping timeout: 248 seconds]
chson has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 244 seconds]
ceradon has quit [Ping timeout: 272 seconds]
<cakehero>
k
boo1 has left #ruby [#ruby]
dhruvasagar has joined #ruby
iamlacroix has quit [Ping timeout: 272 seconds]
awarner has quit [Remote host closed the connection]
tzvi has joined #ruby
Niamkik has joined #ruby
<cakehero>
And then bundle install rking ?
<rking>
Yes, the rking gem comes highly recommended.
<rking>
Oh, no, you were asking a different thing.
whuffor has quit [Ping timeout: 245 seconds]
<rking>
Yeah, you can do that.
ryan0x2 has joined #ruby
<rking>
In fact if you're using Bundler gemsets are redundant.
<cakehero>
heh
iori has quit [Remote host closed the connection]
<rking>
So I would use the default set.
tcopp has joined #ruby
<cakehero>
wouldn't bundle install put the gems in the RVM gem set?
<rking>
Yep, exactly.
iori has joined #ruby
iori has quit [Remote host closed the connection]
<rking>
Whichever you have selected through rvm at the time.
<cakehero>
but bundle normally keeps them separate for you anyway?
<cakehero>
the rvm file only says to use a certain ruby version (it's just one line)
<cakehero>
use ruby-version@mhealth
iori has joined #ruby
flip_digits has joined #ruby
deens has quit [Ping timeout: 272 seconds]
eurek has joined #ruby
<rking>
Yep, it's fine if you do or don't use a gemset on top of Bundler.
carlyle has joined #ruby
ctshh has joined #ruby
<cakehero>
okay cool
<cakehero>
weaksauce === it didn't fix it. blowing away gemset again and also blowing away the repo
<rking>
Whenever you run `bundle exec <something>` bundle will completely sanitize your $:, making sure that you don't have accidental gems that get run but aren't in the Gemfile, and also that you /do/ have the ones that are in the Gemfile.
jxf has quit [Ping timeout: 264 seconds]
<rking>
cakehero: How detailed are the install instructions?
<cakehero>
I mean they are pretty much what you'd expect
<cakehero>
download repo, run bundle
<cakehero>
gem install capistrano
<rking>
Command-for-command or are they like, "Ehh, go get rvm and then install some gems and stuff."
<carpediembaby>
hi. i installed ruby 1.9.3 from source (ruby -v gives ruby 1.9.3p194). but when i am looking at sources (/usr/local/lib), i only see a folder for ruby/1.9.1. what's going on?
explody has joined #ruby
ringotwo has joined #ruby
<ctshh>
rking: :) i do not want to use bash, i'd like to manipulate the string in ruby directly.
td123 has joined #ruby
Cpudan80_ has quit [Quit: Leaving]
<stockholm>
what is that editor people use on mac to code ruby?
<rking>
samfisher: Np. I'm sure listing hardware would be similar, you'd just have to find the right OLE thing.
kevinbond has joined #ruby
<samfisher>
another one: can I use ruby in client-server manner, so I can spawn a shell on the remote system?
<cakehero>
rking I'm sure you can earn part of the $64k if you want
<cakehero>
heh
cezar has joined #ruby
niklasb has quit [Ping timeout: 255 seconds]
<cakehero>
if hanging out in IRC is less thrilling than working
the_jeebster has joined #ruby
<cakehero>
brb, restrating
cezar has quit [Client Quit]
<cakehero>
and/or getting starbucks
cakehero has quit [Quit: Leaving...]
_md has joined #ruby
tzvi has joined #ruby
booginga has joined #ruby
jesly has quit [Ping timeout: 272 seconds]
awarner has joined #ruby
PaciFisT has joined #ruby
jesly has joined #ruby
chson has joined #ruby
internet_user has joined #ruby
boo1 has joined #ruby
dhodgkin has joined #ruby
ryan0x2 has quit [Remote host closed the connection]
cpruitt has joined #ruby
cpruitt has left #ruby [#ruby]
polysics has joined #ruby
plastics has joined #ruby
omry has quit [Remote host closed the connection]
td123 has quit [Read error: Connection reset by peer]
cakehero has joined #ruby
randomubuntuguy has joined #ruby
Morkel has quit [Quit: Morkel]
krzkrzkrz has joined #ruby
krz has quit [Read error: Connection reset by peer]
krzkrzkrz is now known as krz
mnaser has quit [Quit: Computer has gone to sleep.]
pk1001100011 has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
iamlacroix has joined #ruby
yankhates has joined #ruby
prometheus has joined #ruby
rbanffy has joined #ruby
nateberkopec has joined #ruby
hunglin has joined #ruby
ananthakumaran has joined #ruby
k_89 has joined #ruby
dhodgkin has quit [Ping timeout: 245 seconds]
td123 has joined #ruby
iamlacroix has quit [Remote host closed the connection]
jprovazn is now known as jprovazn_away
samfisher has quit [Quit: exit error code 434]
rashm77 has joined #ruby
hasrb has joined #ruby
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
moshef has joined #ruby
_br_ has quit [Remote host closed the connection]
phantasm66 has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
timonv has quit [Read error: No route to host]
ringotwo has quit [Remote host closed the connection]
randomubuntuguy has quit [Quit: Leaving]
gtuckerkellogg has quit [Ping timeout: 246 seconds]
rashm77 has quit []
joshman_ has joined #ruby
flype has joined #ruby
timonv has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
ipoval has joined #ruby
jesly has quit [Ping timeout: 246 seconds]
indian has quit [Ping timeout: 255 seconds]
randomautomator has joined #ruby
b26 has quit [Remote host closed the connection]
wargasm has joined #ruby
b26 has joined #ruby
digitalcakestudi has joined #ruby
d1zzYLuLz has left #ruby [#ruby]
mikepack has joined #ruby
mnaser has joined #ruby
randomubuntuguy has joined #ruby
kkiero has joined #ruby
moshef has quit [Quit: moshef]
timonv has quit [Ping timeout: 256 seconds]
<Synthead>
Does rescue without specifying any exceptions catch Timeout::Error?
mnaser has quit [Client Quit]
pk1001100011 has joined #ruby
ryan0x2 has joined #ruby
<apeiros_>
Synthead: in older rubies: no
tk___ has quit [Quit: ばいばい]
<apeiros_>
I'm not sure, but I think they changed the ancestry of Timeout::Error
* apeiros_
checks
<Synthead>
apeiros_: ah, so I have to specifically state rescue Timeout::Error?
Progster has quit [Ping timeout: 265 seconds]
<apeiros_>
yes, in newer rubies it will rescue a Timeout::Error
<apeiros_>
in older rubies, it didn't (again: iirc)
<apeiros_>
and yes, that means in older rubies you would have to explicitly rescue it
<apeiros_>
but you should *always* rescue specific exceptions.
<apeiros_>
catch-alls are only ever good for logging purposes
Axsuul has quit [Ping timeout: 246 seconds]
alek_b has joined #ruby
prometheus has quit [Ping timeout: 240 seconds]
sailias has joined #ruby
lxsameer has quit [Quit: Leaving]
jxf has quit [Read error: Connection reset by peer]
jxf has joined #ruby
gtuckerkellogg has joined #ruby
josefig has joined #ruby
josefig has quit [Changing host]
josefig has joined #ruby
hasrb has quit [Remote host closed the connection]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
uris has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
alek_b_ has quit [Ping timeout: 265 seconds]
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
KDr2 has quit [Remote host closed the connection]
ipoval has quit [Quit: ipoval]
josefig_ has joined #ruby
josefig has quit [Read error: Connection reset by peer]
<rking>
apieros_: Interesting statement ("only ever good for logging").
<rking>
Anyone want to + or - the book, "Exceptional Ruby"? I'm thinking about reading it.
mikeycgto has joined #ruby
mikeycgto has quit [Changing host]
mikeycgto has joined #ruby
wargasm has quit [Read error: Connection reset by peer]
wargasm has joined #ruby
andreime has quit [Quit: Lost terminal]
<t_j>
anyone tried/know of wait/sleep queues for ruby?
<apeiros_>
t_j: require 'thread'; q = Queue.new
timonv_ has joined #ruby
<t_j>
apeiros_: yeah, well sort of
timonv has quit [Ping timeout: 265 seconds]
iamjarvo has joined #ruby
<iamjarvo>
is i wanted a quick way to figure out if versions of two gems are compatible what should id o
<t_j>
i have 3 threads reading messages from an MQ, and i only want to process one message at a time, but messages from Queue A must be processed before ones from B or C, B and C have no prioritiy requirements
phantasm66 has quit [Quit: *poof*]
<apeiros_>
t_j: yes. that's what Queue does…
<apeiros_>
unless I'm misunderstanding something…
<t_j>
i need message priorities
<apeiros_>
though, having 2 threads wait for the other to finish the current message seems to beat the purpose of having threads in the first place…
dhodgkin has quit [Ping timeout: 240 seconds]
<apeiros_>
aha
<apeiros_>
ruby-toolbox.com then
<apeiros_>
pretty sure I came across priority queues
<rking>
iamjarvo: Run your tests.
<rking>
If they pass then the two gem versions are equivalent enough.
<t_j>
apeiros_: so i would end up with 3 produces, and one consumer
<t_j>
the work the consumer is doing will use all the CPU resources on the node until its finished, hence one a ta time
<iamjarvo>
rking: well they are failing haha
<iamjarvo>
so i gues shtey arent compatible
<apeiros_>
t_j: I don't see why you'd want to use 3 queues for that. I'd say the solution to it would be with a single queue and let the messages which you say are for queue A simply have a higher priority
<t_j>
apeiros_: i guess i can change the message format
<apeiros_>
or did you mean (in your description) messages from *thread A* (instead of "from Queue A")
<t_j>
apeiros_: at the moment each work unite type goes in a seperate queue
<t_j>
but i can add a type field and use a single queue
SQLStud has joined #ruby
<t_j>
i guess i can use a single work queue and add message priorities
<t_j>
and the MQ will deal with it
baroquebobcat has joined #ruby
baroquebobcat has quit [Read error: Connection reset by peer]
uris has joined #ruby
thone_ has joined #ruby
baroquebobcat has joined #ruby
quest88 has joined #ruby
boo1 has quit [Ping timeout: 246 seconds]
<apeiros_>
oh dear… after all the atrocities we had (and still have) to endure thanks to apt-get being totally dick-headed about ruby install, we now have gentoo doing stupid things too…
<apeiros_>
on gentoo, echo $RUBY_OPT --> '-rauto_gem'
<apeiros_>
of course that'll break any custom install of ruby…
lorandi has quit [Quit: Leaving]
<apeiros_>
somebody earned a hard slap with a large trout for that… :-S
Jake232 has quit [Quit: Computer has gone to sleep.]
thone has quit [Ping timeout: 252 seconds]
brasten has joined #ruby
ckrailo has joined #ruby
prometheus has joined #ruby
umttumt has quit [Remote host closed the connection]
bluenemo_ has quit [Remote host closed the connection]
mikepack has quit [Read error: Connection reset by peer]
punkrawkR has joined #ruby
Rizzle has joined #ruby
ViperMaul has joined #ruby
maesbn has quit [Remote host closed the connection]
<moos3>
i have a quesiton about writing a ruby daemon that I want to wake up every x minutes and execute something, whats the best way to do this
nachtwandler has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
<lectrick>
Should I put a run-time constraint in my test suite or is that wrong because it's nondeterministic?
<hoelzro>
lectrick: what kind of constraint?
schovi has quit [Remote host closed the connection]
mwilson_ has quit [Excess Flood]
Rizzle has quit [Ping timeout: 272 seconds]
mwilson_ has joined #ruby
<lectrick>
hoelzro: We have some code that auto-links content and it was taking a very long time on certain input content (like over 30 seconds). I rewrote the regex and some of the code and I want to ensure its run-time stays low
dhodgkin has joined #ruby
<lectrick>
Basically the regex was doing catastrophic backtracing which is unfortunately a trap that is very easy to fall into with any non-simple regex
ViperMaul has quit [Ping timeout: 255 seconds]
<lectrick>
It would eventually finish but it was taking an unusably long time so I want to add a test to check run time on it
<hoelzro>
oh, I see what you mean
<lectrick>
The problem with adding run time checks to your test suite is that they are nondeterministic.
<hoelzro>
hmm
<hoelzro>
well
<hoelzro>
I would make a special test for it
<hoelzro>
ex. don't have it run as part of the normal test suite
<lectrick>
Maybe I can WARN if it's long, but still pass the test?
<hoelzro>
and it'd be nice if you could ensure that run time was strictly non-increasing, with some margin for error
<hoelzro>
I dunno
<lectrick>
hoelzro: exactly
rbanffy has quit [Ping timeout: 272 seconds]
udk is now known as UdontKnow
nirakara has joined #ruby
jesly has quit [Ping timeout: 244 seconds]
shevy2 has joined #ruby
mdhopkins has joined #ruby
<lectrick>
hoelzro: the dev group here is talking about a separate profiling test suite that just does WARNs on performance expectations not being met
d3vic3 has quit [Ping timeout: 245 seconds]
mikepack has joined #ruby
cbuxton has joined #ruby
<hoelzro>
that makes sense to me
d3vic3 has joined #ruby
ananthakumaran1 has joined #ruby
deryl has joined #ruby
macmartine has joined #ruby
ananthakumaran has quit [Ping timeout: 246 seconds]
adeponte has quit [Remote host closed the connection]
jamesaxl has quit [Ping timeout: 250 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
senny has quit [Remote host closed the connection]
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
<krz>
is && the same as and ?
<hoelzro>
almost
<hoelzro>
precedence is different
justinmcp has quit [Ping timeout: 260 seconds]
Eldariof-ru has quit [Ping timeout: 265 seconds]
kevinbond has left #ruby [#ruby]
Asher has quit [Ping timeout: 246 seconds]
kevinbond has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
Asher has joined #ruby
krusty_ar has joined #ruby
ringotwo has joined #ruby
kvirani has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
yugui is now known as yugui_zzz
indstry has quit [Remote host closed the connection]
zommi has quit [Remote host closed the connection]
Asher1 has joined #ruby
hoelzro is now known as hoelzro|away
Asher has quit [Ping timeout: 245 seconds]
werdnativ has joined #ruby
Asher1 has quit [Client Quit]
robotmay has quit [Remote host closed the connection]
Asher has joined #ruby
mahmoudimus has joined #ruby
mnaser has quit [Quit: Computer has gone to sleep.]
Targen has joined #ruby
mahmoudimus has quit [Client Quit]
yfeldblum has quit [Ping timeout: 272 seconds]
savage- has joined #ruby
ringotwo has quit [Remote host closed the connection]
jjp has quit [Ping timeout: 240 seconds]
jjp has joined #ruby
Ontolog has joined #ruby
tyman has joined #ruby
Ontolog has quit [Read error: Connection reset by peer]
Ontolog has joined #ruby
justinmcp has joined #ruby
lkba has joined #ruby
noganex has quit [Ping timeout: 248 seconds]
aantix has joined #ruby
davidcelis has quit [Ping timeout: 265 seconds]
ryanf has joined #ruby
ringotwo has joined #ruby
noganex has joined #ruby
jesly has joined #ruby
d3vic3 has quit [Ping timeout: 265 seconds]
jxpx777 has quit [Quit: Mac is sleeping…]
larissa has quit [Quit: Saindo]
d3vic3 has joined #ruby
TPFC-SYSTEM has joined #ruby
AlbireoX`Laptop has joined #ruby
piotr has quit [Ping timeout: 272 seconds]
ryanf has quit [Quit: broken pipes |||]
hasrb has quit [Remote host closed the connection]
nirakara has quit [Ping timeout: 245 seconds]
mnaser has joined #ruby
litheum has joined #ruby
b26 has quit [Remote host closed the connection]
werdnativ has quit [Quit: werdnativ]
b26 has joined #ruby
stkowski has joined #ruby
wallerdev has quit [Quit: wallerdev]
bricker88 has joined #ruby
mneorr2 has joined #ruby
timonv_ has quit [Remote host closed the connection]
mneorr1 has quit [Read error: Operation timed out]
Helius has quit [Remote host closed the connection]
francisfish has quit [Remote host closed the connection]
litheum has left #ruby [#ruby]
brianpWins has quit [Quit: brianpWins]
adeponte has joined #ruby
whitenoise has joined #ruby
_md has quit [Quit: Leaving...]
mockra has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
jeff_sebring has quit [Quit: Leaving]
apok has joined #ruby
jeff_sebring has joined #ruby
albemuth has quit [Quit: Leaving...]
aaroncm has joined #ruby
bluOxigen has joined #ruby
Araxia has joined #ruby
<David_Miller>
I am wondering why when I use eventmachine.defer, which is supposed to run stuff in another thread, I can't see multiple threads in ps -axf
jimeh has quit [Ping timeout: 246 seconds]
<David_Miller>
I thought a thread = process
yfeldblum has joined #ruby
rbanffy has joined #ruby
rbanffy has quit [Remote host closed the connection]
rbanffy_ has joined #ruby
<bnagy>
it is not
<bnagy>
processes contain threads
arturaz has quit [Ping timeout: 272 seconds]
<bnagy>
or at least one, anyway
mrsolo has joined #ruby
fmcgeough has joined #ruby
dankest has joined #ruby
ringotwo has quit [Remote host closed the connection]
Drewch has quit [Ping timeout: 260 seconds]
<David_Miller>
Is there a problem with running an obscene number of threads in one process? like 1000 or so?
mockra has quit [Remote host closed the connection]
genivf has joined #ruby
<bnagy>
probably
<bnagy>
also depends on your ruby VM
<bnagy>
MRI has GIL anyway, so you'll gain less than nothing
schaerli has joined #ruby
<David_Miller>
I say that because I told eventmachine to run 500 concurrent threads and it seems to be totally happy with that
<bnagy>
I'd try to keep it to < 2x cores, in any case
jimeh has joined #ruby
Drewch has joined #ruby
<bnagy>
well yeah it shouldn't crash, it will just be much worse than running a reasonable nuber
itnomad has joined #ruby
bambanx has joined #ruby
<bambanx>
Hi
plastics has joined #ruby
wallerdev has joined #ruby
rizzylt has quit [Ping timeout: 265 seconds]
<bambanx>
Guys exist a comand like a break for finish whatever thing are doing my program and goto the first line of my code? Like a goto
cirwim has quit [Quit: Leaving.]
mockra has joined #ruby
<David_Miller>
I was confusing threading with forking
rizzylt has joined #ruby
<Azure>
... what?
aaroncm has quit [Remote host closed the connection]
ringotwo has joined #ruby
savage- has quit [Remote host closed the connection]
werdnativ has joined #ruby
indian has joined #ruby
<David_Miller>
I think he wants next
fulmato has joined #ruby
ghanima has joined #ruby
<bambanx>
?
<bnagy>
bambanx: you'd need to show code.
fowl has quit [Ping timeout: 248 seconds]
mpereira has joined #ruby
<bnagy>
there is an actual goto, but don't use it
<bambanx>
I cannot know bnagy i am my phone
<bnagy>
ok well good luck
<bambanx>
but i need some for go out my method i think i am making infinito loops
williamcotton has joined #ruby
<bnagy>
I'm sure that's really clear to you
<bambanx>
Lol
tvw has quit [Remote host closed the connection]
<bnagy>
things that might be what you want: break next redo retry return
<bnagy>
anyway, bedtime for me
bradhe has quit [Remote host closed the connection]
<David_Miller>
thanks bnagy
bradhe has joined #ruby
<bambanx>
well i am using methods with in methods and i think i am making like infinity loops just o need some go to my first line of my code
<bambanx>
sorry for my english
minijupe has joined #ruby
wpaulson has joined #ruby
iocor has quit [Quit: Computer has gone to sleep.]
rbanffy_ has quit [Read error: Connection reset by peer]
rbanffy__ has joined #ruby
bradhe_ has joined #ruby
bradhe has quit [Read error: Connection reset by peer]
dhodgkin has quit [Quit: WeeChat 0.3.5]
brianpWins has joined #ruby
hmans has quit [Quit: Leaving...]
avandenhoven has joined #ruby
Ethan has quit [Quit: *poof*]
Ethan has joined #ruby
davidw has quit [Ping timeout: 240 seconds]
umttumt has quit [Remote host closed the connection]
cantelope has joined #ruby
_md has joined #ruby
wallerdev has quit [Quit: wallerdev]
workmad3 has quit [Ping timeout: 248 seconds]
shadoi has joined #ruby
dfr|work has quit [Read error: Operation timed out]
williamcotton has quit [Ping timeout: 246 seconds]
mnaser has quit [Ping timeout: 244 seconds]
mahmoudimus has joined #ruby
cirwim has joined #ruby
cirwin has joined #ruby
artOfWar has joined #ruby
mnaser has joined #ruby
adamkittelson has joined #ruby
ephemerian has left #ruby [#ruby]
apok has quit [Remote host closed the connection]
apok has joined #ruby
noganex has quit [Ping timeout: 265 seconds]
bradhe_ has quit [Remote host closed the connection]
bradhe has joined #ruby
iocor has joined #ruby
Drewch has quit [Ping timeout: 244 seconds]
akem has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
mockra has quit [Remote host closed the connection]
Drewch has joined #ruby
cakehero has joined #ruby
siefca has joined #ruby
<siefca>
hi
<siefca>
How can I add some methods to module that has been already used to extend some class, so that the newly added method became visible in all classes that are using the module? Possible?
<cirwin>
siefca: that's how it works by default
savage- has joined #ruby
k_89 has quit [Ping timeout: 248 seconds]
sailias has joined #ruby
<siefca>
cirwin: I'm getting method missing
apeiros_ has quit [Remote host closed the connection]
<Mon_Ouie>
When you include a module, its methods don't really get added to those of the class, the module gets inserted in the ancestry chain
<Mon_Ouie>
Any example of what you're doing?
yankhates has quit [Ping timeout: 244 seconds]
<companion>
completion.rb:9:in `require': cannot load such file -- readline (LoadError)
<companion>
any one got a sollution to such thing with RVM?
sterNiX has quit [Read error: Connection reset by peer]
davidcelis_ has joined #ruby
luckyruby has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
Lachryma has quit [Ping timeout: 240 seconds]
wallerdev has joined #ruby
dankest has quit [Quit: Leaving...]
jxpx777 has joined #ruby
krusty_ar has quit [Read error: Connection reset by peer]
wargasm has quit [Ping timeout: 244 seconds]
mikepack has joined #ruby
ilyam has joined #ruby
krusty_ar has joined #ruby
fermion has quit [Quit: P]
ben_alman has joined #ruby
havenn has joined #ruby
Niamkik has joined #ruby
mnaser has quit [Ping timeout: 264 seconds]
krz has quit [Quit: krz]
mnaser has joined #ruby
Boohbah_ has joined #ruby
Boohbah has quit [Remote host closed the connection]
dv_ has quit [Remote host closed the connection]
mikepack has quit [Read error: Connection reset by peer]
mockra has quit [Remote host closed the connection]
ringotwo has quit [Remote host closed the connection]
rouss has quit []
kirun has joined #ruby
williamcotton has joined #ruby
mnaser has quit [Ping timeout: 255 seconds]
mnaser has joined #ruby
DanBoy_ has quit [Remote host closed the connection]
prtksxna has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
rbanffy has quit [Read error: Connection reset by peer]
hasrb has quit [Remote host closed the connection]
rbanffy_ has joined #ruby
mnaser has quit [Ping timeout: 250 seconds]
fulmato has quit [Ping timeout: 248 seconds]
pygospa has quit [Quit: leaving]
jxf has joined #ruby
Lachryma has joined #ruby
mnaser has joined #ruby
cbuxton1 has joined #ruby
Maniacal has joined #ruby
cbuxton has quit [Ping timeout: 240 seconds]
hynkle has joined #ruby
nateberkopec has quit [Quit: Leaving...]
stephenjudkins has joined #ruby
_md has quit [Quit: Leaving...]
prtksxna has joined #ruby
Progster has joined #ruby
henn1nk has joined #ruby
hasrb has joined #ruby
itsjustaride271 has joined #ruby
<icy`>
hi, i had a yaml file with some data. I manually went in and added some lines, and now when I tried to read it into a hash I get NoMethodError: undefined method `external_encoding' for #<String:0x000000017d8178>
<icy`>
at least I suspect it was because i manually edited
<henn1nk>
maybe someone has an idea.. https://gist.github.com/2998048 i'm trying to iterate throw all orders and to save the basic_articles of the orders to get my best sellers for GChart.... so the result has to be data => [10,20,50], labels => ['BasicArticleName1', 'BasicArticleName2', 'BasicArticleName3'] ... ?
itsjustaride271 has left #ruby [#ruby]
cczona has joined #ruby
kevinbond has quit [Quit: kevinbond]
booginga has quit [Quit: Leaving]
minijupe has quit [Quit: minijupe]
ph^ has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 246 seconds]
xnm has joined #ruby
<icy`>
wait nvm, that's not because of those lines
graspee has joined #ruby
platzhirsch has joined #ruby
mockra has joined #ruby
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
mikepack has joined #ruby
bitsar2 has joined #ruby
Ontolog has quit [Read error: Connection reset by peer]
Ontolog_ has joined #ruby
stat1x has quit [Remote host closed the connection]
<platzhirsch>
is $LOAD_PATH << '.' and require file the recommended approach to add ruby files of the same directory?
stat1x has joined #ruby
prtksxna has quit [Remote host closed the connection]
JustinCampbell has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
mockra has quit [Remote host closed the connection]
<cirwin>
platzhirsch: only do that if you undo it again
<cirwin>
people normally just do something with __FILE__
<shevy>
atmosx I do exams for both bachelor and master at the same time, technically though I still have to write my bachelor work. I stopped studies at my older university, bachelor/master system did not exist there and we were force-switched. and that just sucked (the old diploma there was worth about equal to a master study)
Moodran is now known as Adran
mikepack has quit [Read error: Connection reset by peer]
<Hanmac>
shevy in what topic?
polysics_ has joined #ruby
CoverSlide has joined #ruby
polysics has quit [Ping timeout: 240 seconds]
imami|afk is now known as banseljaj
mikepack has joined #ruby
headius has joined #ruby
Eldariof-ru has quit []
mickn has joined #ruby
plastics has quit [Ping timeout: 250 seconds]
nanderoo has quit [Quit: Leaving.]
berserkr has quit [Quit: Leaving.]
rdg has joined #ruby
dasuchin has quit [Quit: leaving]
<mahmoudimus>
How can I turn off VCR for one spec test?
polysics_ has quit [Remote host closed the connection]
xubuntu5 has joined #ruby
Criztian has joined #ruby
jd__ has joined #ruby
<mahmoudimus>
Ah I see, VCR.turn_off!
Axsuul has joined #ruby
chienpo has joined #ruby
the_jeebster has quit [Ping timeout: 245 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
mxweas_ has joined #ruby
yoklov has joined #ruby
wpaulson has quit [Ping timeout: 245 seconds]
the_jeebster has joined #ruby
offby1 has joined #ruby
<offby1>
I have a simple ActiveRecord model, and I was surprised that I was able to access a non-existing attribute without error. That is, x = MyThing.new ; x.typo = 4
lorandi has quit [Quit: Leaving]
<offby1>
Is there a way to make that sort of typo raise an exception?
uris has quit [Ping timeout: 250 seconds]
pielgrzym has joined #ruby
<offby1>
*crickets*
mickn has quit [Remote host closed the connection]
uris has joined #ruby
<shevy>
Hanmac chemistry right now
cbuxton1 has quit [Quit: Leaving.]
<pielgrzym>
how can I convert a string with hex values into an array of bytes? I need to xor some of them for my cryptography course
<pielgrzym>
like: cipher = "ab0f3caa2b"
minijupe has joined #ruby
<Hanmac>
string.to_i(16)
cbuxton has joined #ruby
<pielgrzym>
Hanmac: this gives me an integer - how can I have an array of bytes out of it?
atmosx has quit [Remote host closed the connection]
cantonic has quit [Quit: cantonic]
<Hanmac>
why do you need? you could xor integer
<pielgrzym>
Hanmac: I need to know I'm addressing a particular byte, say 2b from above example
bglusman_ has joined #ruby
<Hanmac>
string.to_i(16) ^ yourflag .... ^ is for xor
<pielgrzym>
Hanmac: what is flag?
<pielgrzym>
ah
<Hanmac>
i mean "^" is your xor operator
<pielgrzym>
Hanmac: I need to byte, say 3, with an oridinal from letter 'c', how to do this? I don't want to xor entire number
wpaulson has joined #ruby
atmosx has joined #ruby
fulmato has joined #ruby
werdnativ_ has joined #ruby
Vendethiel has joined #ruby
Jake232 has quit [Ping timeout: 250 seconds]
rdg has quit [Quit: ttfn]
jeff_sebring has quit [Remote host closed the connection]
<Hanmac>
hm maybe something like that? cipher[0,4] #=> "ab0f"
werdnativ has quit [Ping timeout: 245 seconds]
werdnativ_ is now known as werdnativ
cantonic has joined #ruby
<pielgrzym>
Hanmac: only thing that comes to mind is to make the string into array, cipher = [ "ab", "0f", "ca", "a2", "2b"], and for each of elements calculate .to_i(16)
<pielgrzym>
Hanmac: let me try it
nachtwandler has quit [Quit: leaving]
<pielgrzym>
Hanmac: ah, you just showed a slice or #=> is some king of operator?
jeff_sebring has joined #ruby
<Hanmac>
#=> symbols the result
hashpuppy has joined #ruby
platzhirsch has left #ruby [#ruby]
<pielgrzym>
Hanmac: I see, well I'll have to produce an array of single integers then :)
jcromartie has quit [Read error: Connection reset by peer]
stephenjudkins has quit [Read error: Connection reset by peer]
stephenjudkins has joined #ruby
<pielgrzym>
Hanmac: thanks!! :)
shevy has quit [Ping timeout: 272 seconds]
mayankkohaley has quit [Ping timeout: 255 seconds]
mxweas_ has quit [Quit: Leaving...]
mnaser has quit [Ping timeout: 244 seconds]
rippa has joined #ruby
workmad3 has joined #ruby
enroxorz has quit [Quit: Leaving]
dku has joined #ruby
randomubuntuguy has joined #ruby
<dku>
What does a "deadlock detected" error mean when calling Thread.stop?
digitalcakestudi has quit [Ping timeout: 240 seconds]
randomubuntuguy has quit [Max SendQ exceeded]
randomubuntuguy has joined #ruby
mnaser has joined #ruby
timonv has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
davidw has joined #ruby
jxpx777 has quit [Quit: Mac is sleeping…]
andreime has quit [Ping timeout: 252 seconds]
<stephenjudkins>
dku: do you know what a deadlock is?
TheHunter_1039 has quit [Quit: TheHunter_1039]
rowanu has joined #ruby
<dku>
stephenjudkins: not in a thread context, nope.
Lachryma has quit [Ping timeout: 272 seconds]
stephenjudkins has quit [Read error: Connection reset by peer]
nadirvardar has quit [Ping timeout: 272 seconds]
stephenjudkins has joined #ruby
Vendethiel has quit [Quit: je ne suis plus là, tqvu]
headius has quit [Quit: headius]
nadirvardar has joined #ruby
hashpuppy has quit [Quit: hashpuppy]
bradhe has joined #ruby
<burgestrand>
dku: it typically means ruby has detected a situation where nothing will ever happen, and all active threads will be sleeping indefinetly or waiting for something
bluenemo has quit [Remote host closed the connection]
shevy has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
stephenjudkins has quit [Ping timeout: 265 seconds]
araujo has quit [Remote host closed the connection]
werdnativ has quit [Quit: werdnativ]
bgaru has joined #ruby
kstephens has quit [Ping timeout: 260 seconds]
etehtsea has quit []
rippa has quit [Ping timeout: 248 seconds]
araujo has joined #ruby
kstephens has joined #ruby
bgaru has quit [Client Quit]
_-garu-_ has joined #ruby
Hanmac has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
silentpost has joined #ruby
<dku>
burgestrand: gotcha, thanks!
hynkle has joined #ruby
mvangala_home has quit [Remote host closed the connection]
BrokenCog has joined #ruby
ryan0x2 has joined #ruby
rowanu has quit [Remote host closed the connection]
iocor has quit [Quit: Computer has gone to sleep.]
j3ll3 has joined #ruby
j3ll3 has left #ruby [#ruby]
fbernier has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
mvangala_home has joined #ruby
cabbit has quit [Quit: cabbit]
JustinCampbell has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 265 seconds]
pygospa has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
kenichi has quit [Remote host closed the connection]
axl_ has joined #ruby
minijupe has quit [Quit: minijupe]
werdnativ has joined #ruby
geekbri has quit [Remote host closed the connection]
hynkle has quit [Quit: hynkle]
atmosx has quit [Ping timeout: 276 seconds]
kenichi has joined #ruby
atmosx has joined #ruby
fantazo has joined #ruby
sspiff has quit [Ping timeout: 260 seconds]
ringotwo has quit [Remote host closed the connection]
<mklappstuhl>
I want to install a gem that fails with "has an invalid value for @cert_chain" (ferret 0.11.6)—is there any way to force the installation?
axl_ has quit [Quit: axl_]
<cirwin>
mklappstuhl: what version of rubygems have you?
<mklappstuhl>
cirwin: 1.7.1
<cirwin>
you should update it
<mklappstuhl>
cirwin: with ruby1.8
<cirwin>
(gem update --system, or rvm rubygems latest)
adeponte has quit [Remote host closed the connection]
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
vlad_starkov has quit [Remote host closed the connection]
wpaulson has joined #ruby
wpaulson_ has joined #ruby
<mklappstuhl>
cirwin: we have a quite fucked up ruby setup on our server with two versions of ruby and two versions of rubygems without any rvm/rbenv stuff :D
<cirwin>
lucky you :)
grantbdev has joined #ruby
jesly has quit [Ping timeout: 245 seconds]
mengu has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
ryanf has joined #ruby
yxhvuud has quit [Ping timeout: 264 seconds]
wpaulson has quit [Ping timeout: 248 seconds]
wpaulson_ is now known as wpaulson
balki_ has joined #ruby
balki has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
jimeh has quit [Ping timeout: 255 seconds]
minijupe has joined #ruby
mikepack has joined #ruby
ukd1 has joined #ruby
malkomalko has joined #ruby
<ukd1>
Hey guys, I'm doing some ruby and have been using the mongo driver directly, I'd like to use either mongoid or mongomapper - is there any clear reason to use one over the other?
ziggles has joined #ruby
<mklappstuhl>
ukd1: afaik not really, I prefer mongoids documentation, which is beautiful
mikepack has quit [Read error: Connection reset by peer]
yankhates has quit [Ping timeout: 240 seconds]
yankhate1 has quit [Ping timeout: 245 seconds]
ebanoid has quit []
malkomalko has quit [Read error: Connection reset by peer]
<dankest>
mklappstuhl: that's the stuff nightmares are made of
apeiros_ has quit [Remote host closed the connection]
FLeiXiuS has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 264 seconds]
mattp_ has quit [Read error: Connection reset by peer]
monkegjinni has quit [Remote host closed the connection]
aquaranto has joined #ruby
apok_ has joined #ruby
<icy`>
hi, i'm trying to make a regexp at http://rubular.com/r/vfXirK7T45 . I think i've got it, but i jus want to confirm. It has to match something like ".set hat 44.3" , extracting hat to $1 and 44.3 to $2, and optional further characters to $3, as in the example
schickung has quit [Quit: schickung]
<icy`>
i should prob change ^ and $ to \A , \z
_md has quit [Quit: Leaving...]
ChampS666 has quit []
ecigman is now known as jigman
apok has quit [Ping timeout: 246 seconds]
apok_ is now known as apok
davidw has quit [Ping timeout: 245 seconds]
Ethan has quit [Ping timeout: 245 seconds]
indian has quit [Ping timeout: 264 seconds]
Siphonblast has quit [Ping timeout: 255 seconds]
Siphonblast has joined #ruby
atmosx has quit [Ping timeout: 276 seconds]
ben_m has joined #ruby
pooya72 has joined #ruby
<pooya72>
hello everybody.
<ben_m>
Hello
atmosx has joined #ruby
<pooya72>
so i know "learn python the hard way" is highly praised, can the same be say for the ruby version? http://ruby.learncodethehardway.org/
<ben_m>
I don't think so. I read that it's not very idiomatic Ruby
<ben_m>
ie. they just translate the Python into Ruby
kenichi has quit [Remote host closed the connection]
<ben_m>
But I didn't read it myself, so not sure :)
cakehero has quit [Quit: Computer has gone to sleep.]
<pooya72>
ben_m: yeah, I read similar comments.
jeff_sebring has quit [Quit: Leaving]
<pooya72>
but I like the style. Anything similar to this?
stkowski has left #ruby [#ruby]
QaDeS has quit [Quit: Ex-Chat]
jeff_sebring has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
cczona has joined #ruby
rbanffy_ has quit [Quit: Ex-Chat]
whitenoise has quit [Quit: This computer has gone to sleep]
pradeepto has quit [Read error: Operation timed out]
Boohbah_ has quit [Ping timeout: 276 seconds]
Boohbah has joined #ruby
grantbdev has quit [Quit: Leaving]
kevinbond has joined #ruby
veex has quit [Read error: Connection reset by peer]
jxf has quit [Read error: Connection reset by peer]
wmoxam_ has quit [Ping timeout: 244 seconds]
linduxed has quit [Ping timeout: 248 seconds]
jxf has joined #ruby
<boobah>
A programmer will eventually tell you to use Mac OSX or Linux. If the programmer likes fonts and typography, they'll tell you to get a Mac OSX computer. If they like control and have a huge beard, they'll tell you to install Linux.
<icy`>
beard eh
<ben_m>
I don't have a beard :/
<icy`>
i've seen plenty of bearded OSX programmers o.O
<pooya72>
havenn: yeah I saw that. The problem is that this person's english isn't very good, so a lot of the humor and gradual introduction will be lost on him. Learn the hard way was good cause the code was at the center, and very little description.
<pooya72>
and I really miss this _why guy. Shoes is cool.
<atmosx>
anyone using octopress on a personal server?
<atmosx>
with rsync deployment
chson has joined #ruby
linduxed has joined #ruby
ken_barber has joined #ruby
Whoop has quit [Quit: brb]
nateberkopec has joined #ruby
Whoop has joined #ruby
Whoop has quit [Changing host]
Whoop has joined #ruby
kpshek has quit []
awarner has quit [Remote host closed the connection]
Sheehan has quit [Quit: Sheehan]
alek_b_ has joined #ruby
pooya72 has quit [Quit: pooya72]
brianpWins has joined #ruby
jxf has quit [Ping timeout: 246 seconds]
bosphorus has joined #ruby
dankest has quit [Quit: Leaving...]
shadoi has quit [Quit: Leaving.]
macmartine has quit [Quit: macmartine]
shadoi has joined #ruby
virunga has quit [Read error: Connection reset by peer]
alek_b has quit [Ping timeout: 244 seconds]
<havenn>
pooya72: Was skimming The Bastards Book of Ruby, seemed promising and has some good links as well: http://ruby.bastardsbook.com/