<?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>*blog &#187; web</title>
	<atom:link href="http://blog.joeygeiger.com/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.joeygeiger.com</link>
	<description>solving my problems, one at a time</description>
	<lastBuildDate>Wed, 19 Oct 2011 19:10:11 +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>Serving assets in Rails 3.1 with nginx</title>
		<link>http://blog.joeygeiger.com/2011/06/07/serving-assets-in-rails-3-1-with-nginx/</link>
		<comments>http://blog.joeygeiger.com/2011/06/07/serving-assets-in-rails-3-1-with-nginx/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 18:48:45 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=245</guid>
		<description><![CDATA[I decided to create a site that uses the new Rails 3.1rc. I have a nice setup for nginx to serve my static assets and I was able to get it working with rails 3.1. There&#8217;s nothing really too tricky since it&#8217;s setup to do it, but you need to make sure that you pre-compile [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to create a site that uses the new Rails 3.1rc. I have a nice setup for nginx to serve my static assets and I was able to get it working with rails 3.1. There&#8217;s nothing really too tricky since it&#8217;s setup to do it, but you need to make sure that you pre-compile your assets when deploying. The only confusing bit is that you should remove all of your assets before running the rake task to make sure you&#8217;re not duplicating files and/or serving the wrong thing. I did a bit of testing and found it was necessary to remove the files and re-compile before starting the server to get the correct files served. I&#8217;ve added a small snippet of code below to show how I did it. I also decided it wasn&#8217;t necessary to symlink the files into the shared directory since they were getting removed on every deploy anyway. I&#8217;m sure there&#8217;s a way to only delete the files that changed, but for now this works.</p>
<p><script src="https://gist.github.com/1012859.js?file=callbacks.rb"></script></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Serving+assets+in+Rails+3.1+with+nginx+http%3A%2F%2Fbit.ly%2FkT79dB" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Serving+assets+in+Rails+3.1+with+nginx+http%3A%2F%2Fbit.ly%2FkT79dB" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2011/06/07/serving-assets-in-rails-3-1-with-nginx/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Letting multiple users modify sets of records from a larger group</title>
		<link>http://blog.joeygeiger.com/2011/04/22/letting-multiple-users-modify-sets-of-records-from-a-larger-group/</link>
		<comments>http://blog.joeygeiger.com/2011/04/22/letting-multiple-users-modify-sets-of-records-from-a-larger-group/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 20:33:31 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[gminer]]></category>
		<category><![CDATA[redis]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=241</guid>
		<description><![CDATA[The title really isn&#8217;t great but it does describe an issue I recently ran into. I&#8217;m working on a web application that lets a user set wether an attached term is correct or incorrect. While this can be done on a record by record basis, it becomes quite tedious. I set up a system that [...]]]></description>
			<content:encoded><![CDATA[<p>The title really isn&#8217;t great but it does describe an issue I recently ran into. I&#8217;m working on a web application that lets a user set wether an attached term is correct or incorrect. While this can be done on a record by record basis, it becomes quite tedious. I set up a system that would show a listing of all of the terms along with a snippet of the text where the term was annotated. This worked well as I had searching, sorting and pagination and users could always move to page two or three if they wanted. This also worked when I had 1000 records. Once I bumped the dataset up to 300k records, <a href="http://www.scribd.com/doc/14683263/Efficient-Pagination-Using-MySQL">pagination in MySQL became pretty lethargic</a>.</p>
<p>I decided to remove the pagination and show the user the first set of records available. It then dawned on me that once you had multiple people working on the same page, they would all see the same records. This isn&#8217;t very efficient when you have a lot of stuff to get done. On a side note, this same problem existed in the paginated version, but when you have a link to move to the next page, it doesn&#8217;t crop up as much)</p>
<p>So now I needed to figure out a way to determine who was seeing what records, make sure that someone else didn&#8217;t see those same records at the same time, and make sure that if nothing was done to the records, they would return to the general pool in a reasonable amount of time.</p>
<p><strong>Enter <a href="http://redis.io/">Redis</a>.<br />
</strong><br />
I like redis. I&#8217;ve used it on a few other projects and felt that it would be a good fit since it has some nice set manipulation commands and the ability to expire a key after a specified amount of time.  I started thinking about how to remove records after the user processed them and such, but I ran into some issues with possible AJAX search lag and that some records I didn&#8217;t really care about might be removed from the general population. Also, what do you do if the user only wanted to update a subset of those records? By modifying the key, I&#8217;d need to reset the expiration timer.</p>
<p>After writing a bit of code, I figured out that if I deleted the current user&#8217;s key before I make a union of all the users records, I wouldn&#8217;t have to worry about orphan records and unmodified records. Every time the user saw a list of records, only the current visible set would be removed from the general population.</p>
<p><script src="https://gist.github.com/937370.js?file=snippet.rb"></script></p>
<p>Here&#8217;s a quick overview of what the script does.<br />
2. Add the current user id to the set of curator ids<br />
3. Remove the key that holds the current user&#8217;s reserved records<br />
4. Get all the curator ids<br />
5. Generate keys for all the curator reserved records<br />
6. Get the union of all of the reserved records</p>
<p>I have to make a special note here. Redis expects arguments in the form SUNION &#8220;key1&#8243; &#8220;key2&#8243; &#8220;key3&#8243;. When you have an array in ruby, generally it will look something like ["key1", "key2", "key3"] The * (splat) operator splits out the array into a group of keys that works for the Redis command.</p>
<p>7-10. Find the first 15 currently available records and store the ids in the current user&#8217;s set in Redis.<br />
11. Add a five minute expiration to the current user&#8217;s key.</p>
<p>It was interesting to me after thinking about it for a while that the solution ended up being so simple.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Letting+multiple+users+modify+sets+of+records+from+a+larger+group+http%3A%2F%2Fbit.ly%2Fh7yxNQ" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Letting+multiple+users+modify+sets+of+records+from+a+larger+group+http%3A%2F%2Fbit.ly%2Fh7yxNQ" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2011/04/22/letting-multiple-users-modify-sets-of-records-from-a-larger-group/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing jquery-ui autocomplete with cucumber/capybara</title>
		<link>http://blog.joeygeiger.com/2010/11/16/testing-jquery-ui-autocomplete-with-cucumbercapybara/</link>
		<comments>http://blog.joeygeiger.com/2010/11/16/testing-jquery-ui-autocomplete-with-cucumbercapybara/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 17:57:49 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=237</guid>
		<description><![CDATA[I had been running some features that were working on older versions of cucumebr/capybara with the selenium driver which had recently broke. I was able to find a site that has a nice explanation of how to do it. I was already doing most of this as I had found it before, but adding this [...]]]></description>
			<content:encoded><![CDATA[<p>I had been running some features that were working on older versions of cucumebr/capybara with the selenium driver which had recently broke. I was able to find a <a href="http://www.aentos.com/blog/testing-ajax-autocomplete-fields-cucumber-and-capybara">site</a> that has a nice explanation of how to do it. I was already doing most of this as I had found it before, but adding this step was very helpful.</p>
<p><script src="https://gist.github.com/508514.js?file=waiting_step.rb"></script></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Testing+jquery-ui+autocomplete+with+cucumber%2Fcapybara+http%3A%2F%2Fbit.ly%2Fb4SZC4" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Testing+jquery-ui+autocomplete+with+cucumber%2Fcapybara+http%3A%2F%2Fbit.ly%2Fb4SZC4" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/11/16/testing-jquery-ui-autocomplete-with-cucumbercapybara/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>railties</title>
		<link>http://blog.joeygeiger.com/2010/11/15/railties/</link>
		<comments>http://blog.joeygeiger.com/2010/11/15/railties/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 03:31:57 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=234</guid>
		<description><![CDATA[So, for the longest time I thought this was &#8220;rail-tees&#8221;. If you look at it, it&#8217;s actually &#8220;rail-ties&#8221;, you know, like the big wood pieces that go between train tracks? Anyway, this was probably blatantly obvious to a lot of people, but I figured I&#8217;d clear it up&#8230; Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>So, for the longest time I thought this was &#8220;rail-tees&#8221;. If you look at it, it&#8217;s actually &#8220;rail-ties&#8221;, you know, like the big wood pieces that go between train tracks?</p>
<p>Anyway, this was probably blatantly obvious to a lot of people, but I figured I&#8217;d clear it up&#8230;</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=railties+http%3A%2F%2Fbit.ly%2FbRMajM" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=railties+http%3A%2F%2Fbit.ly%2FbRMajM" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/11/15/railties/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dreamhost and Rails 3 solution?</title>
		<link>http://blog.joeygeiger.com/2010/10/25/dreamhost-and-rails-3-solution/</link>
		<comments>http://blog.joeygeiger.com/2010/10/25/dreamhost-and-rails-3-solution/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 14:38:22 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[linode.com]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=232</guid>
		<description><![CDATA[Use *linode.com Email sent to Dreamhost back in August. I&#8217;m going to make a request for this for you. Please note, it&#8217;s a significant bump from what we have right now, Rack 1.1.0, so only our rails expert can make the call, and check to make sure it won&#8217;t break anything. She&#8217;s on vacation this [...]]]></description>
			<content:encoded><![CDATA[<p>Use <sup>*</sup><a href="http://www.linode.com/?r=21d598ba613441982789b1852ce5d2a4b22689d6">linode.com</a></p>
<p>Email sent to Dreamhost back in August.</p>
<blockquote><p>I&#8217;m going to make a request for this for you. Please note, it&#8217;s a significant bump from what we have right now, Rack 1.1.0, so only our rails expert can make the call, and check to make sure it won&#8217;t break anything. She&#8217;s on vacation this week, but I&#8217;ll send her a follow up email, so she can get back with you on this as soon as she&#8217;s back.</p></blockquote>
<p>This was the response I got from Dreamhost after waiting for two months for an answer. (After I had to ask &#8220;hey, what&#8217;s up?&#8221;)</p>
<blockquote><p>Thanks for writing. We have to be careful with the upgrade as we have a high number of dependency packages that need to go through the upgrade. It&#8217;s scheduled and being worked on, and the current estimate for the full upgrade to 3.0.1 is within a month of two. I&#8217;ll get back to you again when there is an update, but feel free to contact me if you have any more questions.</p></blockquote>
<p>*Link includes my referral code</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Dreamhost+and+Rails+3+solution%3F+http%3A%2F%2Fbit.ly%2FbOuWY9" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Dreamhost+and+Rails+3+solution%3F+http%3A%2F%2Fbit.ly%2FbOuWY9" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/10/25/dreamhost-and-rails-3-solution/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rails, Rack Middleware, Cucumber and Selenium gotcha</title>
		<link>http://blog.joeygeiger.com/2010/09/15/rails-rack-middleware-cucumber-and-selenium-gotcha/</link>
		<comments>http://blog.joeygeiger.com/2010/09/15/rails-rack-middleware-cucumber-and-selenium-gotcha/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 15:02:28 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[capybara]]></category>
		<category><![CDATA[cucumber]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[selenium]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=224</guid>
		<description><![CDATA[I&#8217;m testing a web application that includes an AJAX file uploader which works fine when I run it in the browser but fails when running a Cucumber feature with Selenium. To process the upload in Rails I&#8217;m using a Rack middleware that will put the file into the params for me. Looking at the parameter [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m testing a web application that includes an <a href="http://github.com/valums/file-uploader">AJAX file uploader</a> which works fine when I run it in the browser but fails when running a Cucumber feature with Selenium. To process the upload in Rails I&#8217;m using a <a href="http://github.com/newbamboo/rack-raw-upload">Rack middleware</a> that will put the file into the params for me.</p>
<p>Looking at the parameter output I saw that the file was being sent to the server, but not processed. In my config.ru file I had <code>use Rack::RawUpload, :paths => ['/searches/upload']</code>to setup the middleware, but running &#8220;rake middleware&#8221; didn&#8217;t show it as being active. It seems there are two ways to activate the middleware and I was using the one that requires the server to be started with the config.ru file. The Cucumber/Capybara/Selenium uses Webrick which doesn&#8217;t start that way. So I moved my middleware initialization into initializers/middleware.rb and now things are working nicely.<br />
<code>Qtlhighliter::Application.config.middleware.use(Rack::RawUpload, :paths => ['/searches/upload'])</code></p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Rails%2C+Rack+Middleware%2C+Cucumber+and+Selenium+gotcha+http%3A%2F%2Fbit.ly%2FbTXDEo" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Rails%2C+Rack+Middleware%2C+Cucumber+and+Selenium+gotcha+http%3A%2F%2Fbit.ly%2FbTXDEo" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/09/15/rails-rack-middleware-cucumber-and-selenium-gotcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bundler and deploying difficult to build gems</title>
		<link>http://blog.joeygeiger.com/2010/08/06/bundler-and-deploying-difficult-to-build-gems/</link>
		<comments>http://blog.joeygeiger.com/2010/08/06/bundler-and-deploying-difficult-to-build-gems/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 17:18:12 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=221</guid>
		<description><![CDATA[With Bundler 1.0.0.rcx you can specify the build options for gems. This is nice because certain gems (mysql, rsruby) are sometimes painful to build. There is a bit of manual labor here which could be automated in some way you&#8217;d think, but for now it does work and that&#8217;s good enough for me. Login as [...]]]></description>
			<content:encoded><![CDATA[<p>With Bundler 1.0.0.rcx you can specify the build options for gems. This is nice because certain gems (mysql, rsruby) are sometimes painful to build.</p>
<p>There is a bit of manual labor here which could be automated in some way you&#8217;d think, but for now it does work and that&#8217;s good enough for me.</p>
<ol>
<li>Login as your deploy user.</li>
<li>Go to the deploy current directory where there is a Gemfile.</li>
<li>type &#8216;bundle config build.mysql &#8211;with-mysql-config=/usr/local/bin/mysql_config&#8217;</li>
</ol>
<p>This will now append the commands to the end of the build command for mysql allowing it to build when you deploy your application. It works quite well and I think it&#8217;s a simple solution for one of the biggest issues I had with trying to use Bundler in production.</p>
<p>The &#8216;bundle config&#8217; step also creates a .bundle/config in the user&#8217;s home directory that will then use those options for all bundle builds of that gem on the server. So if you&#8217;re installing 4 different apps on the server, you&#8217;ll only have to setup that command once and bundler will pick it up on each deploy.</p>
<p>Some examples<br />
<code>bundle config build.mysql --with-mysql-config=/usr/local/bin/mysql_config<br />
bundle config build.rsruby --with-R-dir=/usr/local/lib/R/<br />
bundle config build.rmagick --no-ri --no-rdoc<br />
</code></p>
<p>To view the options you can also type &#8216;bundle config&#8217; alone in a directory that contains a Gemfile. (Not sure why it needs a Gemfile to exist, but again, not a hard requirement)</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Bundler+and+deploying+difficult+to+build+gems+http%3A%2F%2Fbit.ly%2F9RuBBa" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Bundler+and+deploying+difficult+to+build+gems+http%3A%2F%2Fbit.ly%2F9RuBBa" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/08/06/bundler-and-deploying-difficult-to-build-gems/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dreamhost&#8230; you win&#8230; or lose really.</title>
		<link>http://blog.joeygeiger.com/2010/08/06/dreamhost-you-win-or-lose-really/</link>
		<comments>http://blog.joeygeiger.com/2010/08/06/dreamhost-you-win-or-lose-really/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 13:19:43 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[linode.com]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=218</guid>
		<description><![CDATA[You have already activated rack 1.1.0, but your Gemfile requires rack 1.2.1. Consider using bundle exec. So with the impending release of Rails 3 there is a little dependency that was added. Rack 1.2.1. Dreamhost is using passenger which also requires a version of Rack. The problem is that it&#8217;s 1.1.0. I&#8217;m pretty sure it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>You have already activated rack 1.1.0, but your Gemfile requires rack 1.2.1. Consider using bundle exec.</p></blockquote>
<p>So with the impending release of Rails 3 there is a little dependency that was added. Rack 1.2.1. Dreamhost is using passenger which also requires a version of Rack. The problem is that it&#8217;s 1.1.0. I&#8217;m pretty sure it&#8217;s not going to be possible to get Rails 3 running on Dreamhost without the servers being upgraded&#8230;</p>
<p>If you&#8217;re a Dreamhost customer please be sure to vote this suggestion up.<br />
<a href="https://panel.dreamhost.com/index.cgi?tree=home.sugg&#038;category=_all&#038;search=get%20ready%20for%20Rails%20">Get Ready for Rails 3</a></p>
<p>Please be sure to file a support ticket as well.</p>
<p>For me, if this isn&#8217;t fixed within the next few weeks I plan on moving to linode.com</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=Dreamhost%E2%80%A6+you+win%E2%80%A6+or+lose+really.+http%3A%2F%2Fbit.ly%2FbrpriH" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=Dreamhost%E2%80%A6+you+win%E2%80%A6+or+lose+really.+http%3A%2F%2Fbit.ly%2FbrpriH" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/08/06/dreamhost-you-win-or-lose-really/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>adding rails log rotation to dreamhost</title>
		<link>http://blog.joeygeiger.com/2010/05/21/adding-rails-log-rotation-to-dreamhost/</link>
		<comments>http://blog.joeygeiger.com/2010/05/21/adding-rails-log-rotation-to-dreamhost/#comments</comments>
		<pubDate>Fri, 21 May 2010 19:12:04 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[logrotate]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=210</guid>
		<description><![CDATA[While Dreamhost may rotate the apache logs for you there is nothing automatic to rotate the rails production logs. This may not be an issue since you have &#8220;unlimited&#8221; disk space but it&#8217;s a good idea anyway. You need to install logrotate since it doesn&#8217;t exist by default on the server and then place it [...]]]></description>
			<content:encoded><![CDATA[<p>While Dreamhost may rotate the apache logs for you there is nothing automatic to rotate the rails production logs. This may not be an issue since you have &#8220;unlimited&#8221; disk space but it&#8217;s a good idea anyway.</p>
<p>You need to install logrotate since it doesn&#8217;t exist by default on the server and then place it in a location where it can be run. You also need to create the configuration file and status files. Once that is set up, you can install a cron job via the Dreamhost panel.</p>
<p><script src="http://gist.github.com/409285.js?file=install_logrotate.sh"></script></p>
<p><script src="http://gist.github.com/409285.js?file=logrotate.conf"></script></p>
<p><script src="http://gist.github.com/409285.js?file=cronjob.text"></script></p>
<p>Now it should be rotating your application logs nightly. You can add more sites to the conf file as needed.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=adding+rails+log+rotation+to+dreamhost+http%3A%2F%2Fbit.ly%2FczH0L7" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=adding+rails+log+rotation+to+dreamhost+http%3A%2F%2Fbit.ly%2FczH0L7" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/05/21/adding-rails-log-rotation-to-dreamhost/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>I beat Dreamhost. How to really get rails 3, bundler and dreamhost working.</title>
		<link>http://blog.joeygeiger.com/2010/05/17/i-beat-dreamhost-how-to-really-get-rails-3-bundler-and-dreamhost-working/</link>
		<comments>http://blog.joeygeiger.com/2010/05/17/i-beat-dreamhost-how-to-really-get-rails-3-bundler-and-dreamhost-working/#comments</comments>
		<pubDate>Mon, 17 May 2010 14:38:18 +0000</pubDate>
		<dc:creator>jgeiger</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[bundler]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://blog.joeygeiger.com/?p=203</guid>
		<description><![CDATA[Please check out my earlier post so you can get the whole git/capistrano setup working as well. So I&#8217;ve been trying to get rails 3 running with bundler on Dreamhost for a while. I&#8217;ve had a few posts on here about how to do it. In the end, they didn&#8217;t work completely. I&#8217;ve sent requests [...]]]></description>
			<content:encoded><![CDATA[<p>Please check out <a href="http://blog.joeygeiger.com/2010/02/08/rails-3-bundler-git-and-dreamhost/" target="_blank">my earlier post</a> so you can get the whole git/capistrano setup working as well.</p>
<p>So I&#8217;ve been trying to get rails 3 running with bundler on Dreamhost for a while. I&#8217;ve had a few posts on here about how to do it. In the end, they didn&#8217;t work completely. I&#8217;ve sent requests into Dreamhost to upgrade rubygems to 1.3.6 so the newest versions of bundler would work. I was told &#8216;No&#8217; but go to <a href="http://wiki.dreamhost.com/RubyGems" target="_blank">this wiki site</a>.</p>
<p>I wasn&#8217;t too happy about that since the top of the page has a big warning &#8216;DON&#8217;T DO THIS&#8217;. If you&#8217;re here looking at this you probably have the tech knowhow to do this and realize the world won&#8217;t end when you do.</p>
<p>So here&#8217;s the step by step directions for how I got it working.<br />
You can check out the original wiki instructions at <a href="http://wiki.dreamhost.com/RubyGems" target="_blank">http://wiki.dreamhost.com/RubyGems</a>.</p>
<p>Add this to your .bashrc<br />
<script src="http://gist.github.com/403832.js?file=.bashrc"></script> This will setup your shell to use local gems installed in your .gems directory, setup the path to check there first and opt/bin as well.  Next we need to install a newer version of rubygems. <script src="http://gist.github.com/403832.js?file=install_rubygems.sh"></script></p>
<p>This will get rubygems installed and make sure you run your version before dreamhost&#8217;s. You then install bundler and rake. These are the only two gems I install in the system as I prefer to have all of my apps use their own gem versions. Putting everything into system is a big mess and a dependency nightmare on updates.</p>
<p>Next we need to make sure your app is setup to use the bundler gem. You need to modify your environment.rb and boot.rb</p>
<p><script src="http://gist.github.com/403832.js?file=boot.rb"></script> Make sure you change the application name to your name. Really you&#8217;re only adding the single line for the GEM_PATH <script src="http://gist.github.com/403832.js?file=environment.rb"></script></p>
<p>I was using the suggestions in the wiki but I eventually figured out that Dreamhost wasn&#8217;t properly picking up my gems even with the changed GEM_PATH. Adding the &#8216;Gem.clear_paths&#8217; to boot.rb allowed the gems to be seen. This is what finally cracked the problem.</p>
<p>Hopefully this works for you.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/intent/tweet?text=I+beat+Dreamhost.+How+to+really+get+rails+3%2C+bundler+and+dreamhost+working.+http%3A%2F%2Fbit.ly%2FbLhLOA" title="Post to Twitter"><img class="nothumb" src="http://blog.joeygeiger.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/intent/tweet?text=I+beat+Dreamhost.+How+to+really+get+rails+3%2C+bundler+and+dreamhost+working.+http%3A%2F%2Fbit.ly%2FbLhLOA" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://blog.joeygeiger.com/2010/05/17/i-beat-dreamhost-how-to-really-get-rails-3-bundler-and-dreamhost-working/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

