<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Aws on Yang's Blog</title><link>https://blog.yangtheman.com/tags/aws/</link><description>Recent content in Aws on Yang's Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Yang Chung</copyright><lastBuildDate>Sat, 05 Sep 2009 08:57:21 +0000</lastBuildDate><atom:link href="https://blog.yangtheman.com/tags/aws/index.xml" rel="self" type="application/rss+xml"/><item><title>Deploying a Rails app on Heroku (paperclip, gems, yml)</title><link>https://blog.yangtheman.com/2009/09/05/deploying-a-rails-app-on-heroku-paperclip-gems-yml/</link><pubDate>Sat, 05 Sep 2009 08:57:21 +0000</pubDate><guid>https://blog.yangtheman.com/2009/09/05/deploying-a-rails-app-on-heroku-paperclip-gems-yml/</guid><description>&lt;p&gt;I just moved my &lt;a href="http://www.playgroundrus.com" target="_blank" rel="noreferrer"&gt;PlaygroundsRUs&lt;/a&gt; site from &lt;a href="http://aws.amazon.com/ec2/" target="_blank" rel="noreferrer"&gt;AWS&lt;/a&gt; to &lt;a href="http://heroku.com/" target="_blank" rel="noreferrer"&gt;Heroku&lt;/a&gt;, and I couldn&amp;rsquo;t be happier. My first full month bill from Amazon was about $75, and $74 of that (99% of the total cost) was for running an instance. &lt;a href="http://www.harlanknight.net/pub/H@rlan_Knight_Wood/" target="_blank" rel="noreferrer"&gt;Harlan&lt;/a&gt; told me about Heroku after he deployed his &lt;a href="http://fork-this-demo.heroku.com/login" target="_blank" rel="noreferrer"&gt;ForkThis&lt;/a&gt; demo on there.&lt;/p&gt;
&lt;p&gt;Most of the transition was smooth, but there were a few hiccups on the way. One of them still hasn&amp;rsquo;t been resolved (one of the plugins is having conflict with PostgresSQL, which is used by Heroku). I will enumerate what I had to go through so that it might be easier for you.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Secret YAML files&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I have a public GitHub account for deploying on AWS using &lt;a href="http://ec2onrails.rubyforge.org/" target="_blank" rel="noreferrer"&gt;ec2onrails&lt;/a&gt;. Since it&amp;rsquo;s public and anyone can see it, I had to omit sensitive &lt;code&gt;.yml&lt;/code&gt; files in config directory that contained passwords and keys. It&amp;rsquo;s easily done by specifying those files in &lt;code&gt;.gitignore&lt;/code&gt; and listing them in &lt;code&gt;:nonvc_configs&lt;/code&gt; in &lt;code&gt;config/deploy.rb&lt;/code&gt; used by ec2onrails.&lt;/p&gt;
&lt;p&gt;I found out that for Heroku, the same can be achieved by creating another branch, including those files, merging with master, and pushing it to Heroku. So, the following lines should do the trick.&lt;/p&gt;
&lt;div class="highlight-wrapper"&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git checkout production
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;[remove those yml files from .gitignore]
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git merge master
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git push heroku production:master&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;**&lt;/p&gt;</description></item></channel></rss>