<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sean&#039;s Blog &#187; Sinatra</title>
	<atom:link href="http://seanbehan.com/category/sinatra/feed/" rel="self" type="application/rss+xml" />
	<link>http://seanbehan.com</link>
	<description>Web Programming, Ruby on Rails, Wordpress, PHP from Burlington, Vermont</description>
	<lastBuildDate>Wed, 18 Jan 2012 21:44:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Manage Sinatra Server in Development Mode with Shotgun</title>
		<link>http://seanbehan.com/sinatra/manage-sinatra-server-in-development-mode-with-shotgun/</link>
		<comments>http://seanbehan.com/sinatra/manage-sinatra-server-in-development-mode-with-shotgun/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 02:03:31 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[reload]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shotgun]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=512</guid>
		<description><![CDATA[Sinatra won&#8217;t reload your files. So if you&#8217;re developing your app and want to see any changes made in the browser, install the shotgun gem. gem install shotgun You can then use shotgun to run your server shotgun your_sinatra_ditty.rb Presto, your ditty will never be out of key :)]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fsinatra%2Fmanage-sinatra-server-in-development-mode-with-shotgun%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Manage Sinatra Server in Development Mode with Shotgun" data-url="http://seanbehan.com/sinatra/manage-sinatra-server-in-development-mode-with-shotgun/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Sinatra won&#8217;t reload your files. So if you&#8217;re developing your app and want to see any changes made in the browser, install the shotgun gem.</p>
<pre class="wp-code-highlight prettyprint">
gem install shotgun
</pre>
<p>You can then use shotgun to run your server</p>
<pre class="wp-code-highlight prettyprint">
shotgun your_sinatra_ditty.rb
</pre>
<p>Presto, your ditty will never be out of key :)</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/sinatra/manage-sinatra-server-in-development-mode-with-shotgun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deploy Sintra App on Ubuntu Using Apache2 and Phusion Passenger Module</title>
		<link>http://seanbehan.com/sinatra/deploy-sintra-app-on-ubuntu-using-apache2-and-phusion-passenger-module/</link>
		<comments>http://seanbehan.com/sinatra/deploy-sintra-app-on-ubuntu-using-apache2-and-phusion-passenger-module/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 20:23:10 +0000</pubDate>
		<dc:creator>bseanvt</dc:creator>
				<category><![CDATA[Sinatra]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[phusion]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://seanbehan.com/?p=504</guid>
		<description><![CDATA[Check it out http://sinatra.seanbehan.com/ This assumes Apache2 and the Phusion Passenger module have already been installed. If not you can get up to speed w/ this resource http://seanbehan.com/ruby-on-rails/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/ First you need Sinatra, so install the gem gem install sinatra We need a home for Frank, so create the minimum number of directories in our web [...]]]></description>
			<content:encoded><![CDATA[<div style="height:33px;" class="really_simple_share robots-nocontent snap_nopreview"><div class="really_simple_share_facebook_like" style="width:px;">
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fseanbehan.com%2Fsinatra%2Fdeploy-sintra-app-on-ubuntu-using-apache2-and-phusion-passenger-module%2F&amp;layout=button_count&amp;show_faces=false&amp;width=&amp;action=like&amp;colorscheme=light&amp;send=false&amp;height=27" 
						scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:px; height:27px;" allowTransparency="true"></iframe>
				</div><div class="really_simple_share_twitter" style="width:px;">
					<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
						data-text="Deploy Sintra App on Ubuntu Using Apache2 and Phusion Passenger Module" data-url="http://seanbehan.com/sinatra/deploy-sintra-app-on-ubuntu-using-apache2-and-phusion-passenger-module/" 
						data-via="" ></a> 
				</div></div>
		<div style="clear:both;"></div><p>Check it out http://sinatra.seanbehan.com/<br />
This assumes Apache2 and the Phusion Passenger module have already been installed. If not you can get up to speed w/ this resource http://seanbehan.com/ruby-on-rails/new-ubuntu-slice-apache-mysql-php-ruby-on-rails-git-and/</p>
<p>First you need Sinatra, so install the gem</p>
<pre class="wp-code-highlight prettyprint">
gem install sinatra
</pre>
<p>We need a home for Frank, so create the minimum number of directories in our web directory. The public directory is where we&#8217;ll server images, stylesheets, javascript etc. The tmp directory will be where we control Passenger.</p>
<pre class="wp-code-highlight prettyprint">
cd /var/www/sinatra
mkdir myapp
mkdir myapp/tmp
mkdir myapp/public

cd myapp
vim index.rb
#in index.rb
get '/' do
  &quot;Fly me to the moon...&quot;
end
</pre>
<p>Next we need a configuration file for Rack, important the file extension is &#8220;.ru&#8221; not .rb!</p>
<pre class="wp-code-highlight prettyprint">
vim config.ru
require 'rubygems'
require 'sinatra'

Sinatra::Application.default_options.merge!(
  :run =&gt; false,
  :env =&gt; ENV['RACK_ENV']
)

require 'index'
run Sinatra.application
</pre>
<p>Set up the virtual host</p>
<pre class="wp-code-highlight prettyprint">
&lt;virtualHost *&gt;
  ServerName www.myapp.com
  DocumentRoot /var/www/sinatra/public
&lt;/virtualHost&gt;
</pre>
<p>Now you can restart the app if you make adjustments!</p>
<pre class="wp-code-highlight prettyprint">
touch tmp/restart.txt
</pre>
<p>Keep on singing :)</p>
<p>Inspired by http://blog.zerosum.org/2008/7/4/passenger-3-sinatra</p>
]]></content:encoded>
			<wfw:commentRss>http://seanbehan.com/sinatra/deploy-sintra-app-on-ubuntu-using-apache2-and-phusion-passenger-module/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

