2007-11-16 ruby on 高速道路
時間かけないと覚えないよね、やっぱり。
mechanizeインストール
ruby |
:~$ sudo gem install mechanize
Bulk updating Gem source index for: http://gems.rubyforge.org
Install required dependency hpricot? [Yn] Y
Select which gem to install for your platform (i486-linux)
1. hpricot 0.6 (mswin32)
2. hpricot 0.6 (java)
3. hpricot 0.6 (ruby)
4. hpricot 0.5 (ruby)
5. hpricot 0.5 (mswin32)
7. Cancel installation
> 3
Building native extensions. This could take a while...
Install required dependency hoe? [Yn] Y
Install required dependency rubyforge? [Yn] Y
Successfully installed mechanize-0.6.10
Successfully installed hpricot-0.6
Successfully installed hoe-1.3.0
Successfully installed rubyforge-0.4.4
Installing ri documentation for mechanize-0.6.10...
Installing ri documentation for hpricot-0.6...
Installing ri documentation for hoe-1.3.0...
Installing ri documentation for rubyforge-0.4.4...
Installing RDoc documentation for mechanize-0.6.10...
Installing RDoc documentation for hpricot-0.6...
Installing RDoc documentation for hoe-1.3.0...
Installing RDoc documentation for rubyforge-0.4.4...
となったんだけど、
:~$ irb
irb(main):001:0> require 'mechanize'
LoadError: no such file to load -- mechanize
from (irb):1:in `require'
from (irb):1
from :0
となる。なんでだろう。apt-get で入れ直してみようか。
=>結局apt-get でlibwww-mechanize-ruby
なるパッケージを見つけて入れたら動きました。
いいかげんgemの設定をちゃんとやりたいと思いました、まる