You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by Ben Browning <bb...@redhat.com> on 2010/08/31 22:18:02 UTC

[PATCH] Require rubygems before sinatra in config.ru

Sinatra is a gem so we need to require it after requiring
rubygems, not before. This happens to work when the server is
started via deltacloudd command because that command requires
rubygems.

When the server is started without the deltacloudd command (like
in TorqueBox or Passenger) the problem is exposed.
---
 server/config.ru |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/config.ru b/server/config.ru
index 6d37a5f..691c238 100644
--- a/server/config.ru
+++ b/server/config.ru
@@ -1,5 +1,5 @@
-require 'sinatra'
 require 'rubygems'
+require 'sinatra'
 
 require 'server.rb'
 run Sinatra::Application
-- 
1.7.2.1


Re: [PATCH] Require rubygems before sinatra in config.ru

Posted by David Lutterkort <lu...@redhat.com>.
On Tue, 2010-08-31 at 16:18 -0400, Ben Browning wrote:
> Sinatra is a gem so we need to require it after requiring
> rubygems, not before. This happens to work when the server is
> started via deltacloudd command because that command requires
> rubygems.
> 
> When the server is started without the deltacloudd command (like
> in TorqueBox or Passenger) the problem is exposed.

ACK. Pushed

David