<ruby[bot]>
marchelzo: I'm terribly sorry, I could not evaluate your code because of an error: NoMethodError:undefined method `[]' for nil:NilClass
bkxd has joined #ruby
<marchelzo>
._.
<Eiam_>
;P
<Eiam_>
fetch man, its safe
gusrub has joined #ruby
ur5us has joined #ruby
mim1k has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
marr has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
enterprisey has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 256 seconds]
EckT has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
esObe has quit [Remote host closed the connection]
<SeepingN>
need ||=
ddffg has quit [Quit: Leaving]
nictrasavios has left #ruby ["Ex-Chat"]
esObe has joined #ruby
<Eiam_>
hmm it still destroys each new iteration
esObe has quit [Ping timeout: 256 seconds]
longtran415 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo>
i need life advice
<marchelzo>
how do i get hired to work on rails apps
<marchelzo>
i don't know rails
mlindahl has quit [Remote host closed the connection]
Channel6 has joined #ruby
mlindahl has joined #ruby
<havenwood>
marchelzo: Learn you some Rails for great good. Then you can get hired. Or get hired then learn you some Rails.
<marchelzo>
havenwood: how do i learn it though
<havenwood>
marchelzo: Order optional. Books help.
<Eiam_>
hmm, fetch won't always execute the block. damnit
<marchelzo>
is it worth learning still i have no professional experience. is it a good way to start my career
<havenwood>
marchelzo: Well, you can get a non-Rails Ruby job, but Rails is quite popular so its a good bet.
mim1k has joined #ruby
<havenwood>
it's*
<Eiam_>
block is only executed if fetch fails, not on top of the resulting value if it doesn't fail
<marchelzo>
havenwood: how does rails work
<havenwood>
marchelzo: Do you know what Rack is?
<Eiam_>
well thats a topic with many books on it
<marchelzo>
havenwood: nope
<Eiam_>
marchelzo: I was hired to work on something that ended up being written in ruby and rails, I knew neither.
<havenwood>
marchelzo: I'd suggest first creating a Rack app. Rails is one of many Rack adapters.
TPug has joined #ruby
<havenwood>
marchelzo: It shouldn't take you long at all to create a Rack "Hello world" then go on to make a few routes and error codes.
<marchelzo>
ok
<marchelzo>
now this rack thing
<Eiam_>
marchelzo: life advice, apply for places that hire people to solve problems not people who know <x> technology
<havenwood>
marchelzo: At that point you'll see why you want to use something other than Rack. Then make a Roda app, and read through each of the Roda plugins - to see what all else you might want to bring to a framework.
<havenwood>
marchelzo: Then look at Rails.
mlindahl has quit [Ping timeout: 268 seconds]
<Eiam_>
that rails app I was hired to work on, long gone, replaced by various bits of Closure, Python and other things. guess im the outlier .
<marchelzo>
can i use rails apps with nginx through fastcgi
cgibsonmm has joined #ruby
zacts has joined #ruby
<Eiam_>
rack uses webrick by default I thought
<havenwood>
marchelzo: You typically reverse proxy from Nginx to the socket or port of your Rack Webserver.
<marchelzo>
so people use the rack webserver in production?
<havenwood>
marchelzo: Yes.
mim1k has quit [Ping timeout: 260 seconds]
<havenwood>
marchelzo: There are many Rack apps. Or there are simple Rack adapters like Sinatra or Roda. Or convention-based ones like Rails or Hanami.
<marchelzo>
i see
<marchelzo>
once i get familiar with rack, and look at roda, how should i learn about rails
<havenwood>
marchelzo: Read a book on Rails. Or even just start with the Rails docs. They're pretty good.
<havenwood>
marchelzo: If you know Rack and Roda and are familiar with the Roda plugins, then a lot of what Rails adds will become apparent.
<havenwood>
marchelzo: A book will guide you from routes to controllers, models and views. Rails has many labeled drawers to put things in.
geekb4ck has joined #ruby
marxarelli is now known as marxarelli|afk
<havenwood>
marchelzo: It's worth knowing how to make a simple Rack app, Sinatra/Roda app, and Rails/Hanami app.
Rodya_ has quit [Remote host closed the connection]
<cgibsonmm>
I have a question on nested resources, I have a nested ads controller inside of mags controller, When I link to new_mag_ads_path(@mag, @ads) I need to be able to access the @mag.id and I am not having luck.
JeanCarloMachado has quit [Read error: Connection reset by peer]
<marchelzo>
i thought Sinatra was simple
<marchelzo>
it makes more allocations/request and handles fewer requests/sec
mim1k has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marchelzo>
than rails*
rfoust has joined #ruby
mim1k has quit [Ping timeout: 255 seconds]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
cgibsonmm has quit []
JeanCarloMachado has joined #ruby
_whitelogger has joined #ruby
<geekb4ck>
anyone able to help me sort out why im able to interact with a UNIXSocket using 'socat' with no problem but can't 's = UNIXSocket.new("path")' and then 's.write'. write never completes it looks like
TheHodge has quit [Quit: Connection closed for inactivity]
raspado has quit [Remote host closed the connection]
<fowlduck>
code showing the behavior might help us help you
<eam>
geekb4ck: bind vs connect
<eam>
UNIXSocket.new is doing a bind
skweek has joined #ruby
<eam>
and I'm assuming you want to connect to an existing socket?
<geekb4ck>
eam: yes. a daemon has opened the socket and im trying to write to it and read the response
<eam>
use #open
jameser has joined #ruby
jc_io has quit [Quit: WeeChat 0.3.7]
<eam>
wait let me make sure I'm giving you the right advice
mim1k has joined #ruby
<geekb4ck>
i've seen some code regarding HAProxy but haven't found much else
<eam>
nah I have it backwards, #new should be connect() and #open should be bind()
<geekb4ck>
when i type "help" and hit enter, the response comes back through the socket
<eam>
try s.syswrite
<geekb4ck>
i've modified the daemon side and added a bunch of locations to have it log where it is and have found that the server side is not receiving the input. its starting a listener for the input but it never finishes receiving the data.
<eam>
is it even writing?
<eam>
one no-no is using buffered io and socketes
bkxd has quit [Ping timeout: 268 seconds]
ocbtec has quit [Quit: leaving]
gusrub has quit []
raul782 has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Chagel has joined #ruby
jhack has joined #ruby
milardovich has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
<geekb4ck>
dang. im having zero luck.
<marchelzo>
:/
safetypin has joined #ruby
<marchelzo>
i believe in you geekb4ck
safetypin has quit [Client Quit]
kht has joined #ruby
mim1k has joined #ruby
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
mlindahl has joined #ruby
jhack has quit [Quit: jhack]
raul782 has joined #ruby
zeroDi has quit [Quit: WeeChat 1.7]
milardovich has quit [Remote host closed the connection]
fkiejs has quit [Remote host closed the connection]
<noan>
what's the 'right' way to handle importing everything in to a ruby project? Is it really just to require_relative basically everything? And how would one go about exposing a singleton object to many many files without fear of creating duplicates?
<herwin>
isn't the definition of a singleton object that you can't create duplicates?
<toretore>
the right way is to `require 'file'` at the top of each file where 'foo' is used
blaxter has quit [Quit: foo]
<noan>
herwin, I haven't touched ruby in a couple years... so yeah, that's the desire. I am not sure how much I trust myself to do it right in ruby though. Ruby is very very permissive
teclator_ has quit [Ping timeout: 276 seconds]
<noan>
toretore, is it acceptable practice to create a rackup file and just recursively grab up everything? Ie. models, controllers, the like? For context, I am creating a sinatra project.
jenrzzz has joined #ruby
<toretore>
no
<toretore>
in each file, require what you need
Silthias1 has quit [Ping timeout: 240 seconds]
<noan>
if A requires B requires C, each at the top of the file, does A see C?
patarr has joined #ruby
<toretore>
if A requires B, it should `require 'b'`, no more, no less
<noan>
that's what I mean
<noan>
a.rb at the top calls require 'b'. b at the top calls require 'c'. Is c exposed in a?
<herwin>
that's pretty easy just to try out
<toretore>
whether A can "see" C or not is irrelevant. if you have an explicit dependency in A on C, then A should require 'c'
govg has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore>
but you shall not rely on the fact that B requires C to use C in a without declaring this dependency explicitly
csk157_ has quit [Quit: WeeChat 1.7]
<noan>
In that context I was more concerned with 'bleed through'
<noan>
and namespace pollution
govg has joined #ruby
csk157 has joined #ruby
<toretore>
everything that's required is available globally
<toretore>
so namespacing is something you have to do yourself
Sp4rKy_ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
patarr has quit [Ping timeout: 255 seconds]
Silthias has joined #ruby
<noan>
okay good to know. now I'm trying to figure out how ruby handles the case of multiple different files requiring the same dependency where the dependency defines something I only ever want to exist once, namely my database connection pool.
<toretore>
requiring a file should not result in something like that
yokel has quit [Ping timeout: 260 seconds]
<noan>
so if I have db.rb that defines DB = Sequel.connect(..... each model.rb file should be able to safely require that in?
mim1k has joined #ruby
<toretore>
it should be: `require 'db/pool'; my_pool = DB::Pool.new`
<toretore>
you should not have that in a file and require it
loechel has joined #ruby
<noan>
okay, so then the DB should be required only once, in say the app context? Then models required after would have that exposed to them? or should it be passed to them later as an argument?
<toretore>
it should be passed
nowhere_man has joined #ruby
mikecmpbll has joined #ruby
<toretore>
the first option is relying on external state that may or may not be there, which causes all sorts of problems
nowhere_man has quit [Client Quit]
yokel has joined #ruby
Pumukel has quit [Ping timeout: 245 seconds]
jsrn has joined #ruby
nowhere_man has joined #ruby
nowhere_man has quit [Client Quit]
loechel has quit [Read error: Connection reset by peer]
mim1k has quit [Ping timeout: 240 seconds]
Pumukel has joined #ruby
nowhereman has joined #ruby
<noan>
hmm, I think Sequel models by default look for something named "DB" in the global namespace.
nowhereman has quit [Read error: Connection reset by peer]
<Burgestrand>
noan in ruby, `require`ing the same file twice will only evaluate it once, as long as it's in the same path
jcao219 has joined #ruby
BackEndCoder has joined #ruby
<Burgestrand>
noan it's because `require`d files end up in $LOADED_FEATURES, and if a required file's path match one of those in $LOADED_FEATURES it won't be pulled in again
astrobunny has quit [Remote host closed the connection]
djbkd has quit []
<Burgestrand>
noan it is not uncommon to have a `config.rb` that sets up things like `DB = …` or other one-off globals/singletons
aryaching_ has joined #ruby
<noan>
Burgestrand, cheers
CloCkWeRX has quit [Client Quit]
CloCkWeRX has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
aryaching has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 256 seconds]
TheHodge has joined #ruby
<Burgestrand>
noan oh and one last thing, it's also not crazy to expect to have some kind of environment set up before you without explicitly requiring `config.rb` in every file, so it's OK to require `config.rb` from `app.rb` before requiring all your other dependencies
<Burgestrand>
noan I came a bit late to the party but I wanted to give a slightly different perspective than the one you were given :P
<noan>
I appreciate it. Last time I worked in ruby it was in a rails context, which obviously does have a lot of the environment setup idea going on
jenrzzz has joined #ruby
despai has quit [Ping timeout: 258 seconds]
despai has joined #ruby
despai has quit [Client Quit]
loechel has joined #ruby
<Burgestrand>
noan most non-rails things tend to end up with a bug-ridden poor implementation of rails anyways, it's expected to be a bit lost :)
nankyokusei has joined #ruby
<Burgestrand>
noan (if you're still doing web that is)
<noan>
I am
<noan>
I'm trying to quickly scaffold a test-api for a game I'm working on
<noan>
if it ever gets near to a real usable form, I'll throw the ruby api away in favour of something faster
<noan>
this is just meant as a prototype
govg has quit [Ping timeout: 240 seconds]
<Burgestrand>
noan that makes sense!
<Burgestrand>
I'm quite comfortable doing non-rails web things, but it's easy to fall into the trap of inventing your own web framework instead of actually doing what you wanted to do in the first place :P
despai has joined #ruby
<noan>
oh yeah screw that
<noan>
I'm just using sinatra and sequel
hotpancakes has joined #ruby
Pumukel has quit [Ping timeout: 245 seconds]
<noan>
give me some to and from json, some endpoints, a couple connection filters, and I'm happy
<noan>
:3
nankyokusei has quit [Ping timeout: 276 seconds]
jud has quit [Read error: Connection reset by peer]
jud has joined #ruby
<Burgestrand>
:)
bkxd has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
govg has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
loechel has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
minimalism has quit [Ping timeout: 260 seconds]
Tharbakim has quit [Ping timeout: 252 seconds]
minimalism has joined #ruby
nettoweb has joined #ruby
yeticry has joined #ruby
hahuang61 has joined #ruby
Tharbakim has joined #ruby
Fernando-Basso has joined #ruby
marr has joined #ruby
yeticry_ has quit [Ping timeout: 264 seconds]
nettoweb has quit [Client Quit]
aryaching has joined #ruby
Tharbakim has quit [Excess Flood]
Tharbakim has joined #ruby
hahuang61 has quit [Ping timeout: 245 seconds]
aryaching_ has quit [Ping timeout: 240 seconds]
despai has quit [Read error: Connection reset by peer]
despai has joined #ruby
Beams has joined #ruby
dionysus69 has quit [Ping timeout: 258 seconds]
radic has quit [Ping timeout: 240 seconds]
SirOliver has joined #ruby
yokel has quit [Ping timeout: 260 seconds]
ketan has quit [Remote host closed the connection]
ketan has joined #ruby
govg has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby
neuraload has quit [Quit: Leaving]
Sp4rKy_ has quit [Quit: leaving]
yokel has joined #ruby
neuraload has joined #ruby
despai has quit [Ping timeout: 260 seconds]
grh has quit [Ping timeout: 260 seconds]
milardovich has joined #ruby
Sp4rKy has quit [Quit: leaving]
csk157 has quit [Quit: WeeChat 1.7]
Sp4rKy has joined #ruby
ych has joined #ruby
Sp4rKy is now known as Guest89584
aryaching_ has joined #ruby
milardovich has quit [Ping timeout: 252 seconds]
davezd has joined #ruby
Guest89584 has quit [Quit: Reconnecting]
jamesaxl has quit [Read error: Connection reset by peer]
Sp4rKy_ has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
lxsameer has quit [Quit: WeeChat 1.6]
despai has joined #ruby
jamesaxl has joined #ruby
vondruch has quit [Quit: vondruch]
despai has quit [Client Quit]
pragmaticus has quit [Ping timeout: 276 seconds]
Sp4rKy_ has quit [Changing host]
Sp4rKy_ has joined #ruby
hotpancakes has joined #ruby
jeyraof^mbpr has quit [Quit: This computer has gone to sleep]
Pumukel has quit [Remote host closed the connection]
grh has joined #ruby
freddymungo_ has joined #ruby
loechel has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
Sp4rKy_ is now known as Sp4rKy
nettoweb has joined #ruby
ChampagneHouse has joined #ruby
JoshS has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
vondruch has joined #ruby
aryaching_ has quit [Ping timeout: 260 seconds]
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
zotherstupidguy has quit [Ping timeout: 264 seconds]
ChampagneHouse is now known as NeverTired
ldnunes has joined #ruby
yokel has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
nofxx has quit [Ping timeout: 256 seconds]
yokel has joined #ruby
zipp0 has joined #ruby
zipp0 has left #ruby [#ruby]
stevenhong has quit [Remote host closed the connection]
r4z3r has quit [Quit: Windows isn't a virus, viruses do something.]
braincrash has joined #ruby
newrubycoder has joined #ruby
neuraload has quit [Quit: Leaving]
synthroid has quit [Remote host closed the connection]
renchan has joined #ruby
last_staff has quit [Quit: last_staff]
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
swills has joined #ruby
padi_ has quit [Ping timeout: 260 seconds]
Jovial has joined #ruby
bmurt has joined #ruby
vondruch has quit [Quit: vondruch]
<pagios>
A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'null' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute. my sinatra is plying wih this how can i sovl tihs?
<apeiros>
pagios: that sounds more like javascript than ruby?
milardovich has joined #ruby
<pagios>
apeiros, its my havascript as a client
UnknownSoldier has quit [Read error: Connection reset by peer]
jameser_ has joined #ruby
Derperperd has joined #ruby
millerti has joined #ruby
<Burgestrand>
Doesn't allowing wildcard as the origin kind of remove the point of CORS-protection in the first place?
_sfiguser has joined #ruby
<apeiros>
s/kind of//
<apeiros>
afaik yes, it does
<Burgestrand>
AH!
vondruch has joined #ruby
jameser has quit [Ping timeout: 240 seconds]
<Burgestrand>
I realized it's not that strange to have an API that could safely be called from anywhere
<apeiros>
I don't think that's the kind of protection cors provides?
<Burgestrand>
However, that only holds true as long as the call is unauthenticated
<Burgestrand>
i.e. without credentials, no?
<apeiros>
cors is for your browser to know whether code on the current page can make requests to other domains iirc
<dminuoso>
<Burgestrand> Doesn't allowing wildcard as the origin kind of remove the point of CORS-protection in the first place?
<dminuoso>
This is proof why pagios shouldn't be touching this at all.
vondruch has left #ruby [#ruby]
<apeiros>
the server (api) usually doesn't care about the source of request as long as credentials fit
milardovich has quit [Ping timeout: 240 seconds]
<Burgestrand>
apeiros isn't the CORS headers returned as a response to the actual API request when calling a domain that is not the origin (current)?
<apeiros>
on an API response? don't think so. on html responses.
cibs has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
<apeiros>
i.e. when you render a site which contains code, so that code knows that it can access other domains
<Burgestrand>
apeiros e.g. you make an AJAX call to api.com from evil.com, the response from api.com contains CORS headers
<apeiros>
or rather, the browser executing said code knows…
vondruch has joined #ruby
<Burgestrand>
apeiros I don't think so, the whole point of preflight requests is to avoid doing the call in the first place for non-safe calls (e.g. post)
xen0fon has quit [Quit: xen0fon]
<apeiros>
now I'm going to reread that stuff…
<Burgestrand>
apeiros :D
Derperperd has quit [Ping timeout: 260 seconds]
XdaddyZX has left #ruby [#ruby]
Luna_Moonfang has quit [Quit: WeeChat 1.7]
cibs has joined #ruby
Luna_Moonfang has joined #ruby
bw__ has quit [Ping timeout: 240 seconds]
_ht_ has quit [Ping timeout: 240 seconds]
yokel has quit [Ping timeout: 260 seconds]
_ht has joined #ruby
bw__ has joined #ruby
<apeiros>
eh, seems I had that wrong
yokel has joined #ruby
Qchmqs has quit [Quit: Konversation terminated!]
jameser has joined #ruby
<pagios>
cors is on client side?
<apeiros>
cors is server+client side
jameser_ has quit [Ping timeout: 252 seconds]
Definity has joined #ruby
<Burgestrand>
Yeah, and credentials not only mean HTTP auth (as I originally thought), but also cookies
<apeiros>
but reading about how it works it seems to me of questionable/very limited use
advorak has quit [Quit: Leaving]
<apeiros>
I mean from the server's point of view all cors does is purely advisory.
<dminuoso>
CORS for APIs is silly anyway.
GodFather has joined #ruby
<Burgestrand>
Yeah, it's a browser safety mechanism foremost
<dminuoso>
CORS is enforced in browsers.
<dminuoso>
Yup.
<apeiros>
and in the browser I'm having trouble seeing a usecase where it'd be a real help
<Burgestrand>
It can be used to e.g. allow direct uploads to an S3 bucket without passing data through the backend first
<toretore>
cors is not for restricting, it's for *allowing* x-domain xhr
<toretore>
without cors, same-origin applies
freddymungo_ has quit [Ping timeout: 260 seconds]
<apeiros>
toretore: I understood that. but it seems to be done the wrong way round.
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jameser has quit [Ping timeout: 240 seconds]
hobodave has joined #ruby
Derperperd has joined #ruby
grh has quit [Ping timeout: 240 seconds]
Qchmqs has joined #ruby
Snickers has quit [Ping timeout: 240 seconds]
troulouliou_div2 has joined #ruby
jameser has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
jameser has quit [Client Quit]
DLSteve has joined #ruby
DLSteve has quit [Client Quit]
DLSteve has joined #ruby
despai has quit [Ping timeout: 264 seconds]
hotpancakes has joined #ruby
saneax is now known as saneax-_-|AFK
tvw has quit [Remote host closed the connection]
xen0fon has joined #ruby
fuzzyhorns has joined #ruby
fuzzyhorns has quit [Client Quit]
yokel has quit [Ping timeout: 240 seconds]
fuzzyhorns has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
griffindy has joined #ruby
Beams has quit [Quit: .]
nettoweb has joined #ruby
yokel has joined #ruby
enterprisey has quit [Remote host closed the connection]
Snickers has joined #ruby
ecuanaso has joined #ruby
hutch34 has joined #ruby
Beams has joined #ruby
troulouliou_divn has joined #ruby
troulouliou_div2 has quit [Ping timeout: 240 seconds]
koneko has joined #ruby
Rutix has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
<al2o3-cr>
why aren't anonymous modules included in Module.used_modules
hutch34 has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
Beams has quit [Client Quit]
bkxd has joined #ruby
stoffus has quit [Ping timeout: 240 seconds]
jzigmund has joined #ruby
despai has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 260 seconds]
ifctj has joined #ruby
troulouliou_divn has quit [Remote host closed the connection]
Beams has joined #ruby
despai has quit [Client Quit]
ramortegui has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
catphish has joined #ruby
<catphish>
is it possible to convert an ERRNO to its actual error number?
<catphish>
centrx: awesome, dunno why i didn't find that, thanks!
millerti has joined #ruby
<catphish>
any idea about the other way around?
<catphish>
they're OS specific, so actually storing the numbers for anything probably isn't actually a good idea
Beams has quit [Quit: .]
<catphish>
thanks anyway :)
milardovich has joined #ruby
harfangk has joined #ruby
Iacobus__ has left #ruby [#ruby]
blackmesa has joined #ruby
<noan>
sooo... with rack... can I nest a map call? like map '/private' do ... more maps end map '/public' do ... public maps... end?
hutch34 has joined #ruby
milardovich has quit [Ping timeout: 245 seconds]
<newrubycoder>
hey guys when i try to make an alphabet array in ruby A-z, i get "[", "\\", "]", "^", "_", "`" between the Z and a, any way to avoid those symbols?
sepp2k has joined #ruby
<newrubycoder>
alp = ('A'..'z').to_a
Beams has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jgnagy_>
that said, looks like they've done sone other strange things with Forwardable
<apeiros>
jgnagy_: spank. I say.
<dminuoso>
jgnagy_, or you could do this.
<jgnagy_>
because doing that mostly worked, but then I got `ArgumentError: wrong number of arguments (given 2, expected 1) for forwardable.rb:133
<dminuoso>
jgnagy_, class Foo < ActiveModel::Model; prepend Munson::Resource; end
<dminuoso>
(:
aupadhye has quit [Ping timeout: 240 seconds]
<dminuoso>
Same thing kind of.
nankyokusei has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
<jgnagy_>
I'll try it and see if it makes a difference
millerti has joined #ruby
<dminuoso>
jgnagy_, you can delay the prepend until you've done everything that Munson::Resource monkey patches.
<jgnagy_>
I've considered several times making my own library to do what Munson does
<jgnagy_>
with less cruft
pilne has joined #ruby
<dminuoso>
oh wait.
<dminuoso>
jgnagy_, this wont work because it's not a class.
<jgnagy_>
that's probably what I'll need to do, the whole delay thing.. but I didn't know how to delay subclassing
<dminuoso>
mmm thats a bummer.
<jgnagy_>
indeed it is
<dminuoso>
under the hood this would have done the same thing though.
nowhere_man has quit [Ping timeout: 240 seconds]
<dminuoso>
BUT!
<dminuoso>
jgnagy_, here's where my hack comes into play.
<dminuoso>
jgnagy_, did you ever write Ruby code, wanting to cast the type of an object?
<jgnagy_>
maybe there is a way to copy a method definition (i.e., include), remove it (so Ruby finds a parent's definition), then put it back when I'm done?
<jgnagy_>
yeah, I've done that
<jgnagy_>
Integer(string)
<jgnagy_>
etc
<dminuoso>
No that's not a cast!
<dminuoso>
Give me a moment, gotta find it :)
<jgnagy_>
well, ok
<jgnagy_>
10.to_s maybe?
despai has joined #ruby
lenwood has quit [Ping timeout: 256 seconds]
Derperperd has joined #ruby
nankyokusei has quit [Ping timeout: 245 seconds]
Silthias has joined #ruby
<dminuoso>
jgnagy_, noo you silly. That's not how you cast.
<dminuoso>
(Had to dig out the password on my old github profile)
<jgnagy_>
whoa
Silthias2 has joined #ruby
<elomatreb>
Do I want to know what that instance_variable_set thing does?
<dminuoso>
This will segfault if you try more than read instance variables for various reasons, but you can use this to get around thie "class/module" checks for Module.prepend :p
<dminuoso>
elomatreb, no you dont!
mikecmpbll has quit [Ping timeout: 260 seconds]
Silthias1 has quit [Ping timeout: 245 seconds]
<dminuoso>
elomatreb, Ive written a small comment explaining it though.
<dminuoso>
the iv table gets initialized when the first object of a class is created I think?
<jgnagy_>
I think I'll leave this as a last resort... messing with FFI and pointers and risking segfaults might do what I want, but...
<dminuoso>
jgnagy_, I'd love to see this into production code other than mine!
<elomatreb>
Didn't see the comment. Nice hax
<jgnagy_>
I just want to use instances of Munson::Resource in rails form_for() helpers
Beams has quit [Quit: .]
marxarelli has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
<jgnagy_>
and most of the things that requires are just making strings from class names messing with pluralization
<dminuoso>
elomatreb, mm no. That's not it. I cant remember from the top off my head, but if you tried to read instance variables without the iv table being initialized you would seg fault ruby.
<jgnagy_>
ActiveModel::Model or ActiveModel::Naming would have been handy
<dminuoso>
jgnagy_, what you could do is set up a method_missing on your classes singleton class that forwards everything to Class do your magic, and then undef_method that method_missing
<dminuoso>
basically create a temporary shortcut around that toxic class
mikecmpbll has joined #ruby
<jgnagy_>
hmmm
loechel has joined #ruby
<dminuoso>
that actually is not too horrible
BackEndCoder has quit [Excess Flood]
BackEndCoder has joined #ruby
<dminuoso>
if only you could uninclude a method.
<dminuoso>
*MODULE
<jgnagy_>
yes
<jgnagy_>
if only, or just delay subclassing
patarr has joined #ruby
<jgnagy_>
mixing _before_ subclassing
<dminuoso>
<dminuoso> jgnagy_, what you could do is set up a method_missing on your classes singleton class that forwards everything to Class do your magic, and then undef_method that method_missing
<jgnagy_>
and all would be well
<dminuoso>
^- that will delay that subclassing effectively
montanonic has quit [Ping timeout: 240 seconds]
<jgnagy_>
ah, so don't subclass, just use method_missing to send what _would_ have gone to Munson::Resource
<jgnagy_>
hmmm
<jgnagy_>
well, I believe some of Munson's magic relies on class names
shinnya has quit [Ping timeout: 260 seconds]
<jgnagy_>
Foo corresponds to /foo, so I wonder what calling methods on Munson::Resource through method_missing would do
Pumukel has quit [Ping timeout: 258 seconds]
<jgnagy_>
I suppose some combination of classes and proxy classes with method_missing might work
dn` has quit [Ping timeout: 240 seconds]
loechel has quit [Ping timeout: 245 seconds]
<jgnagy_>
basically a wrapper around Foo, where Foo is a subclass of Munson::Resource, and the wrapper (maybe FooProxy) mixes in the ActiveModel::Model module?
<dminuoso>
jgnagy_, ^- finally fully working example.
jsho has joined #ruby
<jgnagy_>
on a mission
<jgnagy_>
:)
<dminuoso>
This is actually perfectly safe to use now.
lanc has joined #ruby
raul782 has joined #ruby
<jgnagy_>
you should wrap that in some friendlier-named methods and release it as a gem
Xentil has joined #ruby
<jgnagy_>
the mind_blown gem name is available
<jgnagy_>
;-)
nettoweb1 has quit [Ping timeout: 260 seconds]
djellemah_ has quit [Quit: Leaving]
nettoweb has joined #ruby
<dminuoso>
jgnagy_, There used to be a gem with fancy stuff like this in pre-2.0 times
whathappens has joined #ruby
djellemah_ has joined #ruby
Bigtawn has joined #ruby
<dminuoso>
jgnagy_, the less disturbing part is the names, but the fact that you have to respect the method hierarchy. See how you end up setting the superclass of FunStuff to Toxic in the end?
Derperperd has joined #ruby
cd-rum has joined #ruby
Silthias has joined #ruby
raul782 has quit [Ping timeout: 240 seconds]
Silthias2 has quit [Ping timeout: 240 seconds]
whathapp_ has quit [Ping timeout: 240 seconds]
<jgnagy_>
yes
<jgnagy_>
that is a bit odd, especially since FunStuff is a module, not a class
Silthias1 has joined #ruby
UnknownSoldier has quit [Remote host closed the connection]
<jgnagy_>
nicely done, that's some impressive work
<jgnagy_>
seems like that should be a thing
GodFather has joined #ruby
<dminuoso>
Actually.. I think I can replace the method cache by just invoking the GC.
bkxd has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
ta has joined #ruby
<dminuoso>
jgnagy_, https://eval.in/739092 thats a bare minimum with all the unused methods (that were left overs from other experiments) cut away.
<dminuoso>
its not too bad actually
<dminuoso>
Thinking it should be on class Class even.
<dminuoso>
though.. no. it should be module.
safetypin has joined #ruby
SirOliver has joined #ruby
ur5us has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
esObe has joined #ruby
bkxd has joined #ruby
ldnunes has quit [Quit: Leaving]
JeanCarloMachado has quit [Ping timeout: 268 seconds]
bkxd has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
bkxd has joined #ruby
m8051 has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
johnny56 has joined #ruby
whathappens has quit [Remote host closed the connection]
whathappens has joined #ruby
montanonic has quit [Ping timeout: 252 seconds]
jsho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
whathappens has quit [Ping timeout: 240 seconds]
milardov_ has quit [Read error: Connection reset by peer]
milardovich has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
despai has joined #ruby
SirOliver has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
tlaxkit has quit [Remote host closed the connection]
m8051 has left #ruby ["Leaving"]
nowhereman has quit [Ping timeout: 240 seconds]
ekinmur has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raul782 has joined #ruby
bigtawm has joined #ruby
<mjuhl>
What framework for automated testing do you use?
<bigtawm>
Just read beginning ruby by Peter Cooper. I was thinking about reading well grounded rubyist next along with Hartls rails tutorial. Does anyone have any other recomendations?
<bigtawm>
recommendations*
nettoweb1 has joined #ruby
enterprisey has joined #ruby
markholmes has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
nettoweb has quit [Ping timeout: 258 seconds]
<synstack>
bigtawm: I recommend keeping the Pickaxe handy
<synstack>
if you don't read it through, it's very useful as a reference for specific topics you want to know more about
tomphp has joined #ruby
<SirOliver>
mjuhl - cucumber & rspec
<bigtawm>
Thats programming ruby by dave thomas right? I've seen that its like JavaScript the definitive guide by flanagan in a sense correct?
<synstack>
I wouldn't know about that, but yeah that's the one
raul782 has quit [Remote host closed the connection]
tlaxkit has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
<dminuoso>
mjuhl, the community is pretty much split half in half. There's minitest and rspec.
<dminuoso>
Both are fine and great, not many argumenst against either. It's mostly a personal preference.
<bigtawm>
Awesome Ill pick up a copy to use as a reference. Would well grounded rubyist be the best book to read following beginning ruby?
<dminuoso>
minitest is the lighter solution that comes with Ruby out of the box, rspec is heavier but more feature rich.
<dminuoso>
bigtawm, it's one of the most recommended books in here.
<dminuoso>
bigtawm, also consider Eloquent Ruby
<dminuoso>
Those two make up for what feels like 95% of the book recommendations.
zeroDi has joined #ruby
<bigtawm>
I heard eloquent ruby is also pretty good. Would I be able to take that on at this point? I heard it is somewhat advanced.
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
<bigtawm>
Would a good flow be well grounded rubyist -> eloquent ruby? Or is there a lot of overlap?
lxsameer has quit [Quit: WeeChat 1.6]
<dminuoso>
bigtawm, it's hard to say whether you would be able to take that on.
despai has quit [Read error: Connection reset by peer]
<dminuoso>
bigtawm, just looking at the TOC I'd say it's probably a sensible path. There's some minor overlap, but Eloquent Ruby is more about patterns really.
lanc has joined #ruby
<dminuoso>
So yeah, Id say go for Well Grounded Rubyist first and then maybe eloquent ruby if you're still thisrty for polishing out and writing good code. :)
workmad3 has joined #ruby
brendan- has joined #ruby
<bigtawm>
Okay awesome Ill probably start with well grounded rubyist and try to learn rails along the way with hartl. Then I'll go back and try to get a higher understanding of ruby with eloquent ruby. Thanks so much!
browndawg has joined #ruby
raul782 has joined #ruby
<dminuoso>
bigtawm, this is just a personal recommendation, but if you can avoid Rails until you've covered your grounds with Ruby.
<dminuoso>
So that you can look at Rails as just a bunch of Ruby classes, modules and methods. :)
<synstack>
bigtawm: around the same point as Eloquent Ruby, I found POODR to be a big stepping point
csk has quit [Ping timeout: 240 seconds]
<bigtawm>
Do these books cover a lot of good programming techniques/practices that a lot of computer science degrees leave out? Okay Ill take your advice on that.
<bigtawm>
synstack: Ill look at POODR that is big on object orient design patterns right?
elementaru has quit [Remote host closed the connection]
<dminuoso>
bigtawm, yes. eloquent ruby is completely focused on how to utilize the real special parts of ruby and how to do it well.
<synstack>
Its about good OOP, things like single responsibility and class independence, but it is invaluable read alongside Design Patterns/Design Patterns in Ruby
<synstack>
I wouldnt worry about these books until you're a little more comfortable though
montanonic has joined #ruby
brent__ has quit [Remote host closed the connection]
_chazu is now known as chazu
pawnbox has quit [Remote host closed the connection]
brent__ has joined #ruby
<bigtawm>
Awesome Ill keep a note on those and start on well grounded rubyist. Am at the point to where I can start contributing to some open source or should I just keep learning for now?
pawnbox has joined #ruby
tuelz has joined #ruby
<tuelz>
anyone familiar enough with factorygirl to know how to set a local variable on each record it creates?
<tuelz>
I'm trying to sample an array of addresses and use the address to set each atribute on a user record
<tuelz>
problem is they need to be valid addresses so I can't just fake data willy nilly, rather I need to sample from real data and then put those attrs in the right place
<dminuoso>
tuelz, normally you would do something like: sequence(:address) { |n| "addr #{n}" }
<dminuoso>
mmm
<dminuoso>
tuelz, mind my asking, why does it have to be valid addresses?
<tuelz>
dminuoso: because I'm testing against a 3rd party api that will only setup all the other stuff I need from them against valid addresses
<dminuoso>
tuelz, you can always pass attributes to the factory, e.g. create(user, addr: "foo")
<tuelz>
ahh, of course...that's what I need thanks again :)
<tuelz>
well maybe that's what I need, we'll see
<dminuoso>
tuelz, the correct way would be to use dynamic properties though
jeremyhall has quit [Read error: Connection reset by peer]
<dminuoso>
tuelz, then you can just do address { your_address_array.pop }
<dminuoso>
which is probably a gazillion times simpler.
<tuelz>
dude I should learn to browse documentation as quickly as you
<tuelz>
life would be so much easier xD
<tuelz>
thanks
<tuelz>
hmm, actually that isn't going to work as far as I can tell...you've given me some options to explore though
<tuelz>
the problem is I need to execute a statement for each record to set an in scope variable for that single record and then pull data from that variable
<dminuoso>
why isnt that going to work?
<tuelz>
dynamic attrs will just call random on the array each time and likely grab unrelated data
JeanCarloMachado has quit [Ping timeout: 260 seconds]
<tuelz>
like zip from one address and street address from another
csk157 has joined #ruby
cdg has joined #ruby
<dminuoso>
yeah it makes more sense do control this the other way around in rspec then
<dminuoso>
(or minitest if thats what you are using)
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyang has quit [Ping timeout: 268 seconds]
csk157 has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg_ has joined #ruby
tvw has joined #ruby
GodFather has quit [Ping timeout: 258 seconds]
Derperperd has quit [Ping timeout: 240 seconds]
ItBurnsWhenIPee has joined #ruby
nettoweb has joined #ruby
<tuelz>
hmm, problem is we're using this for seed data....maybe I should just ditch the random aspect all together and hard code some stuff in since it's not really random anyways
futilegames has joined #ruby
<tuelz>
or wait, I can just call it with random data from the seeds file....that works
<tuelz>
thanks
raul782 has quit [Remote host closed the connection]
renchan has quit [Remote host closed the connection]
<ItBurnsWhenIPee>
I'm trying to put each entry of an array into its own line in a textarea. my_array.join('\r\n').html_safe is being output as a single string in Rails. Anyone know what I'm doing wrong?
nettoweb1 has quit [Ping timeout: 256 seconds]
cdg has quit [Ping timeout: 245 seconds]
tyang has joined #ruby
Rodya_ has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
dc2 has joined #ruby
ecuanaso has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
futilegames has quit [Quit: futilegames]
milardovich has quit [Read error: Connection reset by peer]
dc4 has joined #ruby
<dminuoso>
ItBurnsWhenIPee, ?crosspost
<dminuoso>
?crosspost ItBurnsWhenIPee
<ruby[bot]>
ItBurnsWhenIPee: Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
mikecmpbll has quit [Quit: inabit. zz.]
<dminuoso>
?rails ItBurnsWhenIPee
<ruby[bot]>
ItBurnsWhenIPee: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
gloscombe_ has joined #ruby
dc2 has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
<ItBurnsWhenIPee>
sorry
csk has joined #ruby
raul782 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
crankhar1er has quit [Ping timeout: 240 seconds]
jcao219 has joined #ruby
khaki has joined #ruby
nankyokusei has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
crankharder has joined #ruby
grh has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
synthroid has quit []
raul782 has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
rikkipitt has quit [Quit: Leaving...]
milardovich has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
nofxx has quit [Ping timeout: 240 seconds]
tomphp has joined #ruby
dviola has joined #ruby
enterprisey has quit [Remote host closed the connection]
jamesaxl has quit [Quit: Leaving]
aswen has quit [Quit: WeeChat 1.5]
psychicist__ has quit [Ping timeout: 260 seconds]
despai has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
whathappens has joined #ruby
sorbo has joined #ruby
Xiti` has joined #ruby
despai has joined #ruby
ecuanaso has joined #ruby
padi_ has joined #ruby
cdg has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ifctj has quit [Ping timeout: 240 seconds]
padi_ has quit [Remote host closed the connection]
padi_ has joined #ruby
Fernando-Basso has quit [Quit: WeeChat 1.7]
croberts is now known as Toledo-afk
Pixi_ has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
madsa is now known as Guest13012
Guest13012 has quit [Killed (weber.freenode.net (Nickname regained by services))]
Xiti has quit [Ping timeout: 240 seconds]
jcao219 has quit [Remote host closed the connection]
cdg_ has quit [Ping timeout: 252 seconds]
marxarelli has joined #ruby
brent__ has joined #ruby
Xiti` has quit [Ping timeout: 258 seconds]
madsa_ has joined #ruby
madsa_ is now known as Guest87296
element_zer0 has joined #ruby
lanc has quit [Quit: zzZZZZzzZZZZzzZZzzZZZZzzzzzzzzz]
tuelz has quit [Quit: WeeChat 1.7]
biberu has quit []
jose_leeto has quit [Quit: Leaving.]
brent__ has quit [Ping timeout: 255 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leah2 has quit [Ping timeout: 276 seconds]
fuzzyhorns has quit [Quit: Leaving.]
blackwind_123 has quit [Ping timeout: 240 seconds]
blackwind_123 has joined #ruby
BackEndCoder has quit [Excess Flood]
toretore has quit [Ping timeout: 252 seconds]
freddymungo_ has joined #ruby
element_zer0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BackEndCoder has joined #ruby
grh has quit [Ping timeout: 245 seconds]
cpruitt has quit [Read error: Connection reset by peer]
tyang has quit [Read error: Connection reset by peer]
Lukefahr has joined #ruby
despai has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
mim1k has joined #ruby
despai has joined #ruby
brent__ has joined #ruby
element_zer0 has joined #ruby
boombox_ has joined #ruby
sorbo has quit [Ping timeout: 245 seconds]
Rodya_ has quit [Remote host closed the connection]
boombox_ has quit [Remote host closed the connection]
kirun has quit [Quit: Konversation terminated!]
ramortegui has quit [Quit: Ex-Chat]
Pixi_ has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skweek has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
raul782 has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
gusrub has quit [Remote host closed the connection]
gusrub has joined #ruby
bheesham has quit [Ping timeout: 260 seconds]
Xiti has joined #ruby
gusrub has quit [Remote host closed the connection]
djellemah_ has quit [Ping timeout: 245 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
raul782 has quit [Remote host closed the connection]
raul782 has joined #ruby
rakm has joined #ruby
wilbert has quit [Ping timeout: 240 seconds]
cdg_ has joined #ruby
UnknownSoldier has joined #ruby
tlaxkit has quit [Remote host closed the connection]
nofxx has joined #ruby
szulak has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 255 seconds]
versigtig has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
csk has quit [Quit: ZZZzzz…]
kht has joined #ruby
bkxd has joined #ruby
griffindy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
choke has joined #ruby
raul782 has quit [Remote host closed the connection]
Lukefahr has quit [Ping timeout: 260 seconds]
nictrasavios has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
Snickers has quit [Quit: Snickers]
blackmesa has quit [Ping timeout: 260 seconds]
lanc has joined #ruby
__Yiota has joined #ruby
blackmesa has joined #ruby
cgibsonmm has joined #ruby
saneax-_-|AFK is now known as saneax
saneax is now known as saneax-_-|AFK
jc_io has joined #ruby
Xiti` has joined #ruby
Xiti` has quit [Read error: Connection reset by peer]
raul782 has joined #ruby
Xiti has quit [Ping timeout: 268 seconds]
safetypin has quit [Quit: ZZZzzz…]
<jc_io>
anyone worked with remote_syslog and psych? two boxes identical ruby/psych setups, idential ami's, one works one doesn't :sad face:
charliesome has joined #ruby
cdg has joined #ruby
<cschneid_>
what the heck is happening. the net/http library is intermittently raising an error around setsockopt deep in its bowels. Both from Restclient & net/http directly. Just connecting to `http://localhost:9292/api`
cdg_ has quit [Ping timeout: 260 seconds]
<cschneid_>
=> #<Errno::EINVAL: Invalid argument - setsockopt(2)> is the error, and the line that calls it is: s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
<cschneid_>
I mean, I have the call stack to get to that point in the code, one sec and I can paste. It's only failing intermittently, it does work sometimes. I have a local puma on port 9292.
Takumo has quit [Remote host closed the connection]
whathappens has quit [Quit: Leaving...]
blackmesa has quit [Read error: Connection timed out]