ブラウザタイプのクローラーに必要だった為gemのPoltergeistをインストールしました。
CentOSへのインストール
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
[user@localhost crawler]$ gem install poltergeist Fetching: mime-types-data-3.2016.0521.gem (100%) Successfully installed mime-types-data-3.2016.0521 Fetching: mime-types-3.1.gem (100%) Successfully installed mime-types-3.1 Fetching: rack-2.0.1.gem (100%) Successfully installed rack-2.0.1 Fetching: rack-test-0.6.3.gem (100%) Successfully installed rack-test-0.6.3 Fetching: xpath-2.0.0.gem (100%) Successfully installed xpath-2.0.0 Fetching: public_suffix-2.0.4.gem (100%) Successfully installed public_suffix-2.0.4 Fetching: addressable-2.5.0.gem (100%) Successfully installed addressable-2.5.0 Fetching: capybara-2.11.0.gem (100%) Successfully installed capybara-2.11.0 Fetching: websocket-extensions-0.1.2.gem (100%) Successfully installed websocket-extensions-0.1.2 Fetching: websocket-driver-0.6.4.gem (100%) Building native extensions. This could take a while... Successfully installed websocket-driver-0.6.4 Fetching: cliver-0.3.2.gem (100%) Successfully installed cliver-0.3.2 Fetching: poltergeist-1.12.0.gem (100%) Successfully installed poltergeist-1.12.0 Parsing documentation for mime-types-data-3.2016.0521 Installing ri documentation for mime-types-data-3.2016.0521 Parsing documentation for mime-types-3.1 Installing ri documentation for mime-types-3.1 Parsing documentation for rack-2.0.1 Installing ri documentation for rack-2.0.1 Parsing documentation for rack-test-0.6.3 Installing ri documentation for rack-test-0.6.3 Parsing documentation for xpath-2.0.0 Installing ri documentation for xpath-2.0.0 Parsing documentation for public_suffix-2.0.4 Installing ri documentation for public_suffix-2.0.4 Parsing documentation for addressable-2.5.0 Installing ri documentation for addressable-2.5.0 Parsing documentation for capybara-2.11.0 Installing ri documentation for capybara-2.11.0 Parsing documentation for websocket-extensions-0.1.2 Installing ri documentation for websocket-extensions-0.1.2 Parsing documentation for websocket-driver-0.6.4 Installing ri documentation for websocket-driver-0.6.4 Parsing documentation for cliver-0.3.2 Installing ri documentation for cliver-0.3.2 Parsing documentation for poltergeist-1.12.0 Installing ri documentation for poltergeist-1.12.0 Done installing documentation for mime-types-data, mime-types, rack, rack-test, xpath, public_suffix, addressable, capybara, websocket-extensions, websocket-driver, cliver, poltergeist after 7 seconds 12 gems installed |
特に問題なくインストール出来ました。
以下作業時に使用しています。
データベース系サイト用にデータ収集クローラーを開発してみることにしました。その記録をこちらに記載していきます。
この記事は随時追記して...
Windowsへのインストール
よくよく考えたらWindowsのブラウザを使うのでWindowsへのインストールが必要でした。
DEVKITをインストールする。
http://rubyinstaller.org/downloads
gem installしてみる。
1 2 3 4 5 6 7 |
C:\Users\test\works\sakura\src\crawler\capybara>gem install poltergeist ERROR: Error installing poltergeist: The 'websocket-driver' native gem requires installed build tools. Please update your PATH to include build tools or download the DevKit from 'http://rubyinstaller.org/downloads' and follow the instructions at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit' |
エラーになりました!
ビルドツールが必要との事なので、以下のDevKitをインストールしました。
WindowsへRubyをインストールする。
WindowsへのRubyインストールとDevKitインストール
Download...
これでインストール再実行で出来ました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
C:\Users\test\works\sakura\src\crawler\capybara>gem install poltergeist Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... Successfully installed websocket-driver-0.6.5 Fetching: cliver-0.3.2.gem (100%) Successfully installed cliver-0.3.2 Fetching: poltergeist-1.13.0.gem (100%) Successfully installed poltergeist-1.13.0 Parsing documentation for websocket-driver-0.6.5 Installing ri documentation for websocket-driver-0.6.5 Parsing documentation for cliver-0.3.2 Installing ri documentation for cliver-0.3.2 Parsing documentation for poltergeist-1.13.0 Installing ri documentation for poltergeist-1.13.0 Done installing documentation for websocket-driver, cliver, poltergeist after 1 seconds 3 gems installed |