<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Deploying Rack Apps on Dreamhost via Passenger (including Sinatra)</title>
	<atom:link href="http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/</link>
	<description>eval("eval(\"eval(\\\"puts 'a ruby weblog'\\\")\")")</description>
	<lastBuildDate>Mon, 30 Jan 2012 23:01:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Pow! etc. :: dot unplanned</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-353</link>
		<dc:creator>Pow! etc. :: dot unplanned</dc:creator>
		<pubDate>Fri, 15 Apr 2011 22:41:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-353</guid>
		<description>[...] it looks like it&#8217;s not too hard to use those Rack-enabled apps on Dreamhost. This worked for my config.ru file, and it&#8217;s the same as the one I use for my desktop [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] it looks like it&#8217;s not too hard to use those Rack-enabled apps on Dreamhost. This worked for my config.ru file, and it&#8217;s the same as the one I use for my desktop&nbsp;[&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sinatra + Dreamhost &#8211; everyday</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-343</link>
		<dc:creator>Sinatra + Dreamhost &#8211; everyday</dc:creator>
		<pubDate>Tue, 26 Oct 2010 14:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-343</guid>
		<description>[...] Gittr [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Gittr&nbsp;[&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Forder</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-318</link>
		<dc:creator>Justin Forder</dc:creator>
		<pubDate>Sat, 27 Feb 2010 16:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-318</guid>
		<description>Thank you very much for this. Your advice is the clearest I have found (for example, other sources are not clear as to which directory the files go in, and don&#039;t give the advice about touching tmp/restart.txt).

A lot of time has passed, and DreamHost has an up-to-date version of Rack (using &#039;gem list --local&#039; shows version 1.1.0) so I didn&#039;t need a local install of Rack. The other thing I found (and which I have seen advice on elsewhere) was that Passenger did not find sinatra/lib/sinatra.rb.

Putting the full path in my config.ru:
require &#039;/home/USERNAME/.gem/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra.rb&#039;

solved that problem.

There is advice here about logging:
http://blog.yetisoftware.com/2009/03/07/sinatra-on-dreamhost/

So I created a log directory under my domain and added these lines to my config.ru
log = File.new(&quot;log/sinatra.log&quot;, &quot;w&quot;)
STDOUT.reopen(log)
STDERR.reopen(log)

and it worked. Note that the log file is recreated on each restart.
This was useful - the log told me about deprecated code in the config.ru file:

config.ru:8: warning: Sinatra::Application.default_options is deprecated; use &#039;set&#039; instead.
config.ru:8: warning: The :env option is deprecated; use :environment instead.
config.ru:14: warning: Sinatra.application is deprecated; use Sinatra::Application instead.

These changes to my config.ru removed the warnings:

require &#039;rubygems&#039;
require &#039;/home/USERNAME/.gem/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra.rb&#039;

set :environment, :production
disable :run
 
log = File.new(&quot;log/sinatra.log&quot;, &quot;w&quot;)
STDOUT.reopen(log)
STDERR.reopen(log)

require &#039;test.rb&#039;
run Sinatra::Application</description>
		<content:encoded><![CDATA[<p>Thank you very much for this. Your advice is the clearest I have found (for example, other sources are not clear as to which directory the files go in, and don&#8217;t give the advice about touching&nbsp;tmp/restart.txt).</p>
<p>A lot of time has passed, and DreamHost has an up-to-date version of Rack (using &#8216;gem list&thinsp;&#8212;&thinsp;local&#8217; shows version 1.1.0) so I didn&#8217;t need a local install of Rack. The other thing I found (and which I have seen advice on elsewhere) was that Passenger did not find&nbsp;sinatra/lib/sinatra.rb.</p>
<p>Putting the full path in my config.ru:<br />
require&nbsp;&#8217;/home/<span class="caps">USERNAME</span>/.gem/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra.rb&#8217;</p>
<p>solved that&nbsp;problem.</p>
<p>There is advice here about logging:<br />&nbsp;<a href="http://blog.yetisoftware.com/2009/03/07/sinatra-on-dreamhost/" rel="nofollow">http://blog.yetisoftware.com/2009/03/07/sinatra-on-dreamhost/</a></p>
<p>So I created a log directory under my domain and added these lines to my config.ru<br />
log = File.new(&#8220;log/sinatra.log&#8221;, &#8220;w&#8221;)<br />
<span class="caps">STDOUT</span>.reopen(log)<br />&nbsp;<span class="caps">STDERR</span>.reopen(log)</p>
<p>and it worked. Note that the log file is recreated on each restart.<br />
This was useful - the log told me about deprecated code in the config.ru&nbsp;file:</p>
<p>config.ru:8: warning: Sinatra::Application.default_options is deprecated; use &#8216;set&#8217; instead.<br />
config.ru:8: warning: The :env option is deprecated; use :environment instead.<br />
config.ru:14: warning: Sinatra.application is deprecated; use Sinatra::Application&nbsp;instead.</p>
<p>These changes to my config.ru removed the&nbsp;warnings:</p>
<p>require &#8216;rubygems&#8217;<br />
require&nbsp;&#8217;/home/<span class="caps">USERNAME</span>/.gem/ruby/1.8/gems/sinatra-0.9.4/lib/sinatra.rb&#8217;</p>
<p>set :environment, :production<br />
disable&nbsp;:run</p>
<p>log = File.new(&#8220;log/sinatra.log&#8221;, &#8220;w&#8221;)<br />
<span class="caps">STDOUT</span>.reopen(log)<br />&nbsp;<span class="caps">STDERR</span>.reopen(log)</p>
<p>require &#8216;test.rb&#8217;<br />
run&nbsp;Sinatra::Application</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-316</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Sun, 21 Feb 2010 01:13:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-316</guid>
		<description>Thank you.  It took me hours to get this to work.  I had the files in the wrong directory or wasn&#039;t pointing at the right gem .rb file...  Now I can finally start developing!</description>
		<content:encoded><![CDATA[<p>Thank you.  It took me hours to get this to work.  I had the files in the wrong directory or wasn&#8217;t pointing at the right gem .rb file&#8230;  Now I can finally start&nbsp;developing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-119</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Sun, 08 Mar 2009 06:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-119</guid>
		<description>Turned out the “can’t activate rack (&gt;= 0.9.1, &lt; 1.0, runtime), already activated rack-0.4.0” problem was pretty easy to get around. 

See my blog post about it here : http://blog.yetisoftware.com/2009/03/07/sinatra-on-dreamhost/</description>
		<content:encoded><![CDATA[<p>Turned out the “can’t activate rack (&gt;= 0.9.1, &lt; 1.0, runtime), already activated rack-0.4.0” problem was pretty easy to get&nbsp;around. </p>
<p>See my blog post about it here :&nbsp;<a href="http://blog.yetisoftware.com/2009/03/07/sinatra-on-dreamhost/" rel="nofollow">http://blog.yetisoftware.com/2009/03/07/sinatra-on-dreamhost/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sinatra on Dreamhost &#124; Yet Another Programming Blog</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-118</link>
		<dc:creator>Sinatra on Dreamhost &#124; Yet Another Programming Blog</dc:creator>
		<pubDate>Sun, 08 Mar 2009 06:02:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-118</guid>
		<description>[...] is a lot of good information on how to run Sinatra on Dreamhost, but after following all the excellent advice, I [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] is a lot of good information on how to run Sinatra on Dreamhost, but after following all the excellent advice, I&nbsp;[&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deepak</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-117</link>
		<dc:creator>Deepak</dc:creator>
		<pubDate>Sun, 08 Mar 2009 02:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-117</guid>
		<description>@JohnB, did you ever find a solution to your problem? I&#039;m running into the same dreaded &quot;can&#039;t activate rack (&gt;= 0.9.1, &lt; 1.0, runtime), already activated rack-0.4.0&quot;, and am at an impasse. 

If you did, and if you happen to come back to read this blog :), could you shoot me an email?</description>
		<content:encoded><![CDATA[<p>@JohnB, did you ever find a solution to your problem? I&#8217;m running into the same dreaded &#8220;can&#8217;t activate rack (&gt;= 0.9.1, &lt; 1.0, runtime), already activated rack-0.4.0&#8221;, and am at an&nbsp;impasse. </p>
<p>If you did, and if you happen to come back to read this blog :), could you shoot me an&nbsp;email?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JohnB</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-111</link>
		<dc:creator>JohnB</dc:creator>
		<pubDate>Sat, 21 Feb 2009 23:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-111</guid>
		<description>I&#039;m using dreamhost.  I&#039;ve installed Sinatra-0.9.0.4 locally in ~/.gems dir but am getting the dreaded
&quot;can&#039;t activate rack (&gt;= 0.9.1, runtime), already activated rack-0.4.0&quot;

and then if I uninstall rack (yeah, I know, not a good idea) I get &quot;RubyGem version error: rack(0.3.0 not &gt;= 0.9.1)&quot; - which makes some sense due to the sinatra version I&#039;ve installed but its a bit odd that it now complains about 0.3.0 instead of 0.4.0.

I can try down-revving sinatra to a version that will work with rack 0.3.0 but it seems like the wrong direction. Any suggestions?</description>
		<content:encoded><![CDATA[<p>I&#8217;m using dreamhost.  I&#8217;ve installed Sinatra-0.9.0.4 locally in ~/.gems dir but am getting the dreaded<br />
&#8220;can&#8217;t activate rack (&gt;= 0.9.1, runtime), already activated&nbsp;rack-0.4.0&#8221;</p>
<p>and then if I uninstall rack (yeah, I know, not a good idea) I get &#8220;RubyGem version error: rack(0.3.0 not &gt;= 0.9.1)&#8221; - which makes some sense due to the sinatra version I&#8217;ve installed but its a bit odd that it now complains about 0.3.0 instead of&nbsp;0.4.0.</p>
<p>I can try down-revving sinatra to a version that will work with rack 0.3.0 but it seems like the wrong direction. Any&nbsp;suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-86</link>
		<dc:creator>Marc</dc:creator>
		<pubDate>Sat, 15 Nov 2008 14:22:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-86</guid>
		<description>worked fine, thanks!</description>
		<content:encoded><![CDATA[<p>worked fine,&nbsp;thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.gittr.com/index.php/archive/deploying-rack-apps-on-dreamhost-via-passenger-including-sinatra/comment-page-1/#comment-78</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 10 Nov 2008 06:02:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.gittr.com/?p=29#comment-78</guid>
		<description>HI,

I&#039;m trying to deploy a new rack framework and following all your steps: the config.ru is loaded after I fixed the requires but hitting my domain only display a totally empty page, it seems is showing the /public folder since I can see the /images folder but is not running the rack app, any ideas, is the public folder supposed to have a symlink or magic file? I have all the tmp/ folder also and I restarted the passenger but nothing, blank page again.

Thanks,

Peter.</description>
		<content:encoded><![CDATA[<p><span class="caps">HI</span>,</p>
<p>I&#8217;m trying to deploy a new rack framework and following all your steps: the config.ru is loaded after I fixed the requires but hitting my domain only display a totally empty page, it seems is showing the /public folder since I can see the /images folder but is not running the rack app, any ideas, is the public folder supposed to have a symlink or magic file? I have all the tmp/ folder also and I restarted the passenger but nothing, blank page&nbsp;again.</p>
<p>Thanks,</p>
<p>Peter.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

