Install Ruby and CopperEgg export_tools on windows

Steps to Install Ruby and CopperEgg export_tools on Windows 

Tested to work with :: Windows 8 64-bit, Windows 7 32-bit

The CopperEgg export tools allow you to export CopperEgg metric data into CSV files without having to write something to use our API yourself. The github repo (https://github.com/CopperEgg/export_tools) has instructions that work fine on Linux but if you are in Windows it takes a little more doing to get Ruby installed. Here's a walkthrough of how to get it all installed and working on Windows.

INSTALL RUBY

  • From this website download these 2 files , suitable to your Windows version, 32-bit or 64bit.

http://rubyinstaller.org/downloads/

    1. RubyInstaller for Windows
    2. RubyDevelopment Kit
  • Install RubyInstaller as usual. Enable Ruby to be in PATH settings.

For this document it is assumed that ruby has been installed in c:\Ruby200. So, the PATH setting will be like

PATH=c:\Ruby200\bin

Note :- Do not rename the directories after installation as in Ruby the name is hard-coded.

  • Extract Ruby Development Kit in same folder. c:\Ruby200\

For this document it is assumed that Ruby Development Kit has been extracted in c:\Ruby200\

Open a command shell, cmd.exe

 cd c:\Ruby200
ruby dk.rb init
ruby dk.rb install
c:\Ruby200\devkitvars.bat


Check the generated config.yml file. It should contain the entry c:\Ruby200 , where ruby developmentkit is
installed.

  • Download the Curl libaries suitable for your installation.

Run the Wizard to select the curl installation suitable to your environment using

Note :- It is important that you download the libcurl package suggested by Wizard below. Improper package of libcurl can cause errors 

https://curl.haxx.se/dlwiz/      ==>       Select  libcurl

(For example in my case for Windows 8 64-bit and Windows 7 32-bit, the package was :-

http://curl.haxx.se/gknw.net/7.34.0/dist-w32/curl-7.34.0-devel-mingw32.zip )

  • Extact curl .zip archive in
c:\Ruby200\curl-7.34.0-devel-mingw32 

For this document it is assumed that curl archive is extracted in c:\Ruby200\curl-7.34.0-devel-mingw32 


Add above directory's bin to PATH settings, like

PATH = c:\Ruby200\bin;c:\Ruby200\curl-7.34.0-devel-mingw32\bin\

 

  • Open a new command prompt, and test
gem install json_pure --platform=ruby

It should work, with internet connection on.

 

INSTALL COPPEREGG export_tools

 

Download the latest release as ZIP archive from the Tab on the right side.(otherwise, you may use git method)


In this document I assume they are extracted in into c:\export_tools

cd c:\export_tools
gem install bundler
bundle

Now the export_tools are installed and you can use them.

Example

ruby sysinfo_csvexport.rb APIKEY
Powered by Zendesk