<?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>42 &#187; Dreamhost</title>
	<atom:link href="http://www.42.mach7x.com/category/dreamhost/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.42.mach7x.com</link>
	<description>Thoughts and tips about programming with Ruby on Rails</description>
	<lastBuildDate>Thu, 09 Sep 2010 09:28:07 +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>Rails Passenger Staging environment problem in Dreamhost</title>
		<link>http://www.42.mach7x.com/2010/09/09/rails-passenger-staging-environment-problem-in-dreamhost/</link>
		<comments>http://www.42.mach7x.com/2010/09/09/rails-passenger-staging-environment-problem-in-dreamhost/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 09:28:07 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[Phusion Passenger]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Passenger]]></category>
		<category><![CDATA[phusion passenger]]></category>
		<category><![CDATA[Staging]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=226</guid>
		<description><![CDATA[Problem You want to deploy your rails application using Passenger in Dreamhost, but on a staging environment. It doesn&#8217;t work just changing your Capistrano recipe or your environment files, as the default environment for passenger is &#8216;production&#8217;. Solution Looking at the Passenger documentation here, there are four different ways of achieving that by changing the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to deploy your rails application using Passenger in Dreamhost, but on a staging environment. It doesn&#8217;t work just changing your Capistrano recipe or your environment files, as the default environment for passenger is &#8216;production&#8217;.</p>
<p><strong>Solution</strong><br />
Looking at the Passenger documentation <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#rails_env">here</a>, there are four different ways of achieving that by changing the RailsEnv option. If you don&#8217;t want to change the Apache configuration files, and as long as the option AllowOverride is on (which should be on Dreamhost), then you would need to create an .htaccess file in your application&#8217;s public folder with the following:</p>
<p><span class="code">RailsEnv staging</span> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/09/09/rails-passenger-staging-environment-problem-in-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dreamhost &#8211; SquirrelMail &#8211; old-messages folder</title>
		<link>http://www.42.mach7x.com/2010/08/05/dreamhost-squirrelmail-old-messages-folder/</link>
		<comments>http://www.42.mach7x.com/2010/08/05/dreamhost-squirrelmail-old-messages-folder/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 17:14:50 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[old-messages]]></category>
		<category><![CDATA[squirrelmail]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=210</guid>
		<description><![CDATA[Problem You have left a message in a squirrel mail account in dreamhost for a long time and it gets archived by dreamhost. According to the dreamhost you should be able to get to your archived messages, by looking at the old-messages folder. The problem is that just by logging in to squirrel mail the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You have left a message in a squirrel mail account in dreamhost for a long time and it gets archived by dreamhost. According to the dreamhost you should be able to get to your archived messages, by looking at the old-messages folder.<br />
The problem is that just by logging in to squirrel mail the folder doesn&#8217;t get displayed on the left hand side.</p>
<p><strong>Solution</strong><br />
Log on to squirrel mail and go to &#8216;Folders&#8217; menu at the top.<br />
In the &#8216;Create Folder&#8217; put &#8216;test&#8217; or anything that you would like in the text box, and make sure that in the dropdown box you select &#8216;INBOX.old-messages&#8217;, so your newly created folder is a subfolder of the &#8216;inbox/old-messages&#8217; folder.<br />
Create the subfolder, refresh the page, and in your left hand the old-messages folder should appear.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/08/05/dreamhost-squirrelmail-old-messages-folder/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thunderbird &#8211; GoogleMail</title>
		<link>http://www.42.mach7x.com/2010/07/21/thunderbird-googlemail/</link>
		<comments>http://www.42.mach7x.com/2010/07/21/thunderbird-googlemail/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 08:27:50 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Thunderbird]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=207</guid>
		<description><![CDATA[Problem You want to add the Google calendar tab in your thunderbird but you don&#8217;t want to use the standard google mail calendar, but the one setup for your domain. Solution Install the Google Calendar add on in Thunderbird: Tools -> Addons -> Get Add-ons and then search for Calendar (Google Calendar Tab) The when [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to add the Google calendar tab in your thunderbird but you don&#8217;t want to use the standard google mail calendar, but the one setup for your domain.</p>
<p><strong>Solution</strong><br />
Install the Google Calendar add on in Thunderbird:</p>
<p>Tools -> Addons -> Get Add-ons and then search for Calendar (Google Calendar Tab)</p>
<p>The when thunderbird is restarted go and change the default domain for logging in to the calender in:</p>
<p>Tools &#8211; Add-ons -> Extensions</p>
<p>and select the Preferences in the Google Calendar Tab.</p>
<p>from there select the &#8216;Google Apps for your domain&#8217; and then change the URL into something like:</p>
<p>&#8216;http://www.google.com/calendar/hosted/your_domain_hosted_with_google</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/07/21/thunderbird-googlemail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>406 Not Acceptable &#8211; Princely &#8211; Dreamhost</title>
		<link>http://www.42.mach7x.com/2010/04/22/406-not-acceptable-princely-dreamhost/</link>
		<comments>http://www.42.mach7x.com/2010/04/22/406-not-acceptable-princely-dreamhost/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 10:14:42 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Prince XML]]></category>
		<category><![CDATA[princely]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=193</guid>
		<description><![CDATA[Problem You get a &#8217;406 Not Acceptable&#8217; response from the web server when you try to use the princely plugin for generating pdf on a Ruby on Rails application hosted on dreamhost. Solution Having tried the &#8216;Extra Web Security&#8217; settings in dreamhost Web panel, and setting them on/off did not get very far. Also setting [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You get a &#8217;406 Not Acceptable&#8217;  response from the web server when you try to use the princely plugin for generating pdf on a Ruby on Rails application hosted on dreamhost.</p>
<p><strong>Solution</strong><br />
Having tried the &#8216;Extra Web Security&#8217; settings in dreamhost Web panel, and setting them on/off did not get very far.<br />
Also setting up an .htaccess file didn&#8217;t seem to make any difference.<br />
So the mod_security settings did not seem to be the cause of the problem.<br />
Having a look at the apache error log files which in the case of the dreamhost ps are in /usr/local/dh/apache2/logs/apache2-ps_name it turns out that the problem was that the path for the prince binary was not setting up correctly in the file vendor/plugins/princely/lib/prince.rb on line 26.<br />
A quick hack to make it work until finding the reason for the problem is to hardcode the path to the prince binary, so:<br />
<span class="code">@exe_path = `which prince`.chomp<br />
if @exe_path.nil?<br />
  @exe_path=&#8217;/usr/local/bin/prince&#8217;<br />
end</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/04/22/406-not-acceptable-princely-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>undefined method &#8216;remap&#8217; for class &#8216;Magick::Image&#8217;</title>
		<link>http://www.42.mach7x.com/2010/03/18/undefined-method-remap-for-class-magickimage/</link>
		<comments>http://www.42.mach7x.com/2010/03/18/undefined-method-remap-for-class-magickimage/#comments</comments>
		<pubDate>Thu, 18 Mar 2010 10:13:10 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[Magick]]></category>
		<category><![CDATA[Remap]]></category>
		<category><![CDATA[Rmagick]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=180</guid>
		<description><![CDATA[Problem You have just deployed your rails application to dreamhost but you are getting this error from passenger. Solution There was a change in the ImageMagic between versions 6.4.3 and 6.4.4 from the affinity function to remap. If you don&#8217;t want, or don&#8217;t have time to recompile the ImageMagick and install the rmagick gem, you [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You have just deployed your rails application to dreamhost but you are getting this error from passenger.</p>
<p><strong>Solution</strong><br />
There was a change in the ImageMagic between versions 6.4.3 and 6.4.4 from the affinity function to remap.<br />
If you don&#8217;t want, or don&#8217;t have time to recompile the ImageMagick and install the rmagick gem, you can comment out the two declarations for the alias functions, located around lines 782 and 1525 in the file rmagick-2.12.2/lib/RMagick.rb:</p>
<p><span class="code">alias_method :affinity, :remap</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/03/18/undefined-method-remap-for-class-magickimage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freezing rails to an older version using gems</title>
		<link>http://www.42.mach7x.com/2010/03/15/freezing-rails-to-an-older-version-using-gems/</link>
		<comments>http://www.42.mach7x.com/2010/03/15/freezing-rails-to-an-older-version-using-gems/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 10:43:45 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[2.3.2]]></category>
		<category><![CDATA[freezing]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=178</guid>
		<description><![CDATA[Problem You want to deploy to a shared host (dreamhost) that has a later version of rails from the one you have developed your application. You also have a later version installed in your development pc,and using rake rails:freeze:gems uses the latest one and not the one you want. Solution Use the following to freeze [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You want to deploy to a shared host (dreamhost) that has a later version of rails from the one you have developed your application.<br />
You also have a later version installed in your development pc,and using rake rails:freeze:gems uses the latest one and not the one you want.</p>
<p><strong>Solution</strong><br />
Use the following to freeze the specific version you want, and by using your gems you have installed:<br />
<span class="code">rake rails:freeze:gems VERSION=2.3.2</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/03/15/freezing-rails-to-an-older-version-using-gems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting your Github git project to dreamhost</title>
		<link>http://www.42.mach7x.com/2010/03/12/getting-your-github-git-project-to-dreamhost/</link>
		<comments>http://www.42.mach7x.com/2010/03/12/getting-your-github-git-project-to-dreamhost/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 10:17:06 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[github]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=170</guid>
		<description><![CDATA[Problem You already have a project in github, but you want to move it to a different host (ie dreamhost) Solution Following the post here that describes how to setup a new git repository in dreamhost, the only difference after the initial setup : ssh username@dreamhost_domain.com mkdir -p ~/git/yourproject.git cd ~/git/yourproject.git git &#8211;bare init is [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
You already have a project in github, but you want to move it to a different host (ie dreamhost)</p>
<p><strong>Solution</strong><br />
Following the post <a href="http://railstips.org/blog/archives/2008/11/23/gitn-your-shared-host-on/">here</a> that describes how to setup a new git repository in dreamhost, the only difference after the initial setup :</p>
<p><span class="code">ssh username@dreamhost_domain.com</br><br />
mkdir -p ~/git/yourproject.git</br><br />
cd ~/git/yourproject.git</br><br />
git &#8211;bare init</span></p>
<p>is to edit your project&#8217;s .git/config file:<br />
<span class="code">vi local_host/your_project/.git/config</span></p>
<p>and change the :<br />
<span class="code">url = git@github.com:user_name/project_name.git</span></p>
<p>to the following:<br />
<span class="code">ssh://dreamhost_username@dreamhost_domain/~/git/yourproject.git</span></p>
<p>Lastly you have to push for the first time to the server:<br />
<span class="code">git push origin master</span></p>
<p>Optionally if you would like to check and/or checkout to a different pc you can use:<br />
<span class="code">git clone ssh://dreamhost_username@dreamhost_domain/~/git/yourproject.git</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2010/03/12/getting-your-github-git-project-to-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Freezing gems (other than rails) on 2.3.4</title>
		<link>http://www.42.mach7x.com/2009/09/08/freezing-gems-other-than-rails-on-2-3-4/</link>
		<comments>http://www.42.mach7x.com/2009/09/08/freezing-gems-other-than-rails-on-2-3-4/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 20:17:04 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[2.3.4]]></category>
		<category><![CDATA[freezing]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=132</guid>
		<description><![CDATA[Problem Your host (ie dreamhost) for deploying applications doesn&#8217;t have the gems you are using in your development. Solution After freezing your rails gems with rake rails:freeze:gems, freeze the rest of your gems, not with rake gems:freeze gem=GEM_NAME, as used in previous versions of rails, but with: rake gems:unpack]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Your host (ie dreamhost) for deploying applications doesn&#8217;t have the gems you are using in your development.</p>
<p><strong>Solution</strong><br />
After freezing your rails gems with rake rails:freeze:gems, freeze the rest of your gems, not with rake gems:freeze gem=GEM_NAME, as used in previous versions of rails, but with:</p>
<p><span class="code">rake gems:unpack</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2009/09/08/freezing-gems-other-than-rails-on-2-3-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RubyGem version error: rack(0.3.0 not ~&gt; 1.0.0)</title>
		<link>http://www.42.mach7x.com/2009/08/24/rubygem-version-error-rack0-3-0-not-1-0-0/</link>
		<comments>http://www.42.mach7x.com/2009/08/24/rubygem-version-error-rack0-3-0-not-1-0-0/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 16:45:00 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[rack]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=125</guid>
		<description><![CDATA[Problem Trying to deploy in dreamhost with capistrano you get the error: RubyGem version error: rack(0.3.0 not ~> 1.0.0) Solution Log in with ssh to your dreamhost account and then install the newer version of rack that is not yet installed in dreamhost: gem install rack That assumes that you have followed the instructions for [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
Trying to deploy in dreamhost with capistrano you get the error:</p>
<p><span class="code">RubyGem version error: rack(0.3.0 not ~> 1.0.0) </span></p>
<p><strong>Solution</strong><br />
Log in with ssh to your dreamhost account and then install the newer version of rack that is not yet installed in dreamhost:</p>
<p><span class="code">gem install rack</span></p>
<p>That assumes that you have followed the instructions for setting up your local gems in dreamhost (<a href="http://wiki.dreamhost.com/index.php/Ruby_on_Rails#Using_Gems_Installed_in_Your_Home_Directory">here</a>) and you already have a ~/username/.gems directory.</p>
<p>You may probably need to also add the following to your config/environment.rb :</p>
<p><span class="code">ENV['GEM_PATH'] = &#8216;/home/USERNAME/.gems&#8217;</span></p>
<p><strong>Note 09-Sep-2009</strong><br />
It seems that according to the dreamhost wiki we need to add the following to the config/environment.rb, instead of the line above:</p>
<p><span class="code">if ENV['RAILS_ENV'] == &#8216;production&#8217;<br />
    ENV['GEM_PATH'] = &#8216;/home/USERNAME/.gems&#8217;<br />
    require &#8216;/home/USERNAME/.gems/gems/rack-1.0.0/lib/rack.rb&#8217;<br />
end</span></p>
<p>to use the locally installed rack-1.0.0 gem, instead of the rack installed by dreamhost.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2009/08/24/rubygem-version-error-rack0-3-0-not-1-0-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>undefined method `cache_template_loading=&#8217; for ActionView::Base:Class</title>
		<link>http://www.42.mach7x.com/2009/06/16/undefined-method-cache_template_loading-for-actionviewbaseclass/</link>
		<comments>http://www.42.mach7x.com/2009/06/16/undefined-method-cache_template_loading-for-actionviewbaseclass/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 13:22:48 +0000</pubDate>
		<dc:creator>kosmas</dc:creator>
				<category><![CDATA[Dreamhost]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://www.42.mach7x.com/?p=117</guid>
		<description><![CDATA[Problem While developing on Rails 2.3.2 you want to deploy in dreamhost that uses 2.2.2 at the moment. Solution Although we could try to freeze the specific rails version we are using, it&#8217;s probably easier as a temporary solution, until dreamhost upgrades the rails version to do the following: Make sure that we have the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem</strong><br />
While developing on Rails 2.3.2 you want to deploy in dreamhost that uses 2.2.2 at the moment.</p>
<p><strong>Solution</strong><br />
Although we could try to freeze the specific rails version we are using, it&#8217;s probably easier as a temporary solution, until dreamhost upgrades the rails version to do the following:</p>
<ul>
<li>Make sure that we have the following line with the appropriate version of </li>
<pre class="code">RAILS_GEM_VERSION = '2.2.2' unless defined? RAILS_GEM_VERSION</pre>
<p>   in the config/environment.rb file</p>
<li>Rename the application_controller.rb file back to application.rb</li>
<li>Comment out the following line from config/environments/production.rb</li>
<pre class="code">config.action_view.cache_template_loading = true</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.42.mach7x.com/2009/06/16/undefined-method-cache_template_loading-for-actionviewbaseclass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
