{"_id":"54b8f06d5d85c00c00e035cd","link_url":"","user":"54345d430e8e2b0e003416cd","__v":2,"githubsync":"","hidden":false,"order":0,"type":"basic","link_external":false,"project":"54345d5e0e8e2b0e003416d5","slug":"getting-started","sync_unique":"","title":"Getting Started with Rbkit","version":"54b8f06c5d85c00c00e035cb","api":{"auth":"never","params":[],"results":{"codes":[]},"url":""},"body":"Installing and using Rbkit is really simple, follow instructions below to get started.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installing Rbkit Desktop app\"\n}\n[/block]\nRbkit desktop app is released as pre-built executables for the Linux and Mac OSX platforms.\n\nYou can visit [Downloads](http://rbkit.codemancers.com/v0.1.10/page/downloads) page to download Rbkit desktop applications.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installing Rbkit library\"\n}\n[/block]\n##1. Rbkit Install prerequisites\n\nSince Rbkit is a C extension it requires a C compiler and following tools:\n\n* libtool\n* autoconf\n* automake\n\nInstalling `build-essential` package on Ubuntu should install these tools and on OSX you can use `homebrew` to install them.\n\n\n##2. Installing via Rubygems or Bundler\n\nYou can start by installing `rbkit` gem via:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"gem install rbkit\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\nYou can also add it to your `Gemfile` such as:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"gem 'rbkit'\",\n      \"language\": \"ruby\"\n    }\n  ]\n}\n[/block]\n## 3. Installation without Rubygems\n\nYou can also install `rbkit` without Rubygems. This can be useful, if you are profiling a Ruby app where you want to measure overhead of Rubygems/Bundler.\n\nYou can download latest version of `rbkit` library from [Downloads Page](http://rbkit.codemancers.com/v0.1.10/page/downloads)\n```\n# Run from root of rbkit directory.\n~> ruby setup.rb\n```\n\nThis should install `rbkit` in ruby's `site_dir` and then you don't need `rbkit` added to your Gemfile for requiring rbkit.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Using Rbkit\"\n}\n[/block]\n## Start Rbkit server\n\nWherever you want to start profiling, add the following to your code:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"require 'rbkit'\\nRbkit.start_profiling\\n\",\n      \"language\": \"ruby\",\n      \"name\": null\n    }\n  ]\n}\n[/block]\nIf using Rails, and you want to measure everything from the boot process, a good place to put this would be `config/boot.rb`.\n\nNow run your Ruby process (or Rails server if you are profiling a Rails app).\n\n## Start Rbkit Desktop app\n\n1. Start the Rbkit desktop application.\n2. Click `Connect` on the toolbar and follow instructions.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/rkWdsiNeRQCcNyYLef4y_connect.png\",\n        \"connect.png\",\n        \"434\",\n        \"67\",\n        \"#187645\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/Y9XEfPDSahrEhz2X4XgA_ip.png\",\n        \"ip.png\",\n        \"396\",\n        \"216\",\n        \"#274d7b\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"What are 5555 and 5556 ?\",\n  \"body\": \"These are the default ports which Rbkit uses to communicate between the server and client. If you are trying to connect the client to a server running on the cloud and it's not able to, check if the server is behind a firewall that blocks communications through these ports.\"\n}\n[/block]","category":"54b8f06d5d85c00c00e035cc","createdAt":"2014-10-07T21:38:38.341Z","excerpt":"This page will help you get started with Rbkit. You'll be up and running in a jiffy!","updates":[],"childrenPages":[]}

Getting Started with Rbkit

This page will help you get started with Rbkit. You'll be up and running in a jiffy!

Installing and using Rbkit is really simple, follow instructions below to get started. [block:api-header] { "type": "basic", "title": "Installing Rbkit Desktop app" } [/block] Rbkit desktop app is released as pre-built executables for the Linux and Mac OSX platforms. You can visit [Downloads](http://rbkit.codemancers.com/v0.1.10/page/downloads) page to download Rbkit desktop applications. [block:api-header] { "type": "basic", "title": "Installing Rbkit library" } [/block] ##1. Rbkit Install prerequisites Since Rbkit is a C extension it requires a C compiler and following tools: * libtool * autoconf * automake Installing `build-essential` package on Ubuntu should install these tools and on OSX you can use `homebrew` to install them. ##2. Installing via Rubygems or Bundler You can start by installing `rbkit` gem via: [block:code] { "codes": [ { "code": "gem install rbkit", "language": "ruby" } ] } [/block] You can also add it to your `Gemfile` such as: [block:code] { "codes": [ { "code": "gem 'rbkit'", "language": "ruby" } ] } [/block] ## 3. Installation without Rubygems You can also install `rbkit` without Rubygems. This can be useful, if you are profiling a Ruby app where you want to measure overhead of Rubygems/Bundler. You can download latest version of `rbkit` library from [Downloads Page](http://rbkit.codemancers.com/v0.1.10/page/downloads) ``` # Run from root of rbkit directory. ~> ruby setup.rb ``` This should install `rbkit` in ruby's `site_dir` and then you don't need `rbkit` added to your Gemfile for requiring rbkit. [block:api-header] { "type": "basic", "title": "Using Rbkit" } [/block] ## Start Rbkit server Wherever you want to start profiling, add the following to your code: [block:code] { "codes": [ { "code": "require 'rbkit'\nRbkit.start_profiling\n", "language": "ruby", "name": null } ] } [/block] If using Rails, and you want to measure everything from the boot process, a good place to put this would be `config/boot.rb`. Now run your Ruby process (or Rails server if you are profiling a Rails app). ## Start Rbkit Desktop app 1. Start the Rbkit desktop application. 2. Click `Connect` on the toolbar and follow instructions. [block:image] { "images": [ { "image": [ "https://files.readme.io/rkWdsiNeRQCcNyYLef4y_connect.png", "connect.png", "434", "67", "#187645", "" ] } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/Y9XEfPDSahrEhz2X4XgA_ip.png", "ip.png", "396", "216", "#274d7b", "" ] } ] } [/block] [block:callout] { "type": "info", "title": "What are 5555 and 5556 ?", "body": "These are the default ports which Rbkit uses to communicate between the server and client. If you are trying to connect the client to a server running on the cloud and it's not able to, check if the server is behind a firewall that blocks communications through these ports." } [/block]