maestrojed has quit [Quit: Computer has gone to sleep.]
sepp2k has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
enebo has joined #ruby
failshell has quit [Remote host closed the connection]
Hanmac has joined #ruby
<j_mcnally>
whats the best way to upgrade ruby on centos
<j_mcnally>
i compiled 2.0.0 from source
<j_mcnally>
and want to install 2.1.2 now... do i just ./configure make and make install or do i need to remove the old one?
moted has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
<Wolland>
just install new one it will replace binaries
<j_mcnally>
coolio
Aryasam has joined #ruby
<Wolland>
also upgrade all pre-reqs
chipotle has quit [Quit: cya]
<j_mcnally>
i did
<Wolland>
before compiling new one
<Wolland>
k
<j_mcnally>
`yum upgrade`
<asdasdasdasss>
So WWW::Mechanize is that namespaces?
<Wolland>
all dev headers too
<j_mcnally>
yum upgrade should have upgraded all packages
<Wolland>
if nothing was removed later, yes
centrx has joined #ruby
centrx has quit [Remote host closed the connection]
<j_mcnally>
Wolland sound sgood
stytown has quit [Quit: stytown]
ddv has quit [Ping timeout: 245 seconds]
<j_mcnally>
Wolland: i would also want to upgrade rubygems ?
<Wolland>
yes
mengu has quit [Remote host closed the connection]
Shidash has joined #ruby
ddv has joined #ruby
enebo has quit [Quit: enebo]
CaptainJet has quit []
ghr has joined #ruby
strelok has joined #ruby
<strelok>
i have a small issue
<strelok>
and its probabbly something stupid
<Wolland>
kakaya problema?
<strelok>
say("Welcome to the game, #{$player.getname}!")
<strelok>
my method wont read anything after the name variable
<strelok>
it just cuts the string off right there
<Wolland>
why $?
<j_mcnally>
for starters u have a global
<strelok>
i dont actually remember why i did that
vifino has quit [Quit: Ze Cat now leaves...]
toretore has quit [Quit: This computer has gone to sleep]
failshell has joined #ruby
ghr has quit [Ping timeout: 260 seconds]
snkcld has quit [Quit: leaving]
jottr_ has quit [Ping timeout: 240 seconds]
<strelok>
how do i access the player object from the messageobject then
<Wolland>
hard to say without knowing details or seeing code
<strelok>
i create the player object in main
<Wolland>
you could pass it as initializer param
<Wolland>
or just pass the name itself, or message
SilkFox has quit [Ping timeout: 240 seconds]
Brando753 has quit [Read error: Connection reset by peer]
<Wolland>
Message.new("Welcome to the game, #{player.getname}!")
pcfreak30 has joined #ruby
pontiki has joined #ruby
isthisreallife has joined #ruby
<pcfreak30>
Is there anyway to convert the date string "Wed, 09 Jul 2014 19:14:44 +0000" to the local timezone? I have it returning in a JSON output, but need to compare against the modification date of a file locally.
isthisreallife has left #ruby [#ruby]
<pontiki>
there are ways
<pontiki>
hi, all
<Wolland>
Time.now.localtime
Brando753 has joined #ruby
<pcfreak30>
I assumed so, though ruby isnt my must fluent lang
<pontiki>
that would give current time, Wolland
<pontiki>
if you require the stdlib time module, you get Time.parse
<Wolland>
I am just showing the method, sorry, you have to parse time of course
<pontiki>
it prints the object.inspect and returns the value of what it prints
<strelok>
but for some reason it cuts off after that player.name variable
dorkusprime has joined #ruby
<strelok>
well it did when it was global
<strelok>
now it just doesnt access it at all
Lockyy__ has joined #ruby
<pontiki>
>> s="Hello, World"; p "This is my string: #{s.inspect}"
<pcfreak30>
pontiki: is it a shortcut to puts or a completely different method
<pontiki>
which is rather self-referential
<pontiki>
a different method
<pontiki>
puts returns `nil`
<Wolland>
def initialize(name) and pass name when you do Message.new("Albert) or Message.new(player.getname)
<strelok>
im not even creating objects for hte messages im njust pushing strings into an array
<Wolland>
how do you actually use this Message class
<strelok>
just as a messagebox
<strelok>
that displays the messages
<strelok>
and thats about it
<Wolland>
in your code, how do you use it
tectonic has quit []
Lockyy_ has quit [Ping timeout: 240 seconds]
<strelok>
msgbox.say("blah blah blah")
<strelok>
msgbox being a Message.new
<Wolland>
exactly
<Wolland>
so instead of Message.new ... you do Message.new(player_name)
<strelok>
i want to be able tp put any variable into the message
vyorkin has quit [Ping timeout: 260 seconds]
<strelok>
its kind of important
<strelok>
and not have it cut off after one
<Wolland>
i guess I am not explaining it good enough
<strelok>
and wouldnt player be a global object?
<strelok>
theres only one player
<strelok>
and lots of things have to interact w/ the player object
SCommette has joined #ruby
<Wolland>
your Message class doesn't care about player as it is now, it cares about a string from getname, so just pass it to it when you initialize it. Message.new("Bob") ... then msgbox.say will say Bob
tjr9898 has quit [Ping timeout: 260 seconds]
<Wolland>
or pass player object ... player = Player.new; msgbox = Message.new(player)
<Wolland>
if you have to have player object in there for some reason
mconnolly has joined #ruby
failshell has quit [Remote host closed the connection]
<strelok>
whats the operator to append strings in ruby
<pontiki>
so, Message is actually a MessageBox, yes?
<pontiki>
+
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moritzs has joined #ruby
JoshGlzBrk has joined #ruby
<pontiki>
.say is how you add a message to the message box, and .draw is how you display the messags queued in the box, right?
<pontiki>
that's for the agency i'm freelancing at
<foobarbaz_>
Trying to see if you can reuse server side validation on the clients browser
dideler has quit [Ping timeout: 240 seconds]
<pontiki>
foobarbaz_: #rubyonrails
<foobarbaz_>
aw, need +R
Hanmac has joined #ruby
<foobarbaz_>
=[
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<foobarbaz_>
+r i mean
<pontiki>
yeah, there's apparently a fair bit of spambot if they don't have it closed
<foobarbaz_>
=[
<pontiki>
do you object to registering with nickserv?
<foobarbaz_>
Happen to know if it's possible to expose the validation rules of models to a front-end JS framework like angularjs/backbone etc?
<foobarbaz_>
ofc, irc should be anonymous :)
<foobarbaz_>
Hate logged channels
kireevco has joined #ruby
jobewan has joined #ruby
postmodern has quit [Quit: Leaving]
Deele has quit [Ping timeout: 240 seconds]
eka has joined #ruby
eka has quit [Client Quit]
chrishough has quit [Quit: chrishough]
tylersmith has joined #ruby
d5sx43 has joined #ruby
obscured has joined #ruby
SCommette has quit [Quit: SCommette]
Beoran__ has joined #ruby
braincra- has quit [Quit: bye bye]
GriffinHeart has joined #ruby
<pontiki>
how many people here do you think have logging turned on :)
Beoran_ has quit [Ping timeout: 245 seconds]
<pontiki>
anyway, seems like you could do it somehow with AJAX, but involving a round trip to the server and back also seems like it would slow things down
d5sx43 has quit [Remote host closed the connection]
braincrash has joined #ruby
spastorino has joined #ruby
d5sx43 has joined #ruby
GriffinHeart has quit [Ping timeout: 264 seconds]
xjiujiu has joined #ruby
sdouglas has joined #ruby
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zorak has quit [Ping timeout: 260 seconds]
SilkFox has joined #ruby
maoko has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SilkFox has quit [Ping timeout: 240 seconds]
Lockyy has joined #ruby
Photism has joined #ruby
downloadingyourr has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
chrishough has joined #ruby
xjiujiu has joined #ruby
obscured has quit [Quit: leaving]
Lockyy has quit [Ping timeout: 240 seconds]
toastynerd has quit []
foobarbaz_ has quit [Ping timeout: 246 seconds]
iamjarvo has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
dc_ has joined #ruby
xjiujiu has joined #ruby
dc_ has quit [Remote host closed the connection]
toastynerd has joined #ruby
Vivekananda_y510 has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
brunops has quit [Ping timeout: 256 seconds]
Wolland has quit [Remote host closed the connection]
chipotle has joined #ruby
Wolland has joined #ruby
Zebroid has quit [Remote host closed the connection]
echevemaster has quit [Read error: Connection reset by peer]
brunops has joined #ruby
Wolland has quit [Ping timeout: 256 seconds]
amargherio has quit [Remote host closed the connection]
brunops has quit [Ping timeout: 240 seconds]
Vivekananda_y510 has joined #ruby
Prandium has quit [Read error: Connection reset by peer]
hobodave has quit [Ping timeout: 256 seconds]
arup_r has joined #ruby
toastynerd has quit [Ping timeout: 240 seconds]
kireevco has quit [Quit: Leaving.]
kireevco has joined #ruby
crudson has quit [Quit: q term]
jobewan has quit [Quit: Leaving]
brunops has joined #ruby
toastynerd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zkay11 has left #ruby [#ruby]
fuzzyhorns has joined #ruby
brunops has quit [Changing host]
brunops has joined #ruby
<fuzzyhorns>
for reasons of sheer dumb curiosity: there is no way i can get the receiver of a proc within a proc, right?
arup_r has quit [Ping timeout: 240 seconds]
datafirm has joined #ruby
ikonijnen has joined #ruby
arup_r has joined #ruby
j_mcnally has joined #ruby
datafirm has quit [Ping timeout: 260 seconds]
francisfish has joined #ruby
SilkFox has joined #ruby
Shidash has quit [Ping timeout: 240 seconds]
francisfish has quit [Ping timeout: 240 seconds]
<benzrf>
fuzzyhorns: receiver?
<benzrf>
what do you mean?
SilkFox has quit [Ping timeout: 240 seconds]
bruno- has joined #ruby
Lockyy has joined #ruby
<fuzzyhorns>
so, whatever object receives the proc
<benzrf>
how can an object receive the proc
mostlybadfly has quit [Quit: Connection closed for inactivity]
<fuzzyhorns>
benzrf: the proc is called on something, is that always going to just be main?
<fuzzyhorns>
i am probably using the wrong terms
dc_ has joined #ruby
<fuzzyhorns>
like a method is generally called on a class or instance, i get that much, is a proc usually just called on main?
<arup_r>
benzrf: receiver is a thing, which receives messages.. like "aaa".size, here you are passing a message to to the receiver 'aaa', which is a String object.
<arup_r>
a message :size
gavit has joined #ruby
<fuzzyhorns>
arup_r: so i have seen procs called independently, but if you do puts self within one you see main spat back out at you
<fuzzyhorns>
arup_r: so i wondered if you could have any other context within a proc or no
Lockyy has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 240 seconds]
<benzrf>
fuzzyhorns: oh, you mean self within the proc?
<benzrf>
you talk about the receiver of a method call because a method call is 'sending a message' to something
<benzrf>
but calling a proc is not sending a message to anything but the proc
<fuzzyhorns>
nil
kireevco has quit [Quit: Leaving.]
<fuzzyhorns>
benzrf: and isnt any proc sending a message to main?
<fuzzyhorns>
benzrf: if that were true wouldnt self return the proc instance?
Hanmac1 has joined #ruby
sdouglas has quit [Remote host closed the connection]
davedev24_ has quit [Remote host closed the connection]
<benzrf>
fuzzyhorns: what?
Hanmac has quit [Ping timeout: 241 seconds]
<benzrf>
when i say "some_proc.call", i'm sending the 'call' message to some_proc
<benzrf>
main is not involved
davedev24_ has joined #ruby
<fuzzyhorns>
benzrf: did you see my paste above? why does self return main?
<benzrf>
fuzzyhorns: because that's how ruby works
<fuzzyhorns>
benzrf: i understand proc is receiving from call, but if that is so, why is self not proc?
<fuzzyhorns>
sorry for my ignorance here
<benzrf>
the code in a proc is evaluated in the context of the object that the proc was defined in
exgf has quit [Remote host closed the connection]
ericmathison has joined #ruby
angusiguess has quit [Ping timeout: 254 seconds]
exgf has joined #ruby
zorak has joined #ruby
<fuzzyhorns>
benzrf: yes, so if it is defined in main, it has the context of main, if it is defined in a class, would it have the context of that class?
<fuzzyhorns>
and isnt self always equal to the receiver?
MACscr has quit [Write error: Broken pipe]
dc_ has quit [Write error: Broken pipe]
davedev24_ has quit [Ping timeout: 240 seconds]
mgberlin has joined #ruby
<benzrf>
fuzzyhorns: self in a method body is equal to the receiver of the method call
<benzrf>
fuzzyhorns: the code in a proc is not the body of the call method
<benzrf>
the call method invokes it
<fuzzyhorns>
benzrf: gotcha
<fuzzyhorns>
thanks :)
theharshest has quit [Quit: This computer has gone to sleep]
nevans has quit [Ping timeout: 272 seconds]
arup_r has quit [Read error: Connection reset by peer]
theharshest has joined #ruby
<fuzzyhorns>
benzrf: so main is not the receiver of anything executed in its context? or is that still true?
<benzrf>
hmm?
hobodave has joined #ruby
arup_r has joined #ruby
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 240 seconds]
<fuzzyhorns>
benzrf: in the general sketching of ruby as being all objects receiving methods, is main receiving or no?
<fuzzyhorns>
or does the sketch not apply to it?
<benzrf>
fuzzyhorns: main is the receiver of any method calls at the top level
<benzrf>
for example, if i say:
<benzrf>
puts "foo"
<benzrf>
at the top level of a file
<benzrf>
then main receives puts
arup_r has quit [Ping timeout: 240 seconds]
<fuzzyhorns>
benzrf: do procs always execute at that level?
<benzrf>
fuzzyhorns: no, the code in a proc is executed in the context that it was defined in
<benzrf>
lexically
IceDragon has quit [Excess Flood]
IceDragon has joined #ruby
vsoftoiletpaper has quit []
arup_r has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
vpretzel has joined #ruby
ylluminarious|aw has quit [Excess Flood]
<fuzzyhorns>
right sorry, you said before
mjulian has quit [Excess Flood]
vsoftoiletpaper has joined #ruby
TheSojourner has joined #ruby
TheSojourner has quit [Changing host]
TheSojourner has joined #ruby
redlegion has quit [Excess Flood]
redlegion has joined #ruby
GriffinHeart has joined #ruby
gavit has quit [Ping timeout: 240 seconds]
benzrf is now known as benzrf|offline
GriffinHeart has quit [Ping timeout: 260 seconds]
stytown has joined #ruby
tectonic has joined #ruby
michaelchum has quit [Quit: Connection closed for inactivity]
nevans has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
gavit has joined #ruby
arya_ has joined #ruby
_Blizzy has quit [Ping timeout: 246 seconds]
nanodano has quit [Quit: Leaving.]
hobodave has joined #ruby
sdouglas has joined #ruby
northfurr has quit [Quit: northfurr]
SilkFox has joined #ruby
kayloos has joined #ruby
lolmaus has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
vsoftoiletpaper has quit []
SilkFox has quit [Ping timeout: 264 seconds]
kayloos has quit [Ping timeout: 256 seconds]
washtubs has quit [Ping timeout: 240 seconds]
arya_ has quit [Ping timeout: 240 seconds]
fabrice31 has joined #ruby
stytown has quit [Quit: stytown]
arya_ has joined #ruby
agjacome has joined #ruby
lw has quit [Quit: s]
agjacome has quit [Client Quit]
larsam has joined #ruby
<theharshest>
which gem should be used if I want a tree of all the URLs originating from a given URL
fabrice31 has quit [Ping timeout: 240 seconds]
IceDragon has quit [Quit: Space~~~]
<pontiki>
mechanize?
<pontiki>
that tree would be infinite...
agjacome has joined #ruby
<theharshest>
pontiki: I would put a limit, adding URLs to a set
papercode has joined #ruby
agjacome has quit [Client Quit]
<theharshest>
pontiki: mechanize has a built in function to do that or I would need to write it myself?
<pontiki>
it can give you all the urls for a page; you can then walk that set, doing the same thing for each, and so on; i don't think it has a built in thing to do that already
godd2 has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
ikonijnen has quit [Remote host closed the connection]
Notte has quit [Remote host closed the connection]
psmolen has quit [Ping timeout: 272 seconds]
lewix has quit [Remote host closed the connection]
coderhs has quit [Read error: Connection reset by peer]
coderhs has joined #ruby
zigomir has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
anaeem1 has quit [Remote host closed the connection]
d5sx43 has quit [Ping timeout: 240 seconds]
d5sx43 has joined #ruby
Lockyy has joined #ruby
lng has quit [Quit: Lost terminal]
ndrei has joined #ruby
Lockyy has quit [Ping timeout: 240 seconds]
francisfish has joined #ruby
lolmaus_ has joined #ruby
SilkFox has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
marr has joined #ruby
sevvie has quit [Quit: Bye]
francisfish has quit [Ping timeout: 240 seconds]
jackneill has joined #ruby
psmolen has joined #ruby
frank_____ has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
SilkFox has quit [Ping timeout: 260 seconds]
xjiujiu has joined #ruby
anaeem1_ has joined #ruby
Macaveli has joined #ruby
Notte has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
d5sx43 has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
hsps_ has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
m_e has joined #ruby
havenwood has joined #ruby
dangerousdave has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<m_e>
hey guys, i dont know if this is the right place but i have no idea where else to go... i tried to install a program developed with ruby on a debian machine. now when i try to configure it i get this error: https://gist.github.com/anonymous/cf3ee06dae79c4e31c30 . yet i have no idea how to fix it. obviously the directory is empty. mabye the path is wrong? maybe there should be something in that directory? i would be very happy if anyone cou
xjiujiu has joined #ruby
kalusn has joined #ruby
axsuul has joined #ruby
emergion has joined #ruby
carraroj has joined #ruby
Notte has quit [Remote host closed the connection]
iamjarvo has joined #ruby
descala has quit [Read error: Connection reset by peer]
Notte has joined #ruby
kalusn has quit [Ping timeout: 240 seconds]
Notte has quit [Remote host closed the connection]
d5sx43 has joined #ruby
Hanmac1 has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Ping timeout: 240 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
Notte has joined #ruby
iamjarvo has joined #ruby
Notte has quit [Remote host closed the connection]
iamjarvo has quit [Client Quit]
descala has joined #ruby
<shevy>
m_e that looks like a faulty path
alexju has quit [Remote host closed the connection]
<shevy>
you must have installed rake manually considering the path /usr/local/bin/rake
<shevy>
my rake is at /usr/bin/rake
<shevy>
and it does not refer to /usr/share/rubygems-integration/1.9.1/gems/rake-0.9.2.2/bin/rake at all
<m_e>
shevy: ahh thank you i just managed to fix it by making a softlink to the real path. :)
<shevy>
what is rubygems-integration btw?
<m_e>
shevy: but thanks a lot!
<shevy>
from where does it come
<shevy>
ok
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dude007 has quit [Remote host closed the connection]
Dude007 has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
dn0v has quit [Ping timeout: 264 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
Xeago has quit [Remote host closed the connection]
braincra- has joined #ruby
d5sx43 has quit [Ping timeout: 240 seconds]
braincrash has quit [Ping timeout: 260 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
chipotle has joined #ruby
d5sx43 has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
dangerousdave has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
m3_del_ has joined #ruby
dangerousdave has joined #ruby
p0sixpscl has joined #ruby
bruno- has quit [Ping timeout: 264 seconds]
m3_del has quit [Ping timeout: 240 seconds]
iamjarvo has joined #ruby
kyb3r_ has joined #ruby
Darra-jai has joined #ruby
naw has quit [Ping timeout: 240 seconds]
kalusn has joined #ruby
wallerdev has quit [Quit: wallerdev]
K3dare has quit [Read error: No route to host]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Notte has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lockyy has joined #ruby
francisfish has joined #ruby
matrixise has joined #ruby
francisfish has quit [Read error: No route to host]
francisfish has joined #ruby
sdouglas_ has quit [Remote host closed the connection]
sdouglas has joined #ruby
anaeem1_ has quit [Read error: Connection reset by peer]
Hanmac has joined #ruby
Lockyy has quit [Ping timeout: 260 seconds]
Notte has quit [Remote host closed the connection]
nateberkopec has joined #ruby
anaeem1_ has joined #ruby
d5sx43 has quit [Ping timeout: 260 seconds]
jmc75 has joined #ruby
kayloos has joined #ruby
Hanmac1 has quit [Ping timeout: 256 seconds]
fluve has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
SilkFox has joined #ruby
havenwood has joined #ruby
d5sx43 has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
<lyda>
but the rest of the references to the config are Gitlab.config. is this common with rails apps? are they pointing at the same object and people just go between them - Appname.config / appname_config?
<apeiros>
lyda: that's not common, no
<apeiros>
the coder would have had to provide both
oso96_2000 has quit [Ping timeout: 252 seconds]
<apeiros>
it's possible that he passed in Gitlab.config as a local variable and forgot about that halfway through the template :-/
funburn has quit [Quit: funburn]
jacobat has quit [Ping timeout: 240 seconds]
<lyda>
which is the normal standard?
zz_karupa has quit [Ping timeout: 252 seconds]
atraylen has quit [Ping timeout: 240 seconds]
<lyda>
i'm not a ruby or rails coder, but if i'm going to write ruby i'd like it to be something a ruby person would expect to see.
<lyda>
(least surprise, etc.)
dinoex has quit [Ping timeout: 260 seconds]
minecoins has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eshy has quit [Ping timeout: 252 seconds]
minecoins has joined #ruby
Xeago has joined #ruby
cibs has joined #ruby
zz_karupa has joined #ruby
eshy has joined #ruby
charliesome has joined #ruby
zz_karupa is now known as karupa
oso|away has joined #ruby
oso|away is now known as oso96_2000
havenwood has joined #ruby
axsuul has joined #ruby
Takle has joined #ruby
jottr_ has joined #ruby
charliesome has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
kayloos has joined #ruby
<apeiros>
lyda: there is no standard
<apeiros>
lyda: my personal preference is to pass in all as local variables. simply because it removes a lot of far reaching coupling.
jottr_ has quit [Ping timeout: 256 seconds]
d5sx43 has quit [Ping timeout: 240 seconds]
<apeiros>
i.e., I consider a template similar to a method on another object. you pass in all the relevant information. you don't write methods which depend on global state.
Takle has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
d5sx43 has joined #ruby
<lyda>
ok, so now next stupid question. "pass in" how might i hunt down where this is done? i want to change the text in a .html.haml and .text.erb file to be configurable.
<lyda>
should i just search the code for the template name?
<apeiros>
something calls `render template_path`
<apeiros>
do you know in which urls the view is used?
<lyda>
in this case it's an email that's sent.
<apeiros>
h
<apeiros>
*oh
<lyda>
i assume a module handles that.
<apeiros>
so it's either a custom thing or (more likely) action mailer
<apeiros>
I haven't used the latter, so I don't know its signature
<apeiros>
I guess I'd go read AM's docs to see how it is invoked, then search for that
<apeiros>
alternatively - add a piece of logging code to the template
<lyda>
seems like it's part of devise.
mengu has quit [Read error: Connection reset by peer]
kalusn has joined #ruby
havenwood has quit [Remote host closed the connection]
<lyda>
no, the new user mail is different. heh. of course it is.
phoo1234567 has quit [Quit: Leaving]
workmad3 has quit [Ping timeout: 240 seconds]
arcsky has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
d5sx43 has joined #ruby
mikecmpbll has joined #ruby
nateberkopec has joined #ruby
<jeaye>
I'm interested in using ruby for only a single page of a website, to do some server-side work. Since it's only for one page, it seems that fcgi would be the approach and gems like sinatra are too much (since they run the whole server). How accurate is this? What's suggested?
kalusn has joined #ruby
Takle has joined #ruby
Macaveli has quit [Quit: Leaving]
nateberkopec has quit [Ping timeout: 240 seconds]
yacks has joined #ruby
kirun has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
tekk has joined #ruby
<tekk>
hey guys, are rails questions ok here?
andrewlio has quit [Quit: Leaving.]
<tekk>
i have a simple rails app that stores some info in a db and then performs a redirect_to… i use nginx and passenger…. Every now and again i get a spate of failed requests with this in my logs “Error during failsafe response: invalid %-encoding”
<tekk>
i think it may be linked to passenger however, anyone had similar?
fluve has quit []
foo-bar- has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
francisfish has joined #ruby
foo-bar- has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 264 seconds]
<Hanmac>
tekk: #RubyonRails
anaeem1_ has joined #ruby
<tekk>
thanks
<tekk>
tried afew combos for that and couldn’t find a channel
<jeaye>
tekk: /msg alis help list
d5sx43 has quit [Ping timeout: 240 seconds]
d5sx43 has joined #ruby
phoo1234567 has quit [Quit: Leaving]
<shevy>
jeaye you can use ruby in .cgi like fashion very well
<jeaye>
shevy: I've done that once before and I remember it being terribly slow. Is this the usual case?
<shevy>
not sure what you mean with terribly slow. .cgi has always been fairly slow, even in perl days
phoo1234567 has joined #ruby
kaspergrubbe has joined #ruby
<jeaye>
Let's call it fairly slow then. heh
jmc75 has left #ruby [#ruby]
phoo1234567 has quit [Max SendQ exceeded]
<shevy>
.cgi is like the old truck you have in your garage. sure the lamborghini is faster and prettier but you can still move from A to B with your old truck
<jeaye>
Since I'm not seeing any other way than fairly slow cgi to get one page working with ruby, it looks like sinatra will allow me to also put up my static html content with relative ease. I'm going to test that hypothesis out.
<jeaye>
Thus running the whole site through ruby, but only really doing ruby work on certain pages.
netf has joined #ruby
magicien has joined #ruby
soulcake has joined #ruby
Deele has joined #ruby
peckermanzzz has joined #ruby
pu22l3r has joined #ruby
soulcake has quit [Changing host]
soulcake has joined #ruby
olivier_bK has quit [Ping timeout: 256 seconds]
pu22l3r has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shredding has quit [Quit: shredding]
shredding has joined #ruby
<arup_r>
hanmac: Can your code be written using `map.wit_object()` or something like that.. to make it more Ruby way.. I tried .map.with_object but it didn't work, reason is obvious.. :(
<Hanmac>
map with object does not make sense, thats why
jacobat has joined #ruby
bruno- has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
comma8 has joined #ruby
sigurding has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo_ has joined #ruby
sigurding has quit [Client Quit]
d5sx43 has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
d5sx43 has joined #ruby
j_mcnally has joined #ruby
ARCADIVS has quit [Quit: WeeChat 0.4.3]
olivier_bK has joined #ruby
j_mcnally has quit [Client Quit]
j_mcnally has joined #ruby
workmad3 has joined #ruby
<shevy>
jeaye didn't you before say that sinatra is too much?
j_mcnally has quit [Client Quit]
j_mcnally has joined #ruby
j_mcnally has quit [Client Quit]
<jeaye>
shevy: Prelude: I'm a C++ dev completely new to ruby and, for that matter, webdev. Answer: Yep, that's exactly what I said. However, after looking more through its documentation, I think I can set it up to just spew out the static html for my static pages and then do actual work for the other pages. It looks like it shouldn't be too much, contrary to my initial thoughts.
sdouglas has quit [Ping timeout: 264 seconds]
<shevy>
off-topic - does anyone happen to know what ^M character is in vim? some of my text files seem to have that strange character at end of a line
<jeaye>
Yup, it's a Windows thing with line endings.
j_mcnally has joined #ruby
<shevy>
damn
<shevy>
I wonder how I got that into my files...
<jeaye>
You'll need to change to unix line endings and throw in a :%s/^M//g (use ^v to type &M)
j_mcnally has quit [Client Quit]
<jeaye>
^M, not &M
j_mcnally has joined #ruby
<shevy>
sinatra is very nice if you need URI-like queries
<shevy>
with .cgi I am not sure how to do the same
mengu has joined #ruby
Lockyy has joined #ruby
<jeaye>
I have two tasks with this site for which I plan to use ruby. 1. listing images from certain directories to form a gallery. 2. using the tumblr api to mirror posts
<shevy>
though you can use those weird CGI.new.params, which is a hash about the environmental vars, and you can obtain the query string via .query_string
<shevy>
that's so simple man
<shevy>
my_images = Dir['*.jpg'] # obviously, you need to give the real path to Dir[] call
<shevy>
no idea about 2 though, I dont know the tumblr api
<jeaye>
Of course. I see how it could work with cgi; I just didn't want to take the performance hit (since it was quite noticeable when I did this before -- could be just my host).
<shevy>
:)
timonv_ has quit [Remote host closed the connection]
memph1s has joined #ruby
nateberkopec has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
moritzs has joined #ruby
<jeaye>
Anyway, thanks for the affirmation. I'll get this whipped up one way or another.
Lockyy has quit [Ping timeout: 240 seconds]
<shevy>
\o/
<shevy>
whip it good
<shevy>
there is also rails
<shevy>
:>
<jeaye>
You jester, you.
<Ulrike_Rayne>
Huehuehue
<workmad3>
shevy: he could also just write it as a plain rack app from scratch ;)
d5sx43 has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
<shevy>
yeah
<shevy>
jeaye rack is also a possibility; it can be rather simple
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<canton7>
that's the AWS SDK...?
fabrice31 has quit [Ping timeout: 240 seconds]
phutchins has joined #ruby
darkxploit has quit [Ping timeout: 240 seconds]
lxsameer has quit [Quit: Leaving]
Xeago has joined #ruby
malcolmva has quit [Ping timeout: 256 seconds]
<dangerousdave>
canton7, yes, i am using it to send email
d5sx43 has quit [Ping timeout: 240 seconds]
<dangerousdave>
was thinking that it may do the html -> plain text conversion for me
<canton7>
look, this isn't as blindingly simple as you think it is :P how should links be displayed? bold/italic text? should paragraphs remain as paragraphs? what about headings? should they be underlined in some way?
dangerousdave has quit [Read error: Connection reset by peer]
<canton7>
it's not coincidence that html emails normally also include a plaintext component
dangerousdave has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
Ulrike_Rayne is now known as Ulrike[inapokeba
d5sx43 has joined #ruby
Ulrike[inapokeba is now known as Ulrike[pokeballe
dangerousdave has quit [Read error: Connection reset by peer]
Ulrike[pokeballe is now known as Ulrike_Pokeballe
dangerousdave has joined #ruby
iamjarvo has joined #ruby
Ulrike_Pokeballe is now known as Ulrike
Ulrike is now known as Ulrike_Rayne
vinayv has joined #ruby
klaut has quit [Remote host closed the connection]
vinayv has left #ruby [#ruby]
Rix has quit [Ping timeout: 240 seconds]
vinayv has joined #ruby
vinayv has left #ruby [#ruby]
darkxploit has joined #ruby
pushpa has quit [Ping timeout: 240 seconds]
pu22l3r has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
roolo has joined #ruby
phil has quit [Remote host closed the connection]
malcolmva has joined #ruby
pu22l3r has quit [Ping timeout: 260 seconds]
bruno- has joined #ruby
Takle has joined #ruby
claymore has joined #ruby
sepp2k has joined #ruby
mgorbach has quit [Ping timeout: 240 seconds]
Ulrike_Rayne is now known as Ulri
<aep>
any idea why rbenv is saying 'rbenv: version `2.1.1' is not installed' ?
<aep>
it IS installed
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
icedp has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
<Xeago>
aep: try 2.1.1psoemthing
<Xeago>
rbenv is fairly picky
Lockyy has joined #ruby
<aep>
i have _exactly_ 2.1.1 installed
<aep>
and it worked 5 minutes ago. nothing changed inbetween
<Xeago>
p0 usually
bruno- has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
<Xeago>
what does rbenv versions output?
<aep>
i have ~/.rbenv/versions/2.1.0/bin/ruby
<aep>
system
<aep>
2.0.0-rc2
<aep>
2.1.0
d5sx43 has quit [Ping timeout: 240 seconds]
mgorbach has joined #ruby
naw has joined #ruby
icedp has joined #ruby
d5sx43 has joined #ruby
<aep>
interesingly that only happened because there was a .ruby_version
gruz0[russia] has joined #ruby
<aep>
oh duh, it sayd 2.1.1 not 2.1.0
* aep
fades away in shame
harryk has joined #ruby
nateberkopec has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
claymore has quit [Ping timeout: 240 seconds]
gruz0[russia] has quit [Client Quit]
maximski has joined #ruby
claymore has joined #ruby
toretore has joined #ruby
starkhalo has joined #ruby
SilkFox has joined #ruby
Shidash has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<workmad3>
aep: I've started using '2.1' in my .ruby-version files to avoid that sort of issue :)
Xeago has quit [Remote host closed the connection]
moritzs has quit [Ping timeout: 256 seconds]
<workmad3>
aep: IMO, it makes sense now that ruby is using semver rather than patch releases too
moritzs has joined #ruby
farn has quit [Ping timeout: 240 seconds]
jonno11 has joined #ruby
<aep>
workmad3: that works?
<aep>
rbenv: version `2.1' is not installed
<aep>
nah
camilasan has quit [Ping timeout: 245 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
SilkFox has quit [Ping timeout: 240 seconds]
xjiujiu has joined #ruby
noop has quit [Ping timeout: 264 seconds]
centipedefarmer has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
<workmad3>
aep: ah, it works on chruby, and I think rvm :)
noop has joined #ruby
lw has joined #ruby
* workmad3
doesn't worry overly much about breaking rbenv :)
Takle has quit [Remote host closed the connection]
Takle has joined #ruby
zigomir has joined #ruby
banisterone has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
vitkovsky has joined #ruby
vifino has quit [Ping timeout: 240 seconds]
d5sx43 has quit [Ping timeout: 240 seconds]
farn has joined #ruby
eka has joined #ruby
m_e has joined #ruby
<m_e>
anyone knows what this means in a gemfile? # gem "i18n", "~> 0.4.2"
<m_e>
that it needs a module called i18n with exactly version 0.4.2? or does some other version do?
DrCode has quit [Remote host closed the connection]
Takle has joined #ruby
katlogic has joined #ruby
jonno11 has joined #ruby
DrCode has joined #ruby
Ankhers has joined #ruby
Xeago has joined #ruby
DrCode has quit [Remote host closed the connection]
jeaye has quit [Quit: movie time!]
iamjarvo has joined #ruby
d5sx43 has quit [Ping timeout: 260 seconds]
xjiujiu has quit [Ping timeout: 240 seconds]
jonno11 has quit [Ping timeout: 260 seconds]
d5sx43 has joined #ruby
vitkovsky has quit [Remote host closed the connection]
DrCode has joined #ruby
DrCode has quit [Remote host closed the connection]
obs has quit [Quit: Konversation terminated!]
fuzzyhorns has quit [Quit: Leaving.]
jacobat has joined #ruby
Tingo1983 has quit [Ping timeout: 240 seconds]
enebo has quit [Quit: enebo]
DrCode has joined #ruby
<puppeh>
does ruby-install rbenv rvm etc. all compile ruby from source when you use them?
fuzzyhorns has joined #ruby
fuzzyhorns has left #ruby [#ruby]
pontiki has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
godd2 has joined #ruby
failshell has joined #ruby
DrCode has quit [Remote host closed the connection]
Zebroid has quit [Remote host closed the connection]
asdasdasdasss has joined #ruby
DrCode has joined #ruby
DrCode has quit [Remote host closed the connection]
failshel_ has joined #ruby
tus has joined #ruby
pu22l3r has quit [Read error: No route to host]
DrCode has joined #ruby
DrCode has quit [Client Quit]
failshel_ has quit [Read error: Connection reset by peer]
Zebroid has joined #ruby
failshel_ has joined #ruby
hsps_ has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
hsps_ has joined #ruby
razum2um has quit [Quit: Leaving.]
rippa has joined #ruby
failshe__ has joined #ruby
failshell has quit [Ping timeout: 264 seconds]
angorabedsock has joined #ruby
<m_e>
#debian
<m_e>
ups
kireevco has joined #ruby
pu22l3r has quit [Remote host closed the connection]
failshel_ has quit [Ping timeout: 240 seconds]
d5sx43 has quit [Ping timeout: 240 seconds]
amargherio has joined #ruby
Neomex has joined #ruby
kireevco has quit [Client Quit]
d5sx43 has joined #ruby
moritzs has joined #ruby
Zebroid has quit [Remote host closed the connection]
kireevco has joined #ruby
davispuh has joined #ruby
francisfish has joined #ruby
amacou has joined #ruby
SCommette has quit [Quit: SCommette]
ehlovader has quit [Ping timeout: 240 seconds]
cnj has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
centipedefarmer has joined #ruby
ehlovader has joined #ruby
cnj has joined #ruby
xjiujiu has joined #ruby
Lockyy has quit [Quit: Computer has gone to sleep.]
nfk has quit [Quit: yawn]
vifino has quit [Quit: Me sais Laptop sleepy.]
vifino has joined #ruby
centipedefarmer has quit [Ping timeout: 240 seconds]
washtubs has joined #ruby
gruz0[russia] has joined #ruby
Lockyy has joined #ruby
<puppeh>
anybody knows how can I compile ruby without generating rdoc?
Lockyy has quit [Client Quit]
amacou has quit [Remote host closed the connection]
axsuul has joined #ruby
hakunin_ has joined #ruby
nfk has joined #ruby
amacou has joined #ruby
arrubin has joined #ruby
failshe__ has quit [Remote host closed the connection]
hakunin has quit [Ping timeout: 272 seconds]
Xeago has quit [Remote host closed the connection]
<zly>
puppeh: using what?
<zly>
I'm pretty sure you can use "--disable-install-rdoc" while compiling from source
d5sx43 has quit [Ping timeout: 240 seconds]
<zly>
and there's probably a way to use it in any of the install managers
<zly>
in every*
diegoviola has quit [Quit: WeeChat 0.4.3]
axsuul has quit [Ping timeout: 240 seconds]
amacou has quit [Ping timeout: 264 seconds]
d5sx43 has joined #ruby
sigurding has joined #ruby
MartynKeigher has joined #ruby
nfk has quit [Ping timeout: 240 seconds]
theharshest has joined #ruby
jacobat has quit [Quit: leaving]
<MartynKeigher>
hey all. i'm having an issue when installing a ruby gem called 'roo'. here is a screenshot of the output... http://i.imgur.com/OcE5w8f.jpg. I then tried to install using " gem install nokogiri -- --use-system-libraries, " but it still fails. Any ideas hwy & how would i fix this? Thank you
kireevco has left #ruby [#ruby]
gruz0[russia] has quit [Quit: This computer has gone to sleep]
kireevco has joined #ruby
IceDragon has joined #ruby
kireevco has quit [Client Quit]
<Hanmac>
MartynKeigher: nope that is not a warning its only a notice and its only optional
Lockyy has joined #ruby
koyd has quit [Ping timeout: 240 seconds]
kalusn_ has joined #ruby
relix has joined #ruby
kayloos_ has joined #ruby
<MartynKeigher>
ah. so it IS installed??
<Hanmac>
yes it should be
asdasdasdasss has quit [Quit: Computer has gone to sleep.]
FLeiXiuS has quit [Ping timeout: 240 seconds]
<MartynKeigher>
hos can i confirm the installation?
<MartynKeigher>
sorry for the dumbass question.. im farily new to ruby/gems
asdasdasdasss has joined #ruby
kayloos has quit [Ping timeout: 240 seconds]
kalusn has quit [Ping timeout: 240 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pu22l3r has joined #ruby
<zly>
MartynKeigher: open up irb
<zly>
and type: require 'nokogiri'
<MartynKeigher>
ok done.
rkazak has joined #ruby
<MartynKeigher>
LoadError: cannot load such file -- nokogiri ?
lagweezle has quit [Quit: leaving]
funktor has joined #ruby
<MartynKeigher>
i need to do gem instal nokogiri then ,,, not roo
<MartynKeigher>
is roo part of nokogiri?
kaspergrubbe has joined #ruby
asdasdasdasss has quit [Ping timeout: 240 seconds]
klaut has joined #ruby
<zly>
I suppose it only depends on nokogiri for some functionality
<pontiki>
roo depends on nokogiri
<pontiki>
oops
lkba has quit [Ping timeout: 240 seconds]
<pontiki>
sorry, zly
<zly>
There's nothing to be sorry about :}
<zly>
Or is it some kind of rule in here?
<MartynKeigher>
ah right on
<zly>
:D
iamjarvo has joined #ruby
koyd has joined #ruby
ehlovader has quit [Ping timeout: 240 seconds]
Dude007 has quit [Remote host closed the connection]
<MartynKeigher>
welll.. that "notice" that i took a screenshot of.... im at that again after typing gem install nokogiri.
Takle has quit [Remote host closed the connection]
pu22l3r has quit [Ping timeout: 240 seconds]
IceDragon has quit [Ping timeout: 264 seconds]
<pontiki>
idk, zly. i've been bitched at for repeating what someone just said
cnj has quit [Ping timeout: 240 seconds]
Dude007 has joined #ruby
<MartynKeigher>
and after a little google searching im seeing that nokogiri is 'tricky' to install.
IceDragon has joined #ruby
<Hanmac>
depends on the system ..
<MartynKeigher>
^ amen to that!
<MartynKeigher>
i justhave a tricky system! ;)
<havenwood>
MartynKeigher: If you crosspost please mention that you're doing it. Instead of images use gist.github.com for code pastes!
duncannz has joined #ruby
<Hanmac>
and the nokogiri version ... newer version does ship xml with itself ... earlier does only works with system -xml
ehlovader has joined #ruby
cnj has joined #ruby
<MartynKeigher>
so i could remove libxml2-2.9.0 and then try again??
<MartynKeigher>
would you recocmend that?
<MartynKeigher>
**reccomend
<zly>
like... from your system?
theharshest has quit [Quit: This computer has gone to sleep]
gruz0[russia] has joined #ruby
<MartynKeigher>
oh wait....
<MartynKeigher>
i think it just did!!??
<MartynKeigher>
hah
<pontiki>
gosh, no don't remove that library -- it's used by a lot of things
<MartynKeigher>
yah im not.
<MartynKeigher>
i did gem install nokogiri and it honestly took about 6/7 minutes!!
<pontiki>
yes, it's compiling
* MartynKeigher
is impatient!
<pontiki>
greatest excuse ever for a long coffee break
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
centrx has joined #ruby
gruz0[russia] has quit [Quit: This computer has gone to sleep]
dangerousdave has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 240 seconds]
dangerousdave has joined #ruby
shredding has quit [Quit: shredding]
St_Marx has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 240 seconds]
mr_foobar_baz has joined #ruby
St_Marx has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
fabrice31 has joined #ruby
Lockyy has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
ineb has joined #ruby
theharshest has joined #ruby
mehlah has joined #ruby
bennylope has joined #ruby
x1337807x has joined #ruby
moritzs has quit [Ping timeout: 240 seconds]
CorySimmons has joined #ruby
failshell has joined #ruby
funktor has quit [Remote host closed the connection]
<ineb>
hi, if i have "def [](arg); @headers[arg.to_s] end" does that mean i can access @headers withing object 'foo' like "value = foo['key']"?
fabrice31 has quit [Ping timeout: 240 seconds]
Lockyy has quit [Ping timeout: 240 seconds]
foo-bar- has joined #ruby
<jhass>
yes
<jhass>
also since the method .to_s'es the argument, you can also use foo[:key]
bennylope has quit [Client Quit]
<ineb>
awesome. i wonder how one can search for something like that in the web
<jhass>
symbolhound.com
obscured has quit [Quit: leaving]
<ineb>
yes, second result came up with a stackoverflow example. ty
Atrumx has joined #ruby
vpretzel has quit [Remote host closed the connection]
atmosx has quit [Remote host closed the connection]
end_guy has quit [Read error: Connection reset by peer]
havenwood has quit [Read error: Connection reset by peer]
St_Marx has quit [Write error: Connection reset by peer]
tacos1de has quit [Write error: Connection reset by peer]
mr_foobar_baz has quit [Write error: Connection reset by peer]
exgf has quit [Write error: Connection reset by peer]
foo-bar- has quit [Ping timeout: 256 seconds]
noop has quit [Ping timeout: 240 seconds]
vpretzel has joined #ruby
exgf has joined #ruby
St_Marx has joined #ruby
havenwood has joined #ruby
michael_lee has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
CorySimmons has quit [Quit: Bye!]
mr_foobar_baz has joined #ruby
dideler has quit [Ping timeout: 240 seconds]
atmosx has joined #ruby
tacos1de has joined #ruby
vpretzel has joined #ruby
tus has quit [Ping timeout: 256 seconds]
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
mr_foobar_baz has joined #ruby
wallerdev has joined #ruby
chipotle has joined #ruby
replay has joined #ruby
vpretzel has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
Zenigor has quit [Remote host closed the connection]
n_blownapart has joined #ruby
heftig has joined #ruby
n_blownapart has quit [Remote host closed the connection]
utkarsh__ has quit [Quit: No Ping reply in 180 seconds.]
utkarsh_ has joined #ruby
arup_r has left #ruby [#ruby]
JBreit has joined #ruby
vpretzel has joined #ruby
j_mcnally has joined #ruby
end_guy has joined #ruby
ghr has joined #ruby
shredding has joined #ruby
theharshest has quit [Quit: This computer has gone to sleep]
tharindu has quit [Quit: Leaving...]
ghr has quit [Ping timeout: 256 seconds]
dh64 has joined #ruby
mijicd has quit [Remote host closed the connection]
bennylope has joined #ruby
shredding has quit [Quit: shredding]
charliesome has joined #ruby
JBreit has left #ruby ["Leaving"]
maestrojed has joined #ruby
frellnet has joined #ruby
aetaric has quit [Ping timeout: 240 seconds]
lxsameer has quit [Ping timeout: 256 seconds]
nemesit|znc has quit [Ping timeout: 272 seconds]
aetaric has joined #ruby
Xeago has joined #ruby
matchaw has joined #ruby
Primordus has joined #ruby
Shidash has quit [Quit: Leaving.]
nemesit|znc has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Morkel has quit [Quit: Morkel]
dangerousdave has joined #ruby
Primordus has quit [Client Quit]
angusiguess has joined #ruby
anaeem1 has joined #ruby
bennylope has quit [Quit: My Tandy 1000 has gone to sleep. ZZZzzz…]
autonomousdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
carraroj has quit [Ping timeout: 260 seconds]
moted has joined #ruby
puppeh has quit [Remote host closed the connection]
CaptainJet has quit []
axsuul has joined #ruby
kayloos_ has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 256 seconds]
andrewlio has joined #ruby
angusigu1ss has joined #ruby
hakunin has joined #ruby
Lockyy has joined #ruby
asdasdasdasss has quit [Ping timeout: 260 seconds]
axsuul has quit [Ping timeout: 240 seconds]
MartynKeigher has quit [Read error: Connection reset by peer]
JBreit has joined #ruby
hakunin_ has quit [Ping timeout: 264 seconds]
angusigu1ss has quit [Ping timeout: 240 seconds]
compAz has joined #ruby
hakunin_ has joined #ruby
JBreit has left #ruby [#ruby]
Lockyy has quit [Ping timeout: 256 seconds]
havenwood has quit [Remote host closed the connection]
memph1s has quit [Quit: I couldn't come up with quit message :(]
hmsimha has joined #ruby
hakunin__ has joined #ruby
hakunin has quit [Ping timeout: 260 seconds]
memph1s has joined #ruby
j_mcnally has quit [Read error: Connection reset by peer]
chrishough has quit [Quit: chrishough]
tectonic has joined #ruby
j_mcnally has joined #ruby
hakunin_ has quit [Ping timeout: 260 seconds]
Takle has joined #ruby
Takle has quit [Remote host closed the connection]
heftig_ has joined #ruby
Xeago has quit [Remote host closed the connection]
j416_ has joined #ruby
j416 has quit [Read error: Connection reset by peer]
Kabaka has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 260 seconds]
frankle has joined #ruby
Xeago has joined #ruby
lukec has quit [Quit: lukec]
davedev24_ has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
davedev24_ has joined #ruby
heftig_ is now known as heftig
Hanmac has quit [Ping timeout: 240 seconds]
relix has quit [Read error: Connection reset by peer]
relix_ has joined #ruby
lukec has joined #ruby
sdouglas has quit [Remote host closed the connection]
Takle has joined #ruby
nfk has quit [Ping timeout: 240 seconds]
yano has quit [Ping timeout: 612 seconds]
glebm has joined #ruby
Moonlightning has joined #ruby
lukec has quit [Ping timeout: 256 seconds]
memph1s has quit [Changing host]
memph1s has joined #ruby
Vivekananda_y510 has joined #ruby
<Moonlightning>
Out of curiosity, why is String#chomp named as such?
himself_ has joined #ruby
jgt has joined #ruby
compAz has quit []
francisfish has joined #ruby
asdasdasdasss has joined #ruby
Oxelist has joined #ruby
compAz has joined #ruby
<Mon_Ouie>
Because it "chomps off something at the end" I guess. Also to make it sound like a variant of #chop. Both names have been inherited from Perl.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has joined #ruby
d5sx43_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
francisfish has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Client Quit]
yfeldblu_ has quit [Ping timeout: 240 seconds]
<memph1s>
TIL, thanks :)
yfeldblum has joined #ruby
Poky has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 240 seconds]
datafirm has quit [Quit: Computer has gone to sleep.]
gil has quit [Remote host closed the connection]
datafirm has joined #ruby
Oxelist has quit [Ping timeout: 256 seconds]
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 260 seconds]
TheSojourner is now known as mjulian
yfeldblum has joined #ruby
jpierre03 has joined #ruby
benzrf is now known as benzrf|offline
<kbingham>
I want to change a form action in HAML/ruby based on whether the object exists or not so I tried : %form.well.form-horizontal{:method => 'POST', :action => (request ? "/request/#{request._id}" : "/request") }
<kbingham>
If request exists, its working fine and returning the request/<id> - but if request doesn't exists I want the resulting string to just be /request ... I'm getting the error NoMethodError - undefined method `request?' for #<Sinatra::Application:0x000000018e22a8>:
<kbingham>
Does anyone know how to correctly format the conditional for something that might not exist?
mr_foobar_baz has quit [Quit: WeeChat 0.4.3]
mr_foobar_baz has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
CodeLicker has joined #ruby
<jhass>
you're sure you get that on that line?
angusiguess has joined #ruby
Asher has joined #ruby
<kbingham>
jhass: Sorry - no it was this :
<kbingham>
I want to change a form action in HAML/ruby based on whether the object exists or not so I tried : %form.well.form-horizontal{:method => 'POST', :action => (request ? "/request/#{request._id}" : "/request") }
<kbingham>
argh
<kbingham>
damn clipboard
geardev has joined #ruby
<kbingham>
jhass: NoMethodError - undefined method `_id' for #<Sinatra::Request:0x00000002408df8>:
<geardev>
how would you utilize ActiveRecord from a rails console?
senayar has joined #ruby
<kbingham>
jhass: the `request?' was when I was trying to play around to find something that *would* work ;)
<jhass>
kbingham: well, then a method or local exists that's named request and it doesn't return nil or false but a Sinatra::Request
<geardev>
is activerecord considered a module or is it a library?
<jhass>
geardev: a gem, which is what ruby calls packaged libraries
<kbingham>
jhass: oh! interesting ... I'll try renaming to be sure.
<geardev>
thank you jhass
<jhass>
geardev: ActiveRecord is a constant that has a module assigned
<geardev>
would you load Active Record from the rails console with `load "ActiveRecord"`?
d5sx43 has quit [Remote host closed the connection]
<jhass>
geardev: no, load takes filenames as strings and you rarely use it directly, instead you use require
<jhass>
AR is normally loaded in a rails console already
vsoftoiletpaper has quit []
<geardev>
jhass: I'm failing to load ActiveRecord in the rails console
failshell has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 240 seconds]
<jhass>
why don't you ask your real question/describe your real problem? "it fails"/"it doesn't work" doesn't count
<centrx>
geardev, ActiveRecord is the CamelCase and active_record is the snake_case
foo-bar- has quit [Ping timeout: 264 seconds]
<jhass>
geardev: what constants you define inside the file is purely convention
<geardev>
why would you do class Zombie < ActiveRecord::Base instead of class Zombie < active_record::base?
<centrx>
Class names conventionally start with an uppercase letter and use camel case
<centrx>
In many languages
<centrx>
On the contrary, file names in Unix conventionally do not use capital letters at all
yano has joined #ruby
<jhass>
geardev: the former is a constant inside a namespace (a module assigned to a constant), the later would be a method called on the object returned by the method or local variable active_record
<kbingham>
NameError - undefined local variable or method `req' for #<Sinatra::Application:0x00000002d89418>:
failshell has joined #ruby
<jhass>
kbingham: you'd do (defined?(req) && req) ? ... : ..., but I much much prefer to make sure that req is always defined when the template is called and returns a sensible fallback value instead
papercode has quit [Quit: WeeChat 0.4.3]
<kbingham>
jhass: ah ok ... this template is to keep the page for updating a request, and creating a new request the same....
<kbingham>
so the aim was that if there wasn't an object yet - it will be blank and the POST destination just /request/ which will create the new object...
<jhass>
kbingham: what about passing @request_action = '/request' / @request_action = request._id to the template?
<jhass>
and have just {method: 'POST', action: @request_action} in the template
<kbingham>
the problem there is that I fill in all the fields / input boxes with the values from the request object if it exists ...
theharshest has joined #ruby
gwb3 has quit [Ping timeout: 240 seconds]
<kbingham>
so I really wanted a neat/tidy way of putting things in when the object exists, and not if it doesn't...
SCommette has joined #ruby
<kbingham>
so on the other fields, I had put : :value => (request ? request.category : nil)
<jhass>
then I'd do a custom request object that has a variant that returns nil for all fields if the request isn't available and also has a target_path method
gwb3 has joined #ruby
theharshest has quit [Client Quit]
timonv_ has joined #ruby
<kbingham>
ohh now that I think I like
lewix has quit [Remote host closed the connection]
<jhass>
then the Request itself can just be a struct with all the fields (including target_path) and the two constructing methods in its singleton class
gregf has joined #ruby
<kbingham>
thanks jhass, I'll try and plumb that it ...
tjr9898 has quit [Read error: Connection reset by peer]
ghr has joined #ruby
tjr9898 has joined #ruby
shvelo has joined #ruby
idiocrash has joined #ruby
d5sx43 has joined #ruby
banisterfiend has joined #ruby
poimen has joined #ruby
freerobby has joined #ruby
timonv_ has quit [Ping timeout: 240 seconds]
pwk has joined #ruby
benzrf|offline is now known as benzrf
<pwk>
hi, why does "h = Hash.new(Array.new(10, "hi")); h["a"][3] = "ho"; h" give me an empty hash? Didnt i create an entry for "a" in h and modify the fourth element to "ho"?
<apeiros>
pwk: because you modify the default value
<apeiros>
you don't modify the hash
freggles has joined #ruby
freggles has quit [Changing host]
freggles has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
theharshest has joined #ruby
<pwk>
apeiros: okay...any obvious way i can make it do what I wanted it to do?
pu22l3r has quit [Remote host closed the connection]
M-Technic has quit [Quit: leaving]
d5sx43 has quit [Ping timeout: 240 seconds]
lw has quit [Quit: s]
freerobby has quit [Quit: Leaving.]
LiquidInsect has quit [Read error: Connection reset by peer]
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
Shidash has joined #ruby
moted has quit [Quit: moted]
freerobby has joined #ruby
hsps_ has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
penzur has quit [Ping timeout: 240 seconds]
lxsameer has joined #ruby
lxsameer has joined #ruby
<war32>
Guys, I'm reading The Well Grounded Rubyist, book is very good, but lacking practice. Maybe somebody knows where to get the problems for beginners (like project euler, but for learning ruby)?
<zenspider>
Renich: the client library will have API for this
<godd2>
just make sure that the thing you're scanning has an even number of single quotes and that those single quotes only ever surround wanted data and that the contents of wanted data are only word characters
<Renich>
zenspider: surprisingly, it doesn't: Sequel
<zenspider>
I don't believe that. look more.
war32 has quit [Quit: WeeChat 0.4.3]
d5sx43 has quit []
<Renich>
godd2: I think that is guaranteed in the result set of MariaDB. Thanks a lot
war32 has joined #ruby
<Renich>
zenspider: check out what the creator said: jeremyevans: In MySQL it's more difficult as the database doesn't provide that information in a simple format
<Renich>
zenspider: jeremyevans: Renich: I'm not planning on adding support, but if you want a similar extension for MySQL, you can do that
<memph1s>
router/controller/model - full replacement of rails :)
<memph1s>
and everything is just a plain ruby object
<memph1s>
no rails magic
kireevco has quit [Max SendQ exceeded]
<memph1s>
(not production ready) :)
<Renich>
memph1s: I'm pretty much into Padrino, but will check lotus as well
dangerousdave has quit [Ping timeout: 240 seconds]
kireevco has joined #ruby
<zenspider>
memph1s: thanks
lw has joined #ruby
<memph1s>
np
cashnguns has quit [Ping timeout: 240 seconds]
saarinen has quit [Quit: saarinen]
BBBThunda has joined #ruby
kireevco1 has joined #ruby
<memph1s>
I believe lotus-model is the latest implementation of datamapper pattern, ROM is very slow, datamapper gem is outdated and is implemented actually using active record pattern
ericmathison has joined #ruby
<toretore>
i would think it uses the datamapper pattern
<memph1s>
nope
<memph1s>
persistence and schema are in the model
<memph1s>
that's activerecord
yfeldblum has joined #ruby
arya_ has quit [Ping timeout: 240 seconds]
jeremywrowe has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<memph1s>
in lotus model is a plain ruby object, there is a mapper which maps db tables to that object
<memph1s>
sorry, db table's columns
senayar has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
francisfish has quit [Remote host closed the connection]
senayar has joined #ruby
kireevco has quit [Ping timeout: 240 seconds]
klaut has quit [Remote host closed the connection]
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
kayloos has joined #ruby
vsoftoiletpaper has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
einarj__ has joined #ruby
Xeago has joined #ruby
mijicd has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 240 seconds]
britneywright has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
angusiguess has joined #ruby
roolo has quit [Quit: Leaving...]
yfeldblum has quit [Read error: Connection reset by peer]
memph1s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
kayloos has quit [Ping timeout: 240 seconds]
Takle has quit [Remote host closed the connection]
crypwolf has quit []
geardev has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
einarj__ has quit [Remote host closed the connection]
vifino has quit [Quit: Ze Cat now leaves...]
angusiguess has quit [Ping timeout: 256 seconds]
asdasdasdasss has quit [Quit: Computer has gone to sleep.]
maestrojed has quit [Quit: Computer has gone to sleep.]
asdasdasdasss has joined #ruby
britneywright has joined #ruby
gruz0[russia] has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
asdasdasdasss has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
cashnguns has joined #ruby
havenwood has quit [Remote host closed the connection]
Dude007 has quit [Read error: Connection reset by peer]
Dude007 has joined #ruby
halfdan is now known as GERdan
binaryhat has quit [Remote host closed the connection]
binaryhat has joined #ruby
fabrice31 has joined #ruby
kireevco1 has quit [Quit: Leaving.]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BadQuanta has joined #ruby
saarinen has joined #ruby
havenwood has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
<Renich>
hey guys, thanks for the help, feedback and recommendations