Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
claudiuinberlin has quit [Ping timeout: 272 seconds]
dfucci has quit [Ping timeout: 240 seconds]
charrit69 has joined #ruby
charrit69 has quit [Write error: Connection reset by peer]
charrit69 has joined #ruby
Ediz has joined #ruby
charrit69 has quit [Read error: Connection reset by peer]
<Ediz>
Hello everyone
charrit69 has joined #ruby
DaRock has quit [Ping timeout: 240 seconds]
<Ediz>
I'm using sinatra to set up an api, I've just set up a simple post route and trying it with a http client, it works, but I get this error output from rack: https://dpaste.org/6t46#L any ideas why this might occur?
burgestrand has joined #ruby
<jhass>
sounds like your http client is misbehaving
<Ediz>
hehe in what way, I'm just using RubyMines http client
Emmanuel_Chanel has joined #ruby
rafadc has quit [Ping timeout: 240 seconds]
rafadc has joined #ruby
dfucci has joined #ruby
<jhass>
nothing too terrible, just closing the connection while the server doesn't expect it
<jhass>
probably something a reverse proxy will hide from your appserver
Mrgoose has joined #ruby
weaksauce has quit [Ping timeout: 265 seconds]
va5c0 has joined #ruby
DaRock has joined #ruby
<neozor>
Is Sinatra a good tool for API only services?
<Ediz>
I'd say so, but I'm new so take it with a pinch of salt
ellcs1 has quit [Ping timeout: 240 seconds]
<jhass>
I never quite figured what makes a webserver framework a good or a bad tool for that usecase. Route some requests in, render some json out, they all can do that, it's very basic
TCZ has joined #ruby
<neozor>
You are right, i have to narrow down the case studio to really ponder the value of a specific tool
Jonopoly has joined #ruby
va5c0 has quit [Ping timeout: 260 seconds]
Garb0 has quit [Quit: Leaving]
va5c0 has joined #ruby
<burgestrand>
neozor anecdotally software tends to become more complex over time, and more often than not I tend to end up being grateful for picking something heavier (e.g. rails)
<burgestrand>
e.g. sinatra apps tend to grow towards being poor subset of rails more than rails apps growing towards being a poor superset of sinatra
<Rubzz>
adam12 there's a lot of extraneous code there. But the aim is to define a method with a dynamic name on a on the instance from which the method was invoked. No problem
<Rubzz>
I have defined the methods on the class but I want them to be specific to an instance not to the class
Chew has quit [Ping timeout: 244 seconds]
jnoon has quit [Ping timeout: 244 seconds]
jetpack_joe has quit [Ping timeout: 244 seconds]
Fusl has quit [Ping timeout: 244 seconds]
tobiasvl has quit [Ping timeout: 260 seconds]
redlegion has quit [Ping timeout: 244 seconds]
dfucci has quit [Ping timeout: 256 seconds]
vondruch has quit [Ping timeout: 246 seconds]
va5c0 has quit [Ping timeout: 264 seconds]
neozor has quit [Remote host closed the connection]
gray-_-wolf has joined #ruby
neozor has joined #ruby
stryek has joined #ruby
Chew_ has joined #ruby
gray-_-wolf has quit [Ping timeout: 256 seconds]
tvl is now known as tobiasvl
Jonopoly has quit [Quit: WeeChat 2.9]
adu has joined #ruby
Fusl has joined #ruby
<adam12>
Rubzz: how about define_singleton_method(method_name, scopy)
<adam12>
Rubzz: Don't discount `eval`. Because it doesnt' create a closure, it can be more performant. I believe Jeremy Evans talk covers this. Let me find a link if you're curious.
TCZ has quit [Ping timeout: 258 seconds]
dfucci has joined #ruby
davispuh has joined #ruby
<Rubzz>
brb
Rubzz has quit [Remote host closed the connection]
alfiemax_ has quit [Remote host closed the connection]
neozor has joined #ruby
<neozor>
leitz: Thanks for the tip! i do not need anything for now, it was more like a general comment. At work we use Puma
gray-_-wolf has quit [Ping timeout: 260 seconds]
dan64- has joined #ruby
ellcs1 has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
dan64 has quit [Ping timeout: 240 seconds]
dfucci has quit [Ping timeout: 244 seconds]
TCZ has joined #ruby
imode has joined #ruby
Mia has quit [Client Quit]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
akem has joined #ruby
<havenwood>
neozor: Yes, Sinatra is a good tool for APIs. I've moved from Sinatra to Roda though for APIs. +1 Roda.
<havenwood>
neozor: Roda is fantastic.
<havenwood>
neozor: I'd suggest going through each and every plugin to assess what you need.
<havenwood>
apotheon: By cherry picking the ones you need you compose a framework.
<havenwood>
apotheon: It's worth it. :)
<apotheon>
righto
TCZ has quit [Quit: Leaving]
Rudd0 has joined #ruby
ellcs1 has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby
spectra has quit [Ping timeout: 244 seconds]
cthulchu_ has joined #ruby
Eiam has joined #ruby
Garb0 has joined #ruby
greengriminal has joined #ruby
Garb0_ has joined #ruby
Garb0 has quit [Ping timeout: 258 seconds]
ChmEarl has joined #ruby
spectra has joined #ruby
lxsameer has quit [Quit: WeeChat 2.9]
ramfjord has joined #ruby
neozor has quit []
akem has quit [Remote host closed the connection]
akem has joined #ruby
akem has quit [Client Quit]
akem has joined #ruby
zacts has joined #ruby
Garb0__ has joined #ruby
Garb0_ has quit [Ping timeout: 258 seconds]
va5c0_ has quit [Ping timeout: 240 seconds]
Garb0_ has joined #ruby
bradleyprice_ has quit []
Garb0__ has quit [Ping timeout: 260 seconds]
<leitz>
I'm still hopeful for WEBrick. :)
<havenwood>
leitz: Hope for WEBrick is misplaced. :P
<leitz>
havenwood, well, we are doing Ruby... :(
<leitz>
havenwood, I just prefer simpler solutions.
<leitz>
havenwood, with the understanding that things like Roda and Rails solve problems a simpler solution might not.
<adam12>
Plain Rack can get you fairly far too.
GodFather has quit [Remote host closed the connection]
elxbarbosa has joined #ruby
<leitz>
adam12, I don't think Rack is in the standard library, is it?
<adam12>
leitz: Nope.
Rounin has quit [Remote host closed the connection]
Rounin has joined #ruby
<tweaks>
havenwood: do you ever use rails for APIs?
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Mia has quit [Ping timeout: 256 seconds]
Rounin has quit [Remote host closed the connection]
zacts has quit [Quit: leaving]
zacts has joined #ruby
havenwoo_ has joined #ruby
Garb0_ has quit [Ping timeout: 258 seconds]
gix has joined #ruby
havenwoo_ has quit [Ping timeout: 240 seconds]
kristian_on_linu has joined #ruby
weaksauce has joined #ruby
kristian_on_linu has quit [Remote host closed the connection]
dualfade has quit [Ping timeout: 246 seconds]
Sauvin has quit [Remote host closed the connection]
dualfade has joined #ruby
georgie has joined #ruby
elxbarbosa has quit [Ping timeout: 272 seconds]
Rounin has joined #ruby
mikecmpbll has quit [Ping timeout: 240 seconds]
georgie has quit [Ping timeout: 246 seconds]
adu has quit [Quit: adu]
mikecmpbll has joined #ruby
duderonomy has joined #ruby
<havenwood>
tweaks: For just an API without a webapp? I personally don't, no.
<havenwood>
leitz: Roda and Rails are both Rack apps. Most web in Ruby is Rack.
<havenwood>
leitz: Roda is an intentionally minimalist addition on top or Rack.
<havenwood>
leitz: Rails is a Rack adapter too, but intentionally monolithic based on conventions.
cliluw has joined #ruby
<havenwood>
leitz: Rack is a good think to grok.
<havenwood>
leitz: Then Roda and middleware will make sense.
<havenwood>
leitz: I'd advise making a Rack app with multiple routes and a bit of error handling. Then you'll see how that's a bit awkward. Roda takes it just a step further with a small addition of code and plugins to make it elegant to create apps with routes.
<havenwood>
Rails goes further yet and gives a whole app scaffold, but that often includes things you don't need—hence new flags to start more minimalist.