Real Adventure

Rails on Ubuntu VPS

So now I have a KVM VPS running Ubuntu. How do I setup a rails development environment? The Linux/OSX users are no as lucky as the Windows users at this – There is no simple stupid all-in-one script/binary for us. Most of us need to go through a try-and-error process to accomplish the task. In this post I am going to do it again and try to record it so that other people (or the future me) can playback.

Prepare

That’s the routine commands:

update system
1
2
3
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git curl build-essential vim libcurl4-openssl-dev bison openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf

ZSH

This step is optional. Bash is good enough. However I like the fancy zsh for its flexible custom prompt.

install oh-my-zsh
1
2
3
4
sudo apt-get install zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh

Personally, I will change the zsh theme to “gnzh”. You can leave it as is or use any theme you prefer. To do this, open ~/.zshrc and alter “ZSH_THEME”.

Read on →

Octopress for Absolute Beginners

What is Octopress

Octopress is a “blogging framework” according to its author. I’d rather call it a webpage publishing system. For its main function is to publish webpages.

Why use Octopress

For blogging, most people use blogger, wordpress.com, livejournal, etc. Some build independent blogs with their own domain, own hosting and WordPress source code. Those are all very good solutions and one doesn’t need to switch unless has really good reasons.

However if you, like myself, are already bored with all those popular platforms; or, again like myself, are planning to learn Ruby, Git and are trying to work your way out of GitHub. Then Octopress may be for you.

By using Octopress you will get:

  • to learn how to build a Ruby programming environment.
  • some basic command of Git.
  • to write blog posts and pages completely with CLI. That’s right. You can write articles with VIM.
  • to use markdown syntax in blog posts. Or to learn it if you don’t already know.
  • to host your blog on GitHub. Free.
  • very nice code highlighting.

…and, on top of all, it is fun.

Read on →

Hello World!

This is a test post.

Header 1

Normal text

Header 2

Normal text

Header 3

Normal text

Normal text

  • list item 1
  • list item 2
  • list item 3

Normal text

  1. ordered list item 1
  2. ordered list item 2
  3. ordered list item 3

block quote

another paragraph of block quote

emphasized strong emphasized

this is a link to google

My little Dora