<?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>PotHix &#187; English</title>
	<atom:link href="http://pothix.com/blog/tag/english/feed" rel="self" type="application/rss+xml" />
	<link>http://pothix.com/blog</link>
	<description>class Blog &#60; PotHix; def initialize; super end end</description>
	<lastBuildDate>Mon, 09 Apr 2012 19:51:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Deploying a simple Merb application on Locaweb</title>
		<link>http://pothix.com/blog/english/deploying-a-simple-merb-application-on-locaweb</link>
		<comments>http://pothix.com/blog/english/deploying-a-simple-merb-application-on-locaweb#comments</comments>
		<pubDate>Wed, 07 Jan 2009 16:46:35 +0000</pubDate>
		<dc:creator>PotHix</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Rubylearning]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Tech]]></category>

		<guid isPermaLink="false">http://pothix.com/blog/?p=223</guid>
		<description><![CDATA[Æ!! I writing this post to help my friends of Rubylearning with a little Merb application deployment on Locaweb. I&#8217;m just translating some informations that you can find here in portuguese. Lets start! First open the Domain Manager ( Gerenciador de domínios ) on Locaweb Panel ( Painel da Locaweb ) and configure the pointer [...]]]></description>
			<content:encoded><![CDATA[<p>Æ!!</p>

<p>I writing this post to help my friends of <a title="Rubylearning.org" href="http://rubylearning.org/class/">Rubylearning</a> with a little <a title="Merb Official Home Page" href="http://merbivore.com/">Merb</a> application deployment on <a title="Locaweb" href="http://www.locaweb.com.br">Locaweb</a>. I&#8217;m just translating some informations that you can find <a title="Merb on Linux Share Host ( In Portuguese )" href="http://prodblog.locaweb.com.br/2008/11/11/suporte-a-merb-10-na-hospedagem-compartilhada-linux/">here</a> in portuguese.</p>

<p>Lets start! <img src='http://pothix.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>

<p>First open the <a title="Gerenciador de domínios" href="http://painel.locaweb.com.br/painel_controle/gerenciador_dominios.asp">Domain Manager</a> ( Gerenciador de domínios ) on Locaweb Panel ( Painel da Locaweb ) and configure the pointer of your main site to  other directory on public_html of your account ( this directory don&#8217;t need to exist ). Follow this steps:</p>

<ol>
    <li>Click on &#8220;alterar&#8221; ( change )</li>
    <li>Change the &#8220;Diretório Web&#8221; ( web directory ) to the new diretory</li>
    <li>And click on button &#8220;Salvar&#8221; ( save )</li>
</ol>

<p>Transfer your application to a directory on your host. For this example, lets say that your application is called &#8220;sample_merb&#8221;, so, connect via SSH on your account and create the directory &#8220;rack_app&#8221;:</p>

<blockquote><code>mkdir -p rack_app/sample_merb</code></blockquote>

<p>And move your application to there.</p>

<p>Your application must to have a file called &#8220;config.ru&#8221; to be executed by Phusion Passenger, so, you need to create this file on your application folder ( rack_app/sample_merb on this case ) with this content:</p>

<blockquote><code>require ‘rubygems’
require ‘merb-core’</code>

Merb::Config.setup(:merb_root   =&gt; “.”,
:environment =&gt; ENV['RACK_ENV'])

Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]
Merb::BootLoader.run
run Merb::Rack::Application.new</blockquote>

<p>Now you need to create a symbolic link on your public_html diretory, as you have configured on your Domain Manager ( Gerenciador de Domínios ) of Locaweb Panel.</p>

<blockquote><code>ln -s ~/rack_app/sample_merb/public ~/public_html/sample_merb</code></blockquote>

<p>With this simple configuration you will have your application pointed by apache with Phusion Passenger.</p>

<p>Just to you know, you can see the merb gems that are installed with:</p>

<blockquote><code>gem list | grep merb</code></blockquote>

<p>Hope this help you on how to make your simple application works on Locaweb. <img src='http://pothix.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pothix.com/blog/english/deploying-a-simple-merb-application-on-locaweb/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

