<?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>random facts girl &#187; ruby on rails</title>
	<atom:link href="http://www.soychicka.com/tag/ruby-on-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.soychicka.com</link>
	<description></description>
	<lastBuildDate>Thu, 26 Aug 2010 23:53:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Radiant Heroku&#8230; getting your Radiant App live on Heroku in about 10 minutes.</title>
		<link>http://www.soychicka.com/2009/11/16/radiant-heroku-getting-a-radiant-app-live-on-heroku/</link>
		<comments>http://www.soychicka.com/2009/11/16/radiant-heroku-getting-a-radiant-app-live-on-heroku/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 20:54:51 +0000</pubDate>
		<dc:creator>soychicka</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[heroku]]></category>
		<category><![CDATA[radiant]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.soychicka.com/?p=711</guid>
		<description><![CDATA[I&#8217;ve discovered various degrees of up-to-datedness and accuracy in some of the tutorials out there for deploying an app built on Radiant CMS to Heroku, so here&#8217;s one that is valid for the latest Radiant CMS release (0.8.1). This tutorial assumes that you have already installed and configured the following: - Rails (2.3.4) -  Git (1.6.4.1) [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<!-- wp-jquery-lightbox, a WordPress plugin by ulfben --> <p>I&#8217;ve discovered various degrees of up-to-datedness and accuracy in some of the tutorials out there for deploying an app built on Radiant CMS to Heroku, so here&#8217;s one that is valid for the latest Radiant CMS release (0.8.1).</p>
<p>This tutorial assumes that you have already installed and configured the following:<br />
- Rails (2.3.4)<br />
-  Git (1.6.4.1)<br />
- Heroku gem (1.3.0)</p>
<p>Specifically, it also assumes that you either a) have configured an ssh keys for use with git, or b) know how to deal with it if you haven&#8217;t.</p>
<p>If you don&#8217;t meet all of the above criteria,  get crackin&#8217;&#8230; but once you&#8217;re ready, read on.</p>
<p><span id="more-711"></span></p>
<h2>Install gems:</h2>
<p>You&#8217;ll need, at bare minimum, the radiant (v0.8.1), taps (v0.2.19), and rspec (v1.2.9) gems.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo gem install radiant</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo gem install taps</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ sudo gem install rspec</div></td></tr></tbody></table></div>
<h2>Create your app</h2>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ radiant --database sqlite3 testApp</div></td></tr></tbody></table></div>
<p>This step automagically creates your Radiant app, and spits out the names of the files it creates followed by a set of instructions for completing installation.  <strong>Ignore what you see there and follow these instructions instead</strong>.</p>
<h2>Create your database</h2>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ cd testApp<br />
$ rake db:bootstrap</div></td></tr></tbody></table></div>
<p>This will set up the necessary database structure in your local install.  There are a few options you&#8217;ll need to select:</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">This task will destroy any data in the database. Are you sure you want to continue? [yn] y</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Create the admin user (press enter for defaults).<br />
Name (Administrator):<br />
Username (admin):<br />
Password (radiant):</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Initializing configuration.........OK</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Select a database template:<br />
1. Empty<br />
2. Roasters (a coffee-themed blog / brochure)<br />
3. Simple Blog<br />
4. Styled Blog<br />
[1-4]: (try out 2)</div></td></tr></tbody></table></div>
<h1>Get <strong>git</strong></h1>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ git init</div></td></tr></tbody></table></div>
<p>Initializes your new git repository.  If you don&#8217;t get git, get it <a title="Gitcasts" href="http://gitcasts.com/">here</a></p>
<h2>Make caching Heroku-Friendly</h2>
<p>In your environment config file (config/environment.rb), you need to update the cache configuration.  Heroku&#8217;s file system is read-only, so all cache must be written in the tmp directory.</p>
<p>replace <span style="text-decoration: line-through;"> config.middleware.use ::Radiant::Cache:</span></p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">config.middleware.use ::Radiant::Cache,<br />
:entitystore =&amp;gt; &quot;radiant:tmp/cache/entity&quot;,<br />
:metastore =&amp;gt; &quot;radiant:tmp/cache/meta&quot;</div></td></tr></tbody></table></div>
<h2>Let Heroku know what gems you need.</h2>
<p>Since direct access to the command line is not available on the heroku server, create a .gems file to let Heroku know what gems (and what versions of the gems!) are required for your app.  When you push your project, the required gems will automagically be installed for you.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ vi .gems</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;</div></td></tr></tbody></table></div>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">----------------------<br />
rspec --version 1.2.9<br />
radiant --version 0.8.1<br />
----------------------</div></td></tr></tbody></table></div>
<h2>Check in</h2>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ git add .<br />
$ git commit -m &quot;changed cache dir and added gem manifest&quot;</div></td></tr></tbody></table></div>
<h2>Deploy!</h2>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ heroku create<br />
soychickas-brain2:testApp soychicka$ heroku create<br />
Created http://severe-waterfall-89.heroku.com/ | git@heroku.com:severe-waterfall-89.git<br />
Git remote heroku added</div></td></tr></tbody></table></div>
<p>The returned lines will include the url for your new app, and the address of the git repository pushed to heroku.</p>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$git push heroku master<br />
-----&amp;gt; Rails app detected<br />
Compiled slug size is 7.8MB<br />
-----&amp;gt; Launching............ done<br />
http://severe-waterfall-89.heroku.com deployed to Heroku</div></td></tr></tbody></table></div>
<p>is what you should see if all goes well.  You can see that the server was started, so you&#8217;re almost ready to go.  But first, you need to&#8230;</p>
<h2>Push your database to Heroku</h2>
<div class="codecolorer-container text twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">heroku db:push<br />
Auto-detected local database: sqlite://db/development.sqlite3.db<br />
Sending schema<br />
Sending data<br />
9 tables, 82 records<br />
schema_migrat: 100% |==========================================| Time: 00:00:00<br />
config: &nbsp; &nbsp; &nbsp; &nbsp;100% |==========================================| Time: 00:00:00<br />
page_parts: &nbsp; &nbsp;100% |==========================================| Time: 00:00:00<br />
extension_met: 100% |==========================================| Time: 00:00:00<br />
sessions: &nbsp; &nbsp; &nbsp;100% |==========================================| Time: 00:00:00<br />
pages: &nbsp; &nbsp; &nbsp; &nbsp; 100% |==========================================| Time: 00:00:00<br />
snippets: &nbsp; &nbsp; &nbsp;100% |==========================================| Time: 00:00:00<br />
layouts: &nbsp; &nbsp; &nbsp; 100% |==========================================| Time: 00:00:00<br />
users: &nbsp; &nbsp; &nbsp; &nbsp; 100% |==========================================| Time: 00:00:00<br />
Sending indexes<br />
Resetting sequences</div></td></tr></tbody></table></div>
<p>is what you should see if all goes well here.</p>
<p>At this point, your app should be live at the url you received when deploying.  Make sure to check it out before tinkering with anything&#8230;  and then you know that you have a safe starting point to return to when you have caused what otherwise would have been irreparable damage to your app.</p>
<p>On that note, I&#8217;d recommend taking advantage of Heroku&#8217;s new <strong><a title="Heroku bundles" href="http://addons.heroku.com/bundles" target="_blank">Bundles</a></strong> feature that lets you create an archive (tarball) of your application code repository and a dump of the database. By default, the bundle is stored on the Heroku servers, but you can download the bundle to your local machine, keep one  or more on Heroku (, upload bundles from your local machine and re-animate a bundle with the &#8220;heroku bundles&#8221; commands.  You can get one bundle for free, or unlimited bundles for $20/month.  The re-animation process seems a little wonky for the time being, but it&#8217;s a good option if you want to unabashedly tinker with abandon (and without fear).</p>
<p>So there&#8217;s a simple installation path for deploying a standard Radiant application on Heroku.  Play around with your install and see if it suits your needs.</p>
<p>Heads up, though: if you want to install extensions in your Heroku-deployed app,  there is a custom path for that too!  Using the built-in <span style="font-family: Monaco, 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; line-height: 16px; font-size: 12px; color: #444444; white-space: pre;">./script/extension install extensionName </span>doesn&#8217;t play nicely with heroku &#8211; it installs the extensions as submodules, which are not supported by Heroku at this time.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.soychicka.com/2009/11/16/radiant-heroku-getting-a-radiant-app-live-on-heroku/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
