I tried to build Ruby 1.9.3-p125 on Mac OS X Lion(10.7.3). But it can’t build psych library in ruby because missing yaml.h.
I just type below.
$ brew install libyaml
It solved
I tried to build Ruby 1.9.3-p125 on Mac OS X Lion(10.7.3). But it can’t build psych library in ruby because missing yaml.h.
I just type below.
$ brew install libyaml
It solved
Ruby is a good language. But little bit unuseful for japanese user include me.
I’ve got often invalid seqence error.
CSV.open(filename, 'r:cp932')
This code is bad.
I found a code in csv.rb below:
@encoding ||= Encoding.default_internal || Encoding.default_external
This line from /usr/local/ruby-1.9.1/lib/ruby/1.9.1/csv.rb.
I tried use only “Encoding.default_external = ‘cp932′”.
Encoding.default_external = 'cp932' CSV.open(filename, 'r')
It works.
Now I’m in Japan. I had bought and setuped MacBook Pro 15″ in this new year holiday.
I am NOT Mac fan and Jobs believer. I just love UNIX envronments. Actually MacBook is good UNIX laptop.
But I got little trouble after I migrate from old MacBook white by Migration Assistant.
I just wrote and ran a ruby script as usual. I got error “nokogiri not found”. OMG!!
The Ruby 1.9.2 was compiled by me. Migration Assistant migrate compled ruby itself but don’t migrate libraries. sigh…
Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.
Here are some suggestions for your first post.