OS: Ubuntu 12.04 64-bit
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
/etc/profile
, ~/.bash_profile
are for login shell, and ~/.bashrc
is for interactive shell, and RVM’s path is added to ~/.bash_profile
, so you need to set the shell as a login shell.
Exit current shell, and open a new shell,
ruby -v
You have successfully installed ruby.
$ sudo apt-get install -y python
Because Pygments syntax highlighting needs Python.
First you need to clone the source
branch to the local octopress folder.
$ git clone -b source git@github.com:username/username.github.com.git octopress
Then clone the master
branch to the _deploy
subfolder.
$ cd octopress
$ git clone git@github.com:username/username.github.com.git _deploy
Then run the rake installation to configure everything
$ gem install bundler
$ bundle install
NOW you’ve setup with a new local copy of your Octopress blog.
You don’t need to run rake setup_github_pages
any more.
If you want to blog at more than one computer, you need to make sure that you push everything before switching computers. From the first machine do the following whenever you’ve made changes:
$ rake new_post["hello world"]
$ rake generate
$ rake deploy
This will generate your blog, copy the generated files into _deploy/
, add them to git, commit and push them up to the master branch, see Deploying to Github Pages.
Don’t forget to commit the source for your blog.
$ git add .
$ git commit -am "Some comment here."
$ git push origin source # update the remote source branch
$ cd octopress
$ git pull origin source # update the local source branch
$ cd ./_deploy
$ git pull origin master # update the local master branch