Giter Site home page Giter Site logo

rookout / tutorial-ruby Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 3.0 1.06 MB

Rookout official tutorial for using Ruby

License: Apache License 2.0

Ruby 51.19% JavaScript 8.84% CoffeeScript 0.39% CSS 15.18% SCSS 0.32% HTML 20.14% Dockerfile 3.00% Makefile 0.94%

tutorial-ruby's Introduction

Rookout tutorial for debugging Ruby applictions

A sample app for debugging Ruby using Rookout.

Prerequisites

  1. ruby 2.7
  2. rails 6.0.0 or later

Setup

  1. Clone the sample app from this repository.
git clone https://github.com/Rookout/tutorial-ruby.git
cd tutorial-ruby
  1. Set your Rookout token as an environment variable (for Windows, use set instead of export)
export ROOKOUT_TOKEN=[Your Rookout Token]
  1. Run the app:
bundle install
rails server

the app will now run on https://localhost:3000/

  • Optional - Run the app using Docker:
docker run -p 3000:3000 -e ROOKOUT_TOKEN=$ROOKOUT_TOKEN rookout/tutorial-ruby

Usage

  • Log in to the Rookout IDE
  • Set up your debug session by selecting the Ruby app you started. See Debug session setup for more information
  • Add the source code according to the following instructions. In this case, use the local filesystem option to associate the code in your local 'tutorial-ruby' folder.
  • Open the file app/controllers/tasks_controller.rb
  • Add a Breakpoint next to line number 35 by clicking next the the line number in the file viewer
  • The Breakpoint should turn solid purple, indicating that it has been set successfully and that it is active.
    • If this is not the case, click here to see how to fix that
  • Go the the app webpage http://localhost:3000/ and add a todo in order to trigger the Breakpoint
  • Check the bottom pane Messages and you'll see the snapshot you just added, as it was triggered by the handler of the web api when you added a todo

Common Pitfalls

  • Breakpoint status is pending (hollow with purple outline) -- Connection to the app was not able to be established. Make sure that you inserted the Rookout Token in the right place and that the SDK was properly installed.
  • Breakpoing status is disabled (solid grey) -- The breakpoint was disabled from collecting more data due to the limits being hit.
  • Brekapoint error -- something went wrong. Check the breakpoint status to get more information on the error type, and for more information go to our breakpoint status guide.

Want to learn more ?

tutorial-ruby's People

Contributors

alexeygutkin avatar dudirookout avatar elduderinos avatar elinorswery avatar gilwe avatar gosharo avatar hopemanryan avatar lirook avatar niryarden avatar sonariorobot avatar urook avatar

Watchers

 avatar  avatar

Forkers

elinorswery cyeet

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.