goliath

    2熱度

    1回答

    我使用Ruby 1.9.3在本地主機上運行一個簡單的goliath服務器,它不是異步運行http請求。下面的代碼: require 'goliath' require 'em-synchrony' require 'em-synchrony/em-http' class Server < Goliath::API use Goliath::Rack::Validation::Re

    1熱度

    1回答

    這是巨人一個例子: require 'goliath' class HelloWorld < Goliath::API def response(env) [200, {}, "hello world"] end end 如何定義在Web服務器的類和子類Goliath::API結果被啓動?難道這不應該只是定義一個類,而不是實際實例化和執行一個類?

    0熱度

    1回答

    我正在爲Goliath服務器編寫自己的中間件。 如何在「調用」方法中獲取請求標頭? 謝謝!

    0熱度

    1回答

    我已經安裝了goliath寶石,但現在任何控制檯rails命令失敗,並返回: rake aborted! uninitialized constant Rack::Chunked /home/Sites/myapp/config/application.rb:7:in `<top (required)>' /home/Sites/myapp/Rakefile:4:in `<top (requ

    0熱度

    1回答

    我越來越瘋狂,也許你可以幫我:) 事情是:我有一個巨人的API,當我要在服務器上部署Capistrano時,如果我檢查日誌文件,我可以看到,每隔30 - 35秒此消息: Nov 26 14:21:24 adlooped-pro adlooped.log: [28665:INFO] 2013-11-26 13:20:18 :: Starting server on 0.0.0.0:9201 in p

    0熱度

    1回答

    我正在使用Goliath爲我的Rails應用程序編寫Web服務,並且我想記錄發送到我的Web服務器的所有請求。我有這個Api類,這是內部的兩個模塊: require 'goliath' module WebService module Rest class Api < Goliath::API def response(env) # Log the

    1熱度

    1回答

    試圖與下面config.ru require 'goliath' require './goliathapp' runner = Goliath::Runner.new(ARGV, nil) runner.api = GoliathApp.new runner.app = Goliath::Rack::Builder.build(GoliathApp, runner.api) runn

    0熱度

    3回答

    我想測試一個巨人+葡萄應用程序像下面+葡萄: require 'em-synchrony/em-mongo' require 'yajl/json_gem' require 'goliath' require 'grape' class API < Grape::API version 'v1', :using => :path format :json

    0熱度

    1回答

    基本上是我的最後一次嘗試是即時得到這個錯誤: [:error, "bad URI(is not URI?): ://localhost:80/auth/twitter/auth/twitter"] 當我瀏覽到 http://127.0.0.1/auth/twitter 這是我的歌利亞的服務器 class Application < Goliath::API use(Rack::S

    1熱度

    1回答

    我想在我的goliath供電的web應用程序中使用內置memcache客戶端(與時間同步)中的eventmachine。它在本地運行的很好,但是當我部署到Heroku時,我無法連接它。下面是我用什麼打開連接: cache = EM::P::Memcache.connect 有沒有一種方法可以讓我得到它的工作,還是我將不得不使用不同的客戶端,像達利?是否還有其他基於eventmachine的me