Yosemite Nokogiri install: libxml2 version 2.6.21 or later is required!

1910798
Standard

Upgrade to Yosemite lately, but it broke couple ruby nokogiri gem when i need to install it. it show error says below

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/endy/.rbenv/versions/1.9.3-p194/bin/ruby -r ./siteconf20150303-5535-61o6gc.rb extconf.rb

then how to resolve this ?, override system library using brew version. Run this command on terminal

brew install libxml2
ls -l /usr/local/opt/libxml*
lrwxr-xr-x  1 endy  admin  23 Nov 28 03:55 /usr/local/opt/libxml2 -> ../Cellar/libxml2/2.9.2
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
gem install nokogiri
Building native extensions.  This could take a while...
Successfully installed nokogiri-1.6.6.2
Parsing documentation for nokogiri-1.6.6.2
Installing ri documentation for nokogiri-1.6.6.2
Done installing documentation for nokogiri after 4 seconds
1 gem installed
endy $ gem list nokogiri

*** LOCAL GEMS ***

nokogiri (1.6.6.2, 1.6.5, 1.6.3.1)

semoga bermanfaat

Yang baru di 2015

Image

Apa yang baru dengan dengan datangnya 2015  ?  Personal blog dengan fresh content yang bener-bener baru. Good news ? Not really :(. Setelah lama ndak update blog, ternyata DB MySQL  di VPS DO tempat nongkrong ne blog ambyar. And ndilalah enable backupnya off. Untungnya server buat blog pribadi aja, so sekalian ganti pake Centos 7

Centos on DO

dan 15 menit kemudian

[endy@ubet2 ~]$ cat /etc/redhat-release

CentOS Linux release 7.0.1406 (Core)

[endy@ubet2 ~]$ uname -a

Linux ubet2 3.10.0-123.8.1.el7.x86_64 #1 SMP Mon Sep 22 19:06:58 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

[endy@ubet2 ~]$ df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/vda1        20G  4.0G   15G  22% /

devtmpfs        240M     0  240M   0% /dev

tmpfs           246M     0  246M   0% /dev/shm

tmpfs           246M   29M  217M  12% /run

tmpfs           246M     0  246M   0% /sys/fs/cgroup

cloudfuse       8.0T     0  8.0T   0% /home/endy/cloudfiles

[endy@ubet2 ~]$

install dropletnya gak sampe 5 menit, selebihnya yum install blah blah blah

Mengenal lebih dekat MySQL Query

Standard

Here’s my situation there’s a form to query all instructor list based some criteria :
– class periode – program
– category
– class name
– Include Instructors not assigned to any classes

final result must have this format (name, home phone, email) what schema do we have ?
instructor has one address (instructor_addresses)
instructor has many contact (instructor_contact_infos)
instructor has many class (catalog_class_instructor)

class table = catalog_classes class has one periode (periode_id)
class has (program, category) join on table catalog_class_program_category

how i m gonna accomplish this using single query send from PHP ? after an hour or so here’s the final query

optimasi mysql query

0.08 second on my mac for 2k records? not bad

green commentd line : dynamicaly insert / remove before send to mysql

Open Source License, what freedom do you have ?

open_source_license
Standard
  • GPL people can take your code, modify it and must make modifications available under GPL to whomever they give it (good for applications)
  • LGPL same as GPL except they can dynamically link to your program and not give away sources of their program that does it (good for libraries)
  • MIT/BSD people can take your code, do whatever they want with it and only have to keep in the lines that say you wrote the original code
  • MPL people can take your code, modify it, but if they distribute the modifications, they need to make sure modifications are publicly available for 3 years.
  • Apache people can take your code, modify it, distribute under some other compatible license, but need to say in the program’s documentation that your code has been used