There are already guide out there to get Jekyll installed on Windows machine. I have problem to start it after installation though, a long list of errors follow, D:\ruby_projects\olla\jekyll serve Configuration file: D:/ruby_projects/olla/_config.yml Source: D:/ruby_projects/olla Destination: D:/ruby_projects/olla/_site Generating… Liquid Exception: cannot load such file — yajl/2.0/yajl in _posts/2013-10-22-welcome-to-jekyll.markdownD:\ruby_projects\olla\jekyll serve Configuration file: D:/ruby_projects/olla/_config.yml Source: D:/ruby_projects/olla Destination: […]
Following railstutorial again, to strengthen my rails basic and pick up new shiny things in rails 4. Getting sublime to run test directly is quite awesome, I mean you just need to highlight part of the test you wish to run, cmd + shift + R, boom you got your test result, all without needing […]
This irb tip is from Natasha the Robot. Often we forgot to assign an expression to a variable, you could of course use up arrow to retrieve last command and then move all the way to the front, add a variable and equal sign to it, but that is a lot of troubles. An easy […]
I keep bump into this problem, where I pick up some basic long ago, after a while, get too used to it and forgot the reason why something is done in a particular way. If I have written about it, then I have a better understanding and longer memory. Like the collection_select method which I […]
Requiring a file sitting in the same directory wouldn’t work with this require ‘something’require ‘something’ Seems like Ruby 1.9 remove current directory from load path as I read from Stackoverflow To make it work you could require ‘./something’require ‘./something’ or use require_relative, require_relative ‘something’require_relative ‘something’ The thing is, load ‘something.rb’load ‘something.rb’ still work. So does […]
When you have a hammer, you see everything as nails. A very true message from Dive into Python 3, Regular expressions are extremely powerful, but they are not the correct solution for every problem. You should learn enough about them to know when they are appropriate, when they will solve your problems, and when they […]
This should taste good.
Finally. Thank you master.
Understanding sorting algorithm by just reading text or still illustration takes a lot of mind gymnastic. Apparently, there are lot of videos online, trying to explain the concept. But not all explain it as good though, some with really boring animation, some with crappy background music, and some even both . Here are two that […]
It is a bit difficult for me to understand the difference between map and each, until I found out this in irb accidentally, irb(main):001:0> name = %w{guido knuth adrian dhh pg} => ["guido", "knuth", "adrian", "dhh", "pg"] irb(main):002:0> name.each {|n| n.upcase} => ["guido", "knuth", "adrian", "dhh", "pg"] irb(main):003:0> name.map {|n| n.upcase} => ["GUIDO", "KNUTH", "ADRIAN", […]