Nokogiri gem version 1.6.x has been a bit problematic in Linux, since by default it just fails to install. And only workaround for it has been to use 1.5.x version instead. Now recently I hit the trouble, since another gem required at least version 1.6 of nokogiri, so I didn’t any longer have option to avoid resolving the issue.
After a bit of googling fix was easy. Just need to explicitly state for nokogiri to use system libraries.
And in bash