Browse files

Add headers to dream host post

  • Loading branch information...
1 parent c187e54 commit 6174109d2beb621b70f2c5d8d75bb3b15be94df1 @marksim committed Jul 23, 2012
@@ -6,12 +6,16 @@ comments: true
categories: hosting, rails, blog
+## Everybody Loves Dreamhost, but...
Dreamhost is a great little hosting company, but it really lags when it comes to keeping the latest software up to date. It's version of Ruby is 1.8.7 and the latest stable version of Rails they have running is 3.0.3. That release is technically in "security fix" mode. Ugh.
So I'd like to run Rails 3.2, but don't want to pay for a VPS since this system is going to be small and simple. How can I do it?
As it turns out, it's relatively easy. I only ran into one headache and was able to install anything I wanted without any problems. How did I do this? The secret, my friends, is <code>bundle pack</code>
+## Creating a new Vendored App
Let's create a new Rails 3.2 app and set our local RVM to use 1.8.7 since that's what passenger uses (and can't use another version)
``` bash Terminal
@@ -26,6 +30,8 @@ $ bundle package
$ capify .
+## Deploying via Copy
Now you'll need to edit your deploy file. It's easy to deploy via copy:
``` ruby Gemfile
@@ -66,6 +72,8 @@ $ cap deploy:setup
$ cap deploy:cold
+## The Big Gotcha: The Asset Pipeline
Now we need to enable the asset pipeline. First uncomment the line related to it in <code>Capfile</code>
``` ruby Capfile
@@ -76,6 +84,8 @@ Dir['vendor/gems/*/recipes/*.rb','vendor/plugins/*/recipes/*.rb'].each { |plugin
load 'config/deploy' # remove this line to skip loading any of the default tasks
+### ... and multiple platform hell.
Then we need to handle the singular headache that is related to the asset pipeline if you're working on a different platform than Debian linux (say, OS X)
The libv8 gem that is installed and vendored on your local cache is for 'darwin', which is not compatible with the linux architecture. I looked to see if I could figure another way around this, but the best way I could find is to ssh in, uncomment <code>gem 'therubyracer'</code> and run <code>bundle update && bundle pack</code> on the remote box. Then I copied the <code>libv8-</code> file in <code>vendor/cache</code> down to my local vendor cache and went on my merry way.

0 comments on commit 6174109

Please sign in to comment.