sea_local has quit [Remote host closed the connection]
odlox has quit []
tlarevo has quit [Remote host closed the connection]
thams has joined #ruby
J33Zy has joined #ruby
Sawbones has quit [Remote host closed the connection]
mikeg has joined #ruby
Scotteh_ has quit [Ping timeout: 245 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lewoco>
In a .rb file, how do I define functions at global scope so that users who 'require' the .rb can call the functions without needing to prefix a module name?
GriffinHeart has quit [Remote host closed the connection]
dawkirst has joined #ruby
arup_r has quit [Quit: Leaving.]
chrishough has joined #ruby
stephen has joined #ruby
Wolland has quit [Ping timeout: 260 seconds]
dawkirst has quit [Ping timeout: 245 seconds]
fabrice31 has quit [Ping timeout: 260 seconds]
SilkFox_ has joined #ruby
sylvanica has joined #ruby
avita1 has quit [Quit: Leaving.]
mockra_ has joined #ruby
GriffinHeart has joined #ruby
avita1 has joined #ruby
Vile` has quit [Remote host closed the connection]
Akagi201 has quit []
beef-wellington has joined #ruby
Vile` has joined #ruby
oo_ has joined #ruby
SilkFox_ has quit [Ping timeout: 245 seconds]
bearish has joined #ruby
kireevco has joined #ruby
thams_ has joined #ruby
InhalingPixels has joined #ruby
jakolehm has joined #ruby
bearish has quit [Ping timeout: 245 seconds]
Wolland has joined #ruby
thams has quit [Ping timeout: 255 seconds]
thams_ is now known as thams
DadoCe has quit [Remote host closed the connection]
InhalingPixels has quit [Ping timeout: 260 seconds]
fold has quit [Ping timeout: 245 seconds]
mallu has joined #ruby
St_Marx has quit [Quit: Ex-Chat]
<mallu>
i have defined a variable outside of a method then assigning value to that variable inside a method. Can i call that variable from another method?
mockra_ has quit [Remote host closed the connection]
mockra has joined #ruby
ValicekB has quit [Ping timeout: 260 seconds]
GriffinHeart has quit [Remote host closed the connection]
avita1 has quit [Quit: Leaving.]
duncannz has joined #ruby
spicerack has joined #ruby
<havenwood>
mallu: you could use an instance variable like that, or pass around a local variable
baroquebobcat has quit [Quit: baroquebobcat]
mockra has quit [Ping timeout: 255 seconds]
GriffinHeart has joined #ruby
p4sh4 has joined #ruby
oo_ has quit [Ping timeout: 255 seconds]
avita1 has joined #ruby
mr-foobar has quit [Quit: Leaving...]
<pontiki>
these are called "side effects", and they're generally a bad idea as they create couplings in your code
ARCADIVS has joined #ruby
<mallu>
can you please take a look at this and see how I can achieve this? http://pastie.org/9520615
wjimenez5271 has quit [Remote host closed the connection]
wjimenez5271 has joined #ruby
JBreit has left #ruby ["Leaving"]
wjimenez_ has joined #ruby
<pontiki>
volumes_old = get_volumes(); and inside at line 4, don't assign it there. just make sure it's the last thing in the method
<havenwood>
mozzarella: it historically hasn't been consistent, but some of the third person have been deprecated, not all
Morkel has joined #ruby
<mozzarella>
ruby has so many aliases, it might want to add some more
<havenwood>
i think they've been trying to make it a bit more consistent
deric_skibotn has quit [Ping timeout: 255 seconds]
<havenwood>
at least in cases where there were aliases, they've been willing to deprecate the inconsistent one
<havenwood>
but i think some oddness is just grandfathered in, at least for 2.x
<havenwood>
can't break backwards compatibility for propriety
Takle has quit [Ping timeout: 260 seconds]
<EasyCo>
Anybody have a good read suggestion (online or otherwise) to help me wrap my head around include, extend and module composition? For example, looking through the Rails source code, each bloody module includes or extends 10 others and I'd like to pretend I understand what's happening but I don't.
<aces1up9939>
my ruby is running in version 1.8, can i set programmatically to ensure it runs 1.9? or can i use just enviornment variable?
<EasyCo>
havenwood: Cool thanks, I haven't read that one. I'll have a look.
heftig has joined #ruby
Pharaoh2 has joined #ruby
<havenwood>
EasyCo: Worth playing around with in irb/pry. A module that includes a module basically gets the same methods. A module that extends a module promotes those instance methods to module methods.
<aces1up9939>
if i do a ruby -v and it says 1.8.7 then i do not have 1.9 installed right?
spicerack has joined #ruby
<aces1up9939>
or is that pulling from the enviornment variable?
<havenwood>
aces1up9939: You may have 1.9 installed, but not selected.
<aces1up9939>
havenwood right cool how do i select it?
<havenwood>
aces1up9939: That's the currently selected binary reporting its version.
<havenwood>
aces1up9939: What distro/OS? how'd you install Ruby?
<aces1up9939>
i have centos it was awhile ago.. I believe i installed via yum
ValicekB has quit [Ping timeout: 255 seconds]
toastynerd has joined #ruby
kyb3r_ has joined #ruby
<havenwood>
aces1up9939: Do you want just one modern Ruby, or to be able to switch between Rubies?
<aces1up9939>
naa just 1.9 is fine.
<havenwood>
aces1up9939: 1.9s EOL is coming up pretty soon. Might want to just 2.0+.
<aces1up9939>
hrmm ok just don't want to break any of my code..
<havenwood>
aces1up9939: In that case, maybe consider just a ruby-install to /usr/local.
<aces1up9939>
haven't ever run it on 2.0
<havenwood>
aces1up9939: The 1.8 to 1.9 jump is harsh compared to the painless 1.9 to 2.0 to 2.1.
<havenwood>
but sure, you can bump up from 1.9 whenever
<sevenseacat>
i did that upgrade on a rails app recently
<sevenseacat>
1.8-1.9 was definitely the biggest pain point
<aces1up9939>
ok i will try 2.0 what is the best way to remove current version or is that necessary?
<aces1up9939>
yeh when i went from 1.8 to 1.9 alot of stuff broke.
<aces1up9939>
that is why i was worried.
<havenwood>
that's expected
sinkensabe has quit [Remote host closed the connection]
<havenwood>
aces1up9939: think of 1.9.3 as the 2.0 release candidate :P
<aces1up9939>
havenwood ahh ok. cool
starkhalo has quit [Ping timeout: 245 seconds]
<aces1up9939>
havenwood what is the best way to remove the current version i have? or do i need to?
<havenwood>
aces1up9939: to install 2.0 to be available in your PATH: ruby-install -i /usr/local/ ruby 2.0
<havenwood>
aces1up9939: or latest stable: ruby-install -i /usr/local/ ruby
<sevenseacat>
mallu: have you looked at what its returning?
<mallu>
yes.. it is returning strings
hiyosi has joined #ruby
* sevenseacat
raises eyebrow
saarinen has joined #ruby
<mallu>
undefined method `map' for "[nil, \"vol-bdddb3\", \"vol-8ddd0\"]":String (NoMethodError
alexju has joined #ruby
<havenwood>
mallu: what's instance_old?
ValicekB has joined #ruby
kireevco has quit [Quit: Leaving.]
* sevenseacat
backs away from discussion slowly
<mallu>
instance_old is the instance id from which I want to get the volume ids
aganov has joined #ruby
<havenwood>
mallu: an integer?
<Wolland>
mallu try compact before map
<mallu>
no string
<havenwood>
mallu: was just confused because you: "#{instance_old}"
<Wolland>
nm
<havenwood>
mallu: if it's already a string don't do all that
fabrice31 has quit [Ping timeout: 245 seconds]
timonv_ has joined #ruby
<havenwood>
mallu: line 11 i mean
<havenwood>
mallu: show the output for: p old_instance_info
<mallu>
#{instance_old} how else would I pass the instance_old to the method?
<havenwood>
mallu: just instance_old
<havenwood>
mallu: no cruft
<mallu>
ok
<aces1up9939>
havenwood ok i installed ruby 2.0 thanks for the assist.. what paths do i need to change in linux? currently ruby -v is still reporting 1.8
GriffinHeart has quit [Remote host closed the connection]
<havenwood>
aces1up9939: just add /usr/local/bin to the PATH, i think in centos that'd be editing /etc/profile?
lw has quit [Quit: s]
<Wolland>
mallu: can you post instance_old_info json
<havenwood>
prepend to the PATH*
<havenwood>
aces1up9939: often that's already the case, i guess you'll need to do it
saarinen has quit [Ping timeout: 260 seconds]
AndChat| has quit [Ping timeout: 260 seconds]
wallerdev has quit [Quit: wallerdev]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
<mallu>
[4] pry(main)> p old_instance_info("i-5456780") ["vol-456783", "vol-2345670"]
relix has joined #ruby
GriffinHeart has joined #ruby
<havenwood>
aces1up9939: to try it out: export PATH=$PATH:/usr/local/bin
<havenwood>
err
<havenwood>
aces1up9939: i mean: export PATH="/usr/local/bin:$PATH"
<Wolland>
so it's working now? I meant inside of your method
<havenwood>
aces1up9939: it's late >.>
saarinen has joined #ruby
<aces1up9939>
havenwoodv looks like it was running from usr/bin i just copied over the exectuables there.
<aces1up9939>
gem, irb, and ruby.
<aces1up9939>
thats all i need there right?
<havenwood>
aces1up9939: well.. i'd not mess with system ruby
<sevenseacat>
that sounds dangerous
<havenwood>
aces1up9939: just munge the PATH
<havenwood>
aces1up9939: or whatev :P
<aces1up9939>
hrmm ok.
mityaz has joined #ruby
<mallu>
here is the output [4] pry(main)> p old_instance_info("i-5456780") ["vol-456783", "vol-2345670"]
<sevenseacat>
any sort of manual munging like that really doesnt sound like a good idea, we have tested tools to do that
<havenwood>
aces1up9939: i'd suggest checking the canonical way to prepend /usr/local/bin to PATH in CentOS, but you could just add this line to a dotfile that gets sourced: export PATH="/usr/local/bin:$PATH"
spastorino has quit [Quit: Connection closed for inactivity]
<havenwood>
aces1up9939: or you can point chruby at wherever you'd like to install Ruby
toastynerd has quit [Ping timeout: 245 seconds]
riotjones has joined #ruby
<havenwood>
aces1up9939: dev or production?
tylerkern has quit [Quit: Connection closed for inactivity]
Macaveli has joined #ruby
thomasxie has joined #ruby
mockra_ has quit [Remote host closed the connection]
lemur has joined #ruby
<mallu>
let me ask another question.. if I create an empty array called snapshot_id, can I do something like this inside a method snapshot_id << snapshot_ids["SnapshotId"]
mockra has joined #ruby
<mallu>
created the empty array outside the method
techsethi has joined #ruby
Lewix has quit [Remote host closed the connection]
<mallu>
I'm getting " undefined local variable or method `snapshot_id' for main:Object (NameError)"
armyriad has quit [Ping timeout: 255 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IceDragon has quit [Quit: Space~~~]
<mallu>
in other words how can i call a variable array from outside a method and add values to that variable array?
<havenwood>
mallu: you've defined no `snapshot_id`, but we've no way of knowing what's going on
thomasxie has quit [Client Quit]
<havenwood>
haven't seen any code where there's a snapshot_id
meinside has joined #ruby
<mallu>
havenwood.. it is general question... how can I call a variable array which is defined somewhere and assign values to that array from a method?
<mark06>
Mon_Ouie: I heard about TERM != dumb, do you have any document stating that's a reliable way to know that there are color support (at least basic colors)
bearish has quit [Remote host closed the connection]
bearish has joined #ruby
<Mon_Ouie>
It probably isn't that reliable :p It's more like, anytime some application sets TERM to dumb, you can expect that there will be no support for colors, but I imagine there are other terminals with no color support
sk87 has joined #ruby
<mark06>
maybe a more conservative/better way is to check for common terminal types... what are the most common beyond xterm?
Takle has joined #ruby
<Mon_Ouie>
I think that makes it easier to miss things. I'd start with TERM != dumb and if I find any other terminal that doesn't support colors, add it to the list
charliesome has joined #ruby
max06 has quit [Ping timeout: 255 seconds]
<mark06>
I prefer that the user does not see colors but have the program working than they see raw ansi escapes and wat on it
Takle has quit [Remote host closed the connection]
<izzol2>
I'm using only self.iso and self.epoch from other class.
<Fractional>
How can you return true or false from a class's constructor? I am trying to do the following: if Foo.new(true) then ..
<Fractional>
The return value would of course depend on something else other than the instance of the class successfully creating.
<Mon_Ouie>
That doesn't make sense, new can't both return a new instance and return your other value
<Fractional>
Mon_Ouie: It does not need to return a new instance.
<izzol2>
Fractional: I guess you need to put your "true return" to the method, and then call the method from that class.
<Mon_Ouie>
Then don't use new
<Mon_Ouie>
Call it something else that isn't going to be misleading
Takle has quit [Remote host closed the connection]
<Fractional>
Mon_Ouie: Ok, thanks!: )
<tobiasvl>
mdw: #rubyonrails
<izzol2>
Fractional: if Foo.method == true ...
<mdw>
tobiasvl thanks
<tobiasvl>
Fractional: if new didn't return the created instance, the constructor wouldn't be of much use ;)
<Fractional>
Now I need to find a great name for the method, ugh :P
InhalingPixels has quit [Ping timeout: 268 seconds]
timonv_ has quit [Remote host closed the connection]
<Fractional>
tobiasvl: Brainfreeze :'<
narcan has joined #ruby
Xeago has joined #ruby
Takle has joined #ruby
pwestlun1 has joined #ruby
pwestlund has quit [Read error: Connection reset by peer]
<izzol2>
Anyone? :-)
<workmad3>
Fractional: also, if new doesn't return the instance, it throws an exception, iirc
<workmad3>
Fractional: unless there's something you're doing in the constructor that is causing a status flag of some kind to be set? ;)
<tobiasvl>
izzol2: it looks fine I think
<tobiasvl>
izzol2: why do you set @time in self.time though?
<tobiasvl>
you never use it, you just use the return value
luckyruby has quit [Remote host closed the connection]
<Fractional>
workmad3: Thanks, no nothing causing a status flag :P Will simply make new method for it
mferrier has joined #ruby
luckyruby has joined #ruby
<workmad3>
izzol2: I'd say it's slightly more idiomatic to have the public methods at the top using the default (public) visibility and then a 'private' keyword afterwards to change the visibility of all methods after that point
<izzol2>
tobiasvl: you right. No need to use @time there.
Fractional has quit [Remote host closed the connection]
lemur has joined #ruby
<tobiasvl>
yes, agree with workmad3
ldnunes has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
toastynerd has joined #ruby
<izzol2>
Ahh yes. It's better to put public on top without public as they are in default public, and in the end private.
<izzol2>
Make sense.
bogeyd6_ has quit [Read error: Connection reset by peer]
<izzol2>
But I still have a problem to understand when I should use private :)
cocotton has joined #ruby
<Cope>
has active_support changed its name or something? trying to bundle install and getting a failure to get active_support; nor can I gem install it.
<workmad3>
izzol2: 'private' declares the methods as being part of the implementation details of the class, IMO
<izzol2>
For example if I have a class where I don't use attr_accessor. It's better to add it ( let's say :test) and then private :test ?
<workmad3>
Cope: no... but then it's been called 'activesupport' since about version 1 I believe ;)
luckyruby has quit [Ping timeout: 264 seconds]
mferrier has quit [Ping timeout: 260 seconds]
Ankhers has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
<workmad3>
izzol2: personally, I prefer to think of it as 'does this method need to be public?' rather than 'does this method need to be private?'
_Kerber0s_ has quit []
<Cope>
workmad3: so I'd expect active_support in a gemfile to be a mistake then? Wondering how this ever worked
Kerber0s has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
<workmad3>
Cope: active_support 3.0.0 was accidentally released and yanked... so it's possible you were using that version
heftig has quit [Ping timeout: 272 seconds]
cocotton has quit [Remote host closed the connection]
<izzol2>
workmad3: so all methods that I'm trying to call from other classes should be public and all methods that I'm trying to call from other methods in the same class are mostly private?
WillAmes has quit [Remote host closed the connection]
narendraj9 has joined #ruby
WillAmes has joined #ruby
Lewix has joined #ruby
Xeago has quit [Remote host closed the connection]
<workmad3>
izzol2: pretty much
MCDev has joined #ruby
sarkis has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
<workmad3>
izzol2: if a method is expected to be called by another object, it needs to be public. If the method is only intended to implement functionality then it's most likely private
Lewix has quit [Remote host closed the connection]
<workmad3>
izzol2: if you're writing libraries and other widely used code, it's also *much* easier to make a private method public than it is a public method private
timonv_ has joined #ruby
phoo1234567 has joined #ruby
sectionme has joined #ruby
hiyosi has joined #ruby
phoo1234567 has quit [Max SendQ exceeded]
phoo1234567 has joined #ruby
timonv_ has quit [Remote host closed the connection]
Neomex has joined #ruby
InhalingPixels has joined #ruby
timonv_ has joined #ruby
amundj has joined #ruby
Xeago has joined #ruby
hiyosi has quit [Ping timeout: 252 seconds]
sparrovv has joined #ruby
selasi has joined #ruby
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
olivier_bK has joined #ruby
sectionme has quit [Ping timeout: 240 seconds]
aclearman037 has joined #ruby
sparrovv has quit [Read error: Connection reset by peer]
sparrovv has joined #ruby
Sgeo_ has quit [Read error: Connection reset by peer]
sparrovv has quit [Remote host closed the connection]
sparrovv has joined #ruby
St_Marx has joined #ruby
yokel_ has quit [Ping timeout: 245 seconds]
HelperW has joined #ruby
claymore has joined #ruby
DevAntoine has joined #ruby
charliesome has joined #ruby
bluenemo has joined #ruby
freerobby has joined #ruby
rylev has joined #ruby
sparrovv_ has joined #ruby
sparrovv has quit [Ping timeout: 260 seconds]
kriskropd has joined #ruby
sparrovv_ has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
jhass|off is now known as jhass
hoelzro_ is now known as hoelzro
britneywright has joined #ruby
Lewix has joined #ruby
agjacome has quit [Quit: leaving]
Scripore has quit [Ping timeout: 245 seconds]
mark06 has left #ruby [#ruby]
arup_r has quit [Remote host closed the connection]
<aep>
can i call an enclosing class in a do block somehow?
<aep>
i mean methods of that class
workmad3 is now known as wm3|away
<aep>
class A ; for i in bla do ; someMethodOfA
cirn0 has joined #ruby
sectionme has joined #ruby
mark06 has joined #ruby
cocotton has joined #ruby
<mark06>
why do I get no superclass method `<<' for []:Array (NoMethodError) when overwriting <<?
<shevy>
how did you overwrite it
<shevy>
aep class A; class << self; def bla; end; end
<shevy>
hmm I might have forgotten an end
<aep>
shevy: oooh thanks
cocotton has quit [Remote host closed the connection]
<aep>
nope same thing. undefined method `validates_integrity_of' for #<Class:0x007f0bfd333ed8> (NoMethodError)
meinside has quit [Quit: Connection closed for inactivity]
startupality has joined #ruby
<aep>
class A ; class << self ; [1,2].each do |i| validates_integrity_of i
<aep>
where validates_integrity_of is a member of A
claymore has quit [Ping timeout: 272 seconds]
<aep>
err no wait, it isnt
<shevy>
where do you def
startupality has quit [Client Quit]
<aep>
that method is defined somewhere else
<aep>
trying to figure out how
<shevy>
well, if it is a method
<shevy>
on an object
<shevy>
then the notation is usually object.method_name_here
ohvlad has joined #ruby
oponder has quit [Ping timeout: 255 seconds]
<aep>
its a DSL that basically works with class A; that_method ; end
<shevy>
you have instance_eval and class_eval to support such DSL
freerobby has quit [Quit: Leaving.]
cirn0 has quit [Ping timeout: 276 seconds]
<shevy>
but usually it is best if you make a minimal example first, and then put it into your real class
<benzrf>
aep: y are you using for..in
sk87 has joined #ruby
<aep>
because i want to avoid replicating a whole bunch of code
<siwica>
Since some of you are probably using RubyMine as an IDE: I have included some other ruby files with "require 'require_all'; require_all 'foo_directory'". Why does auto-completion does not work for the classes I am using from withing the directory foo_directory?
Neomex has quit [Read error: Connection reset by peer]
sarkis has quit [Ping timeout: 245 seconds]
cuppscakes has joined #ruby
Neomex has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
pu22l3r has quit [Ping timeout: 245 seconds]
cuppscakes has quit [Max SendQ exceeded]
TheNet has quit [Ping timeout: 240 seconds]
Jameser` has quit [Remote host closed the connection]
<mallu>
getting "`block in create_snapshot': undefined local variable or method `snapshot_id' for main:Object (NameError)"
<toretore>
it's pretty obvious
<apeiros>
shevy: sure. you come across rather arrogant this way, but go ahead.
<toretore>
look over your code one more time
<apeiros>
pretend to speak for others…
<shevy>
apeiros did I tell you for who to speak?
<toretore>
look at the code, now look at the error, now at the code again
<shevy>
apeiros please speak for the penguins
<jhass>
mallu: the variable or method snapshot_id is undefined
baroquebobcat has joined #ruby
DevAntoine has quit [Read error: Connection reset by peer]
anaeem1_ has joined #ruby
<mallu>
but I'm creating snapshot_id as an array before the method
<workmad3>
<linduxed>
so if have a modul nested inside a module, like Fruit::Banana or something like that and i have some class methods on the Banana module
<mallu>
Can't I call it inside the method?
<linduxed>
i'd like to test that with RSpec
<toretore>
mallu: look more
<workmad3>
mallu: you can't access local variables from outside a 'def' inside it
<shevy>
right but not for "snapshot_id" mallu
<workmad3>
mallu: you lose the scope
lemur has joined #ruby
<jhass>
mallu: they're called _local_ variables for reason
<linduxed>
the problem is it that when i do `describe Banana do` i get a NameError
<apeiros>
shevy: I guess you're best ignored anyway.
<linduxed>
and yes, i'm wrappnig the describe with a `module Fruit` first
<toretore>
oh
<linduxed>
it seems as if i have to turn the Banana module into a class
<mallu>
so how do I call snapshot_id which is an empty array fron inside the method?
<linduxed>
otherwise RSpec nameerrors
<jhass>
linduxed: describe Fruit::Banana?
<linduxed>
any ideas as to why or how i could solve this?
<workmad3>
mallu: pass it in
lw has joined #ruby
<linduxed>
jhass: i'll try that
<toretore>
linduxed: `describe Fruite::Banana` ?
<toretore>
damit
<toretore>
2late
Wolland_ has joined #ruby
<mallu>
workmad3 Please explain
<jhass>
mallu: pass it in or make a class with it as instance variable
<linduxed>
OOH WAIT
<linduxed>
damn it
warprobot has quit [Read error: Connection reset by peer]
<linduxed>
i don't have my LOAD_PATH set up
<linduxed>
that explains things
* linduxed
facepalms
SilkFox_ has quit [Ping timeout: 260 seconds]
warprobot has joined #ruby
warprobot has quit [Remote host closed the connection]
<mallu>
sorry to bug.. what does "pass it in" in mean?
<toretore>
mallu: first, paste the entire file which contains your code
<jhass>
mallu: you already pass volumes_old in
felixjet has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
felixjet has joined #ruby
<toretore>
i'm guessing he's not the one calling create_snapshot
hellangel7 has quit [Quit: Leaving]
Wolland has quit [Ping timeout: 260 seconds]
lw has quit [Client Quit]
spyderman4g63 has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
albedoa has joined #ruby
zz_anildigital is now known as anildigital
shaileshg has quit [Quit: Connection closed for inactivity]
shredding has joined #ruby
sleepee has quit [Ping timeout: 240 seconds]
lolmaus has quit [Quit: Konversation terminated!]
thams_ has joined #ruby
lolmaus has joined #ruby
sleepee has joined #ruby
<siwica>
Sorry for repeating my question.
<siwica>
Since some of you are probably using RubyMine as an IDE: I have included some other ruby files with "require 'require_all'; require_all 'foo_directory'". Why does auto-completion does not work for the classes I am using from withing the directory foo_directory?
pu22l3r has joined #ruby
mallu has quit [Ping timeout: 246 seconds]
sarkis has joined #ruby
ffranz has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
<shevy>
I don't use RubyMine
<shevy>
I think most people use some other editor here, vim and sublime are very widespread
failshell has joined #ruby
AlvaroFernandoMS has joined #ruby
marr has quit [Ping timeout: 245 seconds]
Sawbones has joined #ruby
thams has quit [Ping timeout: 260 seconds]
kaspertidemann has joined #ruby
momomomomo has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
failshell has quit [Client Quit]
thams_ has quit [Ping timeout: 260 seconds]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
krisquigley has quit [Remote host closed the connection]
dte has quit [Ping timeout: 268 seconds]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
lolmaus has quit [Quit: Konversation terminated!]
krisquigley has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
jottr_ has joined #ruby
toastynerd has joined #ruby
GinoMan has joined #ruby
lmickh has joined #ruby
threesixes has quit [Remote host closed the connection]
amundj has quit [Ping timeout: 260 seconds]
pu22l3r has quit [Ping timeout: 268 seconds]
dte has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
jottr has quit [Ping timeout: 240 seconds]
fumk has joined #ruby
tlarevo has joined #ruby
JohnFord has joined #ruby
krisquigley has quit [Ping timeout: 276 seconds]
sleepee has quit [Ping timeout: 245 seconds]
maroloccio has joined #ruby
pranny has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
sleepee has joined #ruby
enebo has joined #ruby
<benzrf>
dooooon't use rubymine
<benzrf>
use vim
<benzrf>
vim is a great editor
bal has quit [Quit: bal]
<benzrf>
i cant imagine that IDEs would help much in ruby
riotjones has quit [Quit: waT]
<benzrf>
it's too dynamic
sevenseacat has quit [Quit: Leaving.]
anildigital is now known as zz_anildigital
<mark06>
thanks all
mark06 has left #ruby [#ruby]
AlvaroFernandoMS has left #ruby [#ruby]
lolmaus has joined #ruby
havenwood has joined #ruby
sambao21 has joined #ruby
itspots has joined #ruby
krisquigley has joined #ruby
fumk has quit [Ping timeout: 276 seconds]
Sht0 has quit [Ping timeout: 245 seconds]
<OffTheRails>
+1 for sublime. I used Rubymine for a while. Not sure about the argument Ruby is too dynamic for an IDE. Rubymine made some very intelligent suggestions when I used it
rylev has quit [Remote host closed the connection]
Ankhers has quit [Ping timeout: 264 seconds]
<linduxed>
i'd say it the question about whether he should use an IDE or not depends entirely on what the purpose is
Takle has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
Ankhers has joined #ruby
<linduxed>
if he/she is jumping into existing code and previously didn't work with ruby or something, or maybe even sat in an IDE before, i'd say it's fine to continue to do so
dte has quit [Remote host closed the connection]
<linduxed>
on the other hand, the fact that you most definitely don't need an IDE for coding ruby makes choosing something which is nothing but an editor an option
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
<linduxed>
besides, if it's a beginner asking, there's value to *not* having tools do stuff for you
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
<linduxed>
one learns more that way
<OffTheRails>
agreed, good points
icebourg has joined #ruby
avita1 has joined #ruby
<linduxed>
if you're past that, have gained some experience then the choice doesn't matter that much
icebourg has quit [Max SendQ exceeded]
<linduxed>
i've coded ruby for a good while now and my vim is so loaded with various plugins, bindings and helpers that it might as well be considered to be an IDE
anaeem1_ has quit [Remote host closed the connection]
icebourg has joined #ruby
rylev has joined #ruby
pcw888 has joined #ruby
LekeFly_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<OffTheRails>
true. same here with sublime
mallu has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
asdfsdf has joined #ruby
<OffTheRails>
I've tried to get into vim multiple times but can't handle the initial hit to productivity
<mallu_>
as you can see I need to use snapshot_id to create volumes
sigurding has joined #ruby
Cache_Money has joined #ruby
tokik has quit [Ping timeout: 260 seconds]
<jhass>
I don't see create_snapshot being called at all
<siwica>
shevy: benzrf: OffTheRails: I might try out Sublime sometime, but I am actually quite satisfied with it and just payed for a license. I am using Emacs elseways but it takes a lot of effort to properly set it up for a new language and RubyMine lets me use Emacs key bindings...
chrishough has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
<mallu_>
the way I'm calling is... at the end of the script old_instance_info(instance_old) create_snapshot(volumes_old) create_volume
fumk has joined #ruby
doodlehaus has joined #ruby
fumk has quit [Max SendQ exceeded]
xenomorph is now known as {xenomorph}
toastynerd has quit [Ping timeout: 240 seconds]
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
jmbrown412 has joined #ruby
wjimenez5271 has joined #ruby
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
cirn0 has quit [Ping timeout: 276 seconds]
ceej___ is now known as ceej
andikr has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
geggam has quit [Remote host closed the connection]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
mikeg has joined #ruby
endash has quit [Quit: endash]
fumk has joined #ruby
fumk has quit [Max SendQ exceeded]
endash has joined #ruby
{xenomorph} is now known as xenomorph
endash has quit [Client Quit]
obscured has joined #ruby
timonv_ has joined #ruby
lw has joined #ruby
geggam has joined #ruby
MCDev has joined #ruby
Hanmac has quit [Quit: Leaving.]
mikeg has quit [Read error: Connection reset by peer]
<aboudreault>
emm, currently have a API that allow us to query group_id=X or group_id=x,y,z. I would like to add a way to query everything that *doesn't have* any group_id set.
<aboudreault>
any api best practices?
rylev has quit [Ping timeout: 245 seconds]
Takle has joined #ruby
mikeg has joined #ruby
slash_beep has quit [Changing host]
slash_beep has joined #ruby
pu22l3r has quit [Ping timeout: 260 seconds]
Moon_Doggy has joined #ruby
baroquebobcat has joined #ruby
yacks has joined #ruby
<Moon_Doggy>
i've install a pkg called ruby/dict, when i run rdict i get a "/usr/bin/rdict:130:in `require': no such file to load -- dict (LoadError)", but if i cd to where dict.rb is and run rdict it works. how can i solve this?
qmfnp has joined #ruby
sigurding has quit [Quit: sigurding]
rylev has joined #ruby
DaniG2k has joined #ruby
p0sixpscl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
Moon_Doggy: When you say a pkg, you don't mean a gem?
<Moon_Doggy>
havenwood: no rpm
jeroenvisser101 has joined #ruby
deric_skibotn has joined #ruby
<jhass>
that sounds as you have . in the load path which sounds as if you have ruby 1.8 which is out of official support
maniacal_ has joined #ruby
<Moon_Doggy>
jhass: 1.8.7
<havenwood>
indeed
DaniG2k has quit [Client Quit]
shackleford has quit [Remote host closed the connection]
<eam>
Moon_Doggy: centos and epel?
<Moon_Doggy>
eam: actually mint
<eam>
most likely you've installed an rpm built against a different ruby than your system provides
<Moon_Doggy>
used alien to convert the rpm to deb
pranny has quit [Quit: Leaving.]
<eam>
yeah, that will not work -- it puts it in different paths
xcv has quit [Remote host closed the connection]
<eam>
your best bet is to use gem
<eam>
a gem built against a ruby binary will go into certain paths hardcoded at compile time
<jhass>
well or whatever GEM_HOME is set to at install time
<eam>
you can work around it using GEM_HOME and/or setting $:
<eam>
yeah
<Moon_Doggy>
eam: so sounds like it would be easier if i just grabbed source
<eam>
Moon_Doggy: yes
mikeg has quit [Ping timeout: 264 seconds]
<jhass>
but yeah, just gem install or gem2deb
<eam>
you really want gems built against the actual ruby binaries you're using
mikeg has joined #ruby
<eam>
prebuilt is OK only if your distro guarantees the gems match the binary built against
JoshGlzBrk has joined #ruby
sinkensabe has quit [Remote host closed the connection]
shackleford has joined #ruby
maniacal_ has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
jeroenvisser101 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
timonv_ has quit [Remote host closed the connection]
axsuul has quit [Read error: Connection reset by peer]
mikeg has quit [Ping timeout: 252 seconds]
timonv_ has joined #ruby
krisquigley has quit [Remote host closed the connection]
krisquigley has joined #ruby
IceDragon has joined #ruby
qmcnti has quit [Remote host closed the connection]
rebelshrug has joined #ruby
omosoj has joined #ruby
pietr0 has joined #ruby
AlexBlom has joined #ruby
aspires has joined #ruby
saarinen has joined #ruby
bricker`work has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Kricir has quit [Remote host closed the connection]
wjimenez5271 has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 272 seconds]
lmickh has quit [Remote host closed the connection]
shackleford has quit [Remote host closed the connection]
daxroc has quit [Changing host]
daxroc has joined #ruby
wjimenez5271 has quit [Ping timeout: 255 seconds]
max061 has quit [Ping timeout: 245 seconds]
rockdon_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<mallu_>
jhass : what is the best way to separate creating snapshot and creating volumes from snapshot? There are times we only want to take snapshot not create volumes from the snapshot
toastynerd has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
<jhass>
mallu_: time to use an option parser (trollop and slop are popular)
workmad3 has quit [Quit: leaving]
Steve has joined #ruby
Kerber0s has quit [Remote host closed the connection]
moritzschaefer has joined #ruby
<mallu_>
jhass as it stands the current method migrator takes snapshot and volume from that snapshot when calling migrator method
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
<mallu_>
can we seperate those two functions?
momomomomo has quit [Quit: momomomomo]
Rollabunna has joined #ruby
qmfnp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
sure, the process is abstracted
dawkirst has quit [Remote host closed the connection]
<jhass>
use an option parser to get flags that control the behavior
Aaaal has joined #ruby
baroquebobcat has joined #ruby
Wolland_ has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
sailias has quit [Quit: Leaving.]
sailias has joined #ruby
Wolland has joined #ruby
DrShoggoth has quit [Ping timeout: 272 seconds]
Photism has joined #ruby
michaeldeol has joined #ruby
speakingcode has joined #ruby
OffTheRails has quit [Ping timeout: 268 seconds]
Rollabunna has quit [Ping timeout: 240 seconds]
mattmcclure has joined #ruby
mallu has joined #ruby
<Moon_Doggy>
jhass eam, that did it, source had a install.rb made it easy
mallu_ has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
<mallu>
jhass: sorry to ask this dumb question; is it possible to just call migrate.snapshot?
Wolland has quit [Ping timeout: 264 seconds]
<Moon_Doggy>
thanks again
Moon_Doggy has left #ruby ["Leaving"]
<jhass>
mallu: if you don't make it private
<jhass>
mallu: I only worked from what you showed, I can't magically know all your requirements
avita1 has joined #ruby
momomomomo has joined #ruby
<jhass>
mallu: so take this as an example on how you _can_ structure things, _not_ on how it _has_ to be
OffTheRails has joined #ruby
alex88 has quit [Quit: Leaving...]
<mallu>
jhass thanks
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gsd has joined #ruby
sambao21 has joined #ruby
gaussblurinc1 has quit [Quit: Leaving.]
JonnieCache has quit [Ping timeout: 245 seconds]
timonv_ has quit [Remote host closed the connection]
xcv has joined #ruby
bearish has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
bearish has joined #ruby
bearish has quit [Remote host closed the connection]
Phrogz has quit [Ping timeout: 246 seconds]
bearish has joined #ruby
Xeago_ has joined #ruby
SouL has joined #ruby
jpic has quit [Ping timeout: 240 seconds]
gnash has joined #ruby
luckyrub_ has joined #ruby
luckyrub_ is now known as luckyruby_
jpic has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
luckyruby has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
bearish has quit [Ping timeout: 245 seconds]
moritzschaefer has quit [Ping timeout: 268 seconds]
mikecmpbll has quit [Ping timeout: 260 seconds]
goshdarnyou has quit [Quit: Connection closed for inactivity]
<kenneth>
but then i'd have to `use` my refinements at the top of every source file. i'm looking for a way around that
Guest74006 has joined #ruby
Lulzon has quit [Ping timeout: 240 seconds]
<kenneth>
havenwood: yeah, i'm aware of hamster and adamantium, but the question here is about enfocring that those are actually used, because it's easy to just write {} or [] by mistake
<havenwood>
siwica: generally, you'd use nginx or apache to reverse proxy to your rack webserver of choice
Hanmac has quit [Ping timeout: 276 seconds]
<havenwood>
kenneth: aha, gotcha
<havenwood>
kenneth: interesting
<siwica>
havenwood: ok, I see
ddd has joined #ruby
dkamioka has joined #ruby
nemesit|znc has joined #ruby
<siwica>
havenwood: Are you aware of any tutorials for somebody who has not setup a reverse proxy to a rack webserver?
pasties_ is now known as pasties
<havenwood>
siwica: you could use certain rainbows! setups to load balance and serve slow connections, but i think using nginx is most popular
Rollabunna has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
asterite has joined #ruby
DrShoggoth has joined #ruby
djbkd has joined #ruby
<kenneth>
actually, gotta run on an errand. i'll think more about it, and log back on when i'm done
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mityaz_ has joined #ruby
<havenwood>
siwica: nginx/unicorn or nginx/puma are great options
radic has quit [Ping timeout: 264 seconds]
hornairs has quit [Quit: hornairs]
mupkoo has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 250 seconds]
Lulzon has joined #ruby
<siwica>
havenwood: its only needed for a super simple application and I am gonna deploy it at some persons server that probably only has apache installed. So I wonder what would be the benefit of using nginx instead?
<havenwood>
siwica: don't bother
<siwica>
ok
<siwica>
havenwood: thanks, I will have to read some stuff I guess
mityaz_ has quit [Client Quit]
fsapo has quit [Remote host closed the connection]
<havenwood>
siwica: i prefer nginx but if you're just adding an app to an existing apache setup just reverse proxy to your puma or unicorn app's port or socket
<havenwood>
in apache
DrShoggoth has quit [Read error: Connection reset by peer]
DrShoggoth has joined #ruby
<siwica>
havenwood: sounds reasonable
<havenwood>
siwica: or the passenger route you could use the passenger apache module
<havenwood>
siwica: there are multiple solid, fast options
<siwica>
havenwood: ok, thanks!
<siwica>
which one has the greater community?
<havenwood>
siwica: unicorn, puma and thin are all top tier
<siwica>
so passenger is not?
<havenwood>
siwica: then passenger has the best enterprise support
Rollabunna has quit [Ping timeout: 268 seconds]
bearish has quit [Remote host closed the connection]
<havenwood>
siwica: passenger by default is less performant, only because they choose very conservative, low-memory footprint options
fsapo has joined #ruby
<havenwood>
siwica: if you bother to tune it just a little, unicorn like performance
<siwica>
havenwood: performance is not much of an issue in my case so I might wanna stick to the best documented one
IceDragon has quit [Ping timeout: 246 seconds]
<havenwood>
siwica: passenger is installed by default on a lot of vps setups, they prioritized low system resources just for the default setup
Spami has quit [Quit: This computer has gone to sleep]
ptrrr is now known as ptr
<siwica>
havenwood: ok
<havenwood>
siwica: i favor unicorn and puma personally
jottr_ has joined #ruby
<havenwood>
or torqbox if fantastic in jruby land
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
or puma
<siwica>
havenwood: great. I will give them a closer look
radic has joined #ruby
IceDragon has joined #ruby
<havenwood>
siwica: you said performance isn't much of an issue, so no matter, but torqbox's performance is top
sambao21 has joined #ruby
<havenwood>
siwica: what os/distro?
paulfm has joined #ruby
<siwica>
havenwood: ok, but its just a uni project so there will barely be more than a couple requests per day
rockdon_ has quit [Remote host closed the connection]
<Eiam>
I use passenger for all my ruby apps
<siwica>
havenwood: dont know yett
<Eiam>
(and my django ones)
<Eiam>
no complaints so far..
Mon_Ouie has quit [Quit: WeeChat 1.0]
<havenwood>
siwica: yeah, you can't go wrong. we are lucky to have so many solid options. you can also very easily switch from one to the other, they're just rack adapters.
<siwica>
havenwood: might deploy on my raspberry pi first, this one has Raspbian ;)
Zesty has joined #ruby
<havenwood>
siwica: try a few, pick one that works for your app - though at the rates you're talking, the stdlib webrick would suffice ;P
rockdon_ has joined #ruby
jottr_ has quit [Ping timeout: 245 seconds]
mityaz_ has joined #ruby
Hanmac has joined #ruby
<siwica>
havenwood: alright, thanks a bunch
goshdarnyou has joined #ruby
<havenwood>
siwica: i'd prolly puma then, since it comes with jungle, a ready-to-go upstart setup
<kenneth>
so anybody have any thoughts on my question? i'd like to use immutable data structures (such as hamster) throughout my codebase. that's fine, but i'd like to actually *enforce* this in all our codebase, without breaking any third-party libraries. i was thinking one way to do this would be through refinements, by refining all mutable collection methods to throw an exception; but i'd have to `using` my refinement at the top of every source file
ssvo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
jhass: thank you
hiyosi has quit [Ping timeout: 268 seconds]
<kenneth>
since my entire codebase is namespaced to a module, i'd like a way of saying, *within this module, as it's re-opened, use the refinement*
nanoyak has quit [Quit: Computer has gone to sleep.]
bricker`work has quit [Ping timeout: 260 seconds]
Kricir has quit [Remote host closed the connection]
chrishough has quit [Ping timeout: 245 seconds]
gurix has quit [Quit: gurix]
dorei has joined #ruby
Kricir has joined #ruby
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<y_nk>
shevy: i just joined the company, my CTO has set all the servers to slack... and now he said he wants to monitor the fleet with sensu :/
<shevy>
default slackware already has a ruby installed btw
elaptics is now known as elaptics`away
emmesswhy has quit [Quit: This computer has gone to sleep]
<shevy>
perhaps ask your super clever boss why he needs to want a "ruby-dev" package
<shevy>
it sure enough makes more sense on debian
<y_nk>
well it doesnt seem shipped by default on the 13.37 distro i've found
<y_nk>
it sure does, but i can't argue changing so many production servers right now... i'm 2 months olded in the company :D
spyderma_ has joined #ruby
Wolland has joined #ruby
<shevy>
current slackware is "Slackware 14.1"
<y_nk>
(so many => 50+)
Kerber0s has joined #ruby
<shevy>
so let me get it straight ;)
nanoyak has joined #ruby
synergyz has quit [Remote host closed the connection]
<shevy>
none of those computers does have ruby
<y_nk>
i've been taking the distro it's installed to run my installation tests from a vagrant vm
synergyz has joined #ruby
<y_nk>
then when it'll be "stable" i'll run it with pssh or smthg like that.
SouL has joined #ruby
jottr_ has joined #ruby
<y_nk>
(my evil plan is to change all to debian/puppet but i need time)
pu22l3r has quit [Ping timeout: 264 seconds]
_5kg has joined #ruby
mupkoo has quit []
<y_nk>
shevy: ... so you think it's rather "technically impossible" or just "pain in the ass doable" ?
mijicd has quit [Quit: leaving]
omosoj has quit [Ping timeout: 260 seconds]
<izzol2>
sensu is pretty cool :-)
<shevy>
well y_nk
<shevy>
I still don't know if you have ruby installed or not
<shevy>
you said 13.37 does not have ruby installed
<y_nk>
i've 1.8.7 running on my 13.37
wallerdev has quit [Quit: wallerdev]
<shevy>
so without ruby, any "ruby-dev" package wouldn't make sense
<shevy>
ok so you have ruby
spyderman4g63 has quit [Ping timeout: 260 seconds]
<y_nk>
there is a "slackpkg" kind-of-aptget in there... only 1.8.7 was available so i got it
<shevy>
hehehe
Wolland has quit [Ping timeout: 246 seconds]
<izzol2>
y_nk: why not to use rvm or even better on production rbenv ?
<y_nk>
izzol2: rvm can be installed on slackware ?
<y_nk>
shevy: if that can help, the full package name is "ruby-1.8.7_p174-i486-1" (i guess it's minor, but still...)
<izzol2>
y_nk: I think so :-)
<y_nk>
izzol2: ok lemme try on my vm :p
tlarevo has quit [Remote host closed the connection]
chrishough has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tlarevo has joined #ruby
toastynerd has quit [Remote host closed the connection]
<shevy>
y_nk well ruby is long past 1.8.7
<shevy>
and I am still not sure about the problem
<Hanmac>
1.8.7 versions should be killed on sight! ;P
<shevy>
if 1.8.7 works for you?
ssvo has joined #ruby
seamon has joined #ruby
<y_nk>
it seems like, to install sensu
timonv_ has quit [Remote host closed the connection]
<y_nk>
i have to type "gem install sensu" (so, gem package manager)
saarinen has quit [Quit: saarinen]
<y_nk>
when doing that, it looks compiling some things, native extensions, like plugins maybe.
<shevy>
aha
<shevy>
then look at sensu first
<y_nk>
and it fails. it's said it requires something called "ruby-dev" and i don't know what that package is. the only thing i know is that it should be installed through apt-get (lol@slackware)
sambao21 has quit [Quit: Computer has gone to sleep.]
<y_nk>
yep got it
lmickh has quit [Remote host closed the connection]
<shevy>
it fails for me at eventmachine
<y_nk>
yes, same
radic has joined #ruby
whatasunnyday has quit [Quit: whatasunnyday]
<y_nk>
(i'm still trying to reinstall ruby with rvm as izzol2 said, but i fucking even need to install curl as it's not provided by default... wtf is wrong with this distro)
MCDev has joined #ruby
<shevy>
aha I get my error
<shevy>
ld.gold: error: cannot find -lcrypt
<shevy>
seems I dont have crypt.so right now, can't help there
<shevy>
in eventmachine, download the gem
GriffinHeart has joined #ruby
<shevy>
cd eventmachine-1.0.3/ext/
radic_ has quit [Ping timeout: 260 seconds]
<shevy>
run "ruby extconf.rb"
<shevy>
some error will be logged
<shevy>
look into the file: mkmf.log
<shevy>
the real error will be stored there
zoo-zed has quit [Ping timeout: 240 seconds]
TMD has joined #ruby
<y_nk>
mhm ok
djbkd has quit [Remote host closed the connection]
<y_nk>
i need some time to perform that... it's like... i need to install dozens of soft just to perform a single task... gngngng distro
saarinen has quit [Quit: saarinen]
toastynerd has joined #ruby
hiyosi has joined #ruby
spyderma_ has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
TaxmanBD has quit [Ping timeout: 246 seconds]
GriffinHeart has quit [Ping timeout: 252 seconds]
saarinen has joined #ruby
tfittsy has joined #ruby
rubytor has joined #ruby
whatasunnyday has joined #ruby
<y_nk>
GODDAMN SLACK
wallerdev has joined #ruby
sambao21 has joined #ruby
heftig_ has joined #ruby
Takle has quit [Remote host closed the connection]
<tfittsy>
is there an easy way to replace a/multiple hash values if the values contain or equal a given value, example {:color => 'Red', :shape => 'Shape Not Present'} goes to {:color => 'Red', :shape => nil}.
krisquigley has joined #ruby
chipotle has quit [Quit: cya]
moted has quit []
Takle has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
heftig has quit [Ping timeout: 240 seconds]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jhass>
tfittsy: not really, I'd go for keys = hash.select {|_, v| v == x }.map(&:first); hash.merge(keys.map {|k| [k, nil] }.to_h) I guess
Spami has quit [Quit: This computer has gone to sleep]
gsd has joined #ruby
krisquigley has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
<hakunin>
is there a good ruby library for supervising your shell-outs?
cuppscakes has quit [Quit: Whoops, AFK.]
<hakunin>
e.g. - tracking ram consumption, uptime of shelled-out process
<hakunin>
kill it if anything
<hakunin>
but not standalone tools like god, bluepill
<hakunin>
tried google/github-search but hard to find the right terms
avita1 has joined #ruby
hiyosi has quit [Ping timeout: 255 seconds]
u6aBeWPy has joined #ruby
avita1 has quit [Read error: Connection reset by peer]
avita1 has joined #ruby
moted has joined #ruby
ghr has joined #ruby
Rollabunna has joined #ruby
<y_nk>
@izzol2 : well... it's like when you don't have "getent" installed, you can't make a clean install of rvm. (i hate slack)
endash has quit [Quit: endash]
bking39116 has quit [Ping timeout: 272 seconds]
moted has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
ptierno_ has quit [Quit: leaving]
<havenwood>
tfittsy: or: hash.map { |k, v| [k, v == x ? nil : v] }.to_h
Kricir has joined #ruby
ptierno_ has joined #ruby
moted has joined #ruby
ht has quit [Remote host closed the connection]
gccostabr has quit [Quit: ZZZzzz…]
dte has joined #ruby
<tfittsy>
havenwood: success, thanks. Just what I was looking for.
St_Marx has quit [Quit: Ex-Chat]
Kricir_ has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
Rollabunna has quit [Ping timeout: 276 seconds]
andrewlio has quit [Quit: Leaving.]
<izzol2>
y_nk: what about rbenv?
thumpba has joined #ruby
<izzol2>
I'm using it on the production. RVM only on dev (vagrant).
djbkd has joined #ruby
blackmesa has quit [Quit: WeeChat 1.0]
<izzol2>
Not sure about the slack. Never used it :(
zorak8 has quit [Remote host closed the connection]
<havenwood>
kenneth: one issue is the unfortunate lack of support for `using` refinements in a module, they're only for classes
pandaant has quit [Quit: Lost terminal]
<kenneth>
argh
eat_multi has joined #ruby
<kenneth>
yeah, i don't think they'll do what i want, the more i think about it
IceDragon has joined #ruby
<havenwood>
kenneth: if refinements were available top-level and in modules they'd really be something!
Kricir_ has quit [Remote host closed the connection]
<kenneth>
one super ghetto and inefficient way of doing this would be: in development mode, swizzle all the mutating methods from the collections with wrapper methods that (1) check if they're being called by something in the X module by looking at the backtrace, and if so, throw an exception
<kenneth>
or even, check if they're being called by a path we know is in our project and not a gem or stdlib
<kenneth>
hmmm… super ghetto but could work
<kenneth>
and in production, this would be disabled
pandaant has joined #ruby
sk87 has joined #ruby
SilkFox_ has joined #ruby
mikeg has quit [Ping timeout: 264 seconds]
<havenwood>
kenneth: create a mutability warning linter?
carraroj has quit [Quit: Konversation terminated!]
<kenneth>
how would i go about that?
ryanleesipes has quit [Ping timeout: 240 seconds]
<havenwood>
use an existing parser
eivindml has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
chrishough has joined #ruby
emmesswhy has joined #ruby
lemur has joined #ruby
Wolland has quit [Remote host closed the connection]
TMD has quit [Quit: Leaving]
sambao21 has joined #ruby
TMD has joined #ruby
TMD has quit [Client Quit]
avita1 has quit [Quit: Leaving.]
SilkFox_ has quit [Ping timeout: 245 seconds]
Kerber0s has quit [Remote host closed the connection]
TaxmanBD has joined #ruby
<havenwood>
kenneth: you could take a look at rubocop for reference or just use rubocop and create a custom rubocop offense for known mutable data structures
krisquigley has quit [Remote host closed the connection]
pandaant has quit [Remote host closed the connection]
darksun_ has left #ruby [#ruby]
dfeuer has joined #ruby
<dfeuer>
How long does gem install rails normally take? Is it supposed to produce any output to start, or just sit there acting like it's dead until it finishes?
<shevy>
I think it can take up to about 10 minutes if you are unlucky
<dfeuer>
Ah.
farid_ has joined #ruby
<dfeuer>
It *just* started acting other-than-dead.
<shevy>
\o/
hiyosi has joined #ruby
jottr_ is now known as jottr
dfeuer has left #ruby ["Leaving"]
emmesswhy has quit [Quit: This computer has gone to sleep]
zorak has quit [Remote host closed the connection]
JohnFord has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiyosi has quit [Ping timeout: 240 seconds]
timonv_ has quit [Ping timeout: 240 seconds]
mferrier_ has quit [Remote host closed the connection]
jrhorn424 is now known as zz_jrhorn424
clov3r has joined #ruby
emmesswhy has joined #ruby
claymore has quit [Quit: Leaving]
sylvanica has quit [Ping timeout: 268 seconds]
<clov3r>
here's a question for you. How do you run a regexp across a file, and do things with the matched results... without reading a file line by line( because the regexp may match across lines), or (ideally) loading the whole file into memory.
mdw has joined #ruby
<clov3r>
I'm looking to process svg files to extract embedded images into their own files
zorak has joined #ruby
<clov3r>
hmmm
xcv has joined #ruby
<Hanmac>
clov3r: use an xml parser like Nokogiri to parse svg files
<clov3r>
it occurs that svg is simply xml
<clov3r>
ha hanmac
<clov3r>
i just realised that
<clov3r>
yes indeed
amargherio has quit [Remote host closed the connection]