An open source non-blocking (asynchronous) Ruby web server framework, powered by an EventMachine reactor, a high-performance HTTP parser and Ruby 1.9 runtime.
Questions tagged [goliath]
39 questions
1
vote
1 answer
eventmachine memcache and heroku
I'm trying to use the eventmachine built in memcache client (with em-synchrony) in my goliath powered web app. It runs beautifully locally, but when I deploy to Heroku, I can't get it to connect. Here's what I'm using to open the connection:
cache =…

Tom Brunoli
- 3,436
- 9
- 36
- 54
1
vote
2 answers
Ruby goliath non-blocking server mapping
I am trying out goliath non-blocking ruby server.
For my application I need to make at least 2 defined routes, lets say "/call_one" and "/call_two", each map should respond in a different manner.
Goliath documentation mentions map function which is…

wael34218
- 4,860
- 8
- 44
- 62
1
vote
1 answer
Ruby default class actions after require
I remember that this problem came up before but I can't find the answer.
I require a file this way:
#lib/tm/agent/server.rb
require 'tm/agent/server'
And, without calling the Listen class explicitly, its initialize gets executed:
module Tm
module…

Istvan
- 7,500
- 9
- 59
- 109
1
vote
1 answer
how to send_data or attached file with goliath and grape?
not sure how this is done, but following how's its done in Sinatra wouldn't cut it on Goliath - How can I send binary data from Sinatra?

David
- 4,235
- 12
- 44
- 52
1
vote
1 answer
How to do HTTP authentication with Goliath/Heroku?
I'm using Goliath as my app server, and I am trying to convert "Ruby – Secure staging environment of your public app from users and bots" so it applies to my Goliath application.
I am trying to use Rack::Static but I'm not sure how to write the…

David
- 4,235
- 12
- 44
- 52
1
vote
1 answer
Multiple subscribers with EM-WebSocket or Goliath
So I'm attempting to setup em-websocket (or potentially Goliath), so that users can come to a different route and thusly be subscribed to only that channel, so for example:
example.com/channel_1
Browsers open there will only receive messages…

JP Silvashy
- 46,977
- 48
- 149
- 227
1
vote
1 answer
Goliath breaks em-synchrony/em-hiredis when multiple with_api() tests are called in one RSpec suite
I'm just experiencing weird behavior while testing an Goliath API with RSpec. One of my tests looks like this:
require 'helper'
describe Scales::Dispatch do
it "should return a 404 if resource was not found" do
with_api(Scales::Server) do
…

Thomas Fankhauser
- 5,039
- 1
- 33
- 32
0
votes
1 answer
Goliath poor performance: short response time, long wait time
So I'm use Goliath to develop an api, /list/users, it is very simple, just query mysql and return.
the request itself takes Response Time: 53.84ms, but if I do a press test with 10 threads to request the server by ab, I can only get 20…

Sato
- 8,192
- 17
- 60
- 115
0
votes
1 answer
Requiring grape hugely slows down Goliath
I've written a 'Hello World' app using Goliath, and I decided to mount Grape on top of it:
#!/usr/bin/env ruby
require 'rubygems'
require 'bundler/setup'
Bundler.setup :default
require 'goliath'
require 'grape' # <-- Comment out this line will…

Aetherus
- 8,720
- 1
- 22
- 36
0
votes
1 answer
env['REMOTE_ADDR'] with Goliath ruby
I have an API with Goliath gem (ruby) and I want to get the ip of the movile which is calling to my API. The case is, env['REMOTE_ADDR'] always give me 127.0.0.1 when some device is calling me. It shoud be the ip from the mobile is calling me,…

Luismiv85
- 50
- 1
- 10
0
votes
1 answer
goliath installation failure
I have installed goliath gem but now any console rails command fails and returns :
rake aborted!
uninitialized constant Rack::Chunked
/home/Sites/myapp/config/application.rb:7:in `'
/home/Sites/myapp/Rakefile:4:in `

epsilones
- 11,279
- 21
- 61
- 85
0
votes
1 answer
Using Rmagick with eventmachine
I am trying to create a very simple web service with Goliath and Grape. All that my service would do is that given an image path and a target dimension it would return the new geometry of the image. The images are stored in the same server as the…

Lester Celestial
- 1,454
- 1
- 16
- 26
0
votes
1 answer
Strange behavior with Goliath Ruby on Rails
I am getting crazy and maybe you can help me :)
The thing is: I have an API with Goliath, and when I am going to deploy with Capistrano on the server, if I check the log file I can see every 30 - 35 seconds this message:
Nov 26 14:21:24…

Luismiv85
- 50
- 1
- 10
0
votes
1 answer
any example on Goliath + OmniAuth
basically my last attempt was im getting this error:
[:error, "bad URI(is not URI?): ://localhost:80/auth/twitter/auth/twitter"]
when i browse to
http://127.0.0.1/auth/twitter
this is my goliath server
class Application < Goliath::API
…

David
- 4,235
- 12
- 44
- 52
0
votes
1 answer
Request headers in Goliath middleware
I am writing own middleware for Goliath server.
How can I get request headers in "call" method?
Thanks!

Falcon
- 1,461
- 3
- 15
- 29