Another quick tip for people using Octopress:
If you’re running Octopress on Mac OSX you may be running into some real
performance issues when you run the rake preview
command to check your
posts locally before you run the rake deploy
to get things up and
running live. This is because, for whatever reason, the
WEBrick server runs slowly on
XCode 4.2+. I haven’t dived deep into finding a solution for this
because I found a nice fix.
First, run gem install thin
from your command line.
This command will install the Ruby Thin Server. This server is what I use for my Rails testing as well and it works exactly the way I want it to. (I have read many recommendations on using Pow as well, but I haven’t spent the time looking into it so I can’t personally recommend it yet.)
The next step is to change your Gemfile
located in the top directory
of your Octopress files. Simply add gem 'thin'
to the development
group and save the changes.
This is what your Gemfile
should look like now if you’re running
Octopress 2.0 without any changes up to this point:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
The next time you run rake preview
your blog on
http://localhost:4000 should run smooth as silk on the Thin server.
Enjoy your sweet, speedy, dev environment!