How can I programatically call the ruby debugger from within a ruby program in Ruby 1.9?

I am writing a web based debugger for Ruby, but in order to do this I need to be able to call the Ruby debugger from within a Ruby program on the server side. Has this ever been done? Is this even possible?

The end product being built will allow Ruby code to be edited, executed and stepped through using just a web browser. The ruby code that is to be debugged will be "eval"ed on the server side.

I have since been pointed in the right direction by one of the stackoverflow users who has suggested using popen or expect. I have tried both of these now but have encountered the following problems:

popen: When waiting for the console yo

View Replies

Related to : How can I programatically call the ruby debugger from within a ruby program in Ruby 1.9?

Ruby Iconv works with irb and ruby debugger but not in a unit test
Category : Programming Languages

I'm running Ruby 1.8.7 with Rails 2.3.5 on Ubuntu 10.04 64-bit. I've written a method that should take a string like this, "École À la Découverte" and output a file-system name like this "ecole_a_la_decouverte":

('US-ASCII//TRANSLIT', 'utf-8').iconv "École À la Découv

View Replies

hubris fails to install with: Missing C libraries: ruby, ruby, ruby
Category : Programming Languages

I am desperately trying to install Hubris but the installation fails whenever I run "cabal install".

Link to Hurbis:

Link to the Cabal file:

View Replies

“which in ruby”: Checking if program exists in $PATH from ruby
Category : Operating Systems

my scripts rely heavily on external programs and scripts.
I need to be sure that a program I need to call exists.
Manually, I'd check this using 'which' in the commandline.

Is there an equivalent to File.exists? for things in $PATH?


View Replies

Ruby 1.9.3-p140 - Maximum number of threads in a Ruby program?
Category : Programming Languages
I'm playing with Thread and I discovered that I cannot run 10000 threads.It gives me the following error: threading.rb:23:in `initialize': can't create Thread (35) (ThreadError) from threading.rb:23:in `new' from threading.rb:23:in `block in <main>' from threading.r

View Replies

Ruby: Generate/modify Ruby source files from within Ruby
Category : Programming Languages

What is the most reliable way to generate and/or parse and modify a Ruby source file from within ruby?

That is, I want to e.g. create a new ruby source file or change a few lines of code in a class in a source file to e.g. add or remove methods or calls or whatever.

Is the

View Replies

Error installing ruby-debug/ruby-debug-base with Ruby Enterprise v1.8.7
Category : Operating Systems

I got problems when trying to install gem ruby-debug-ide. Then, I try to install gem ruby-debug-base first. However, I got an error:

Error installing ruby-debug-base:
rb-threadframe requires Ruby version ~> 1.9.2frame.

The same error occured when instal

View Replies

Ruby program method call doesn't appear to be working
Category : Programming Languages

I am writing a program using Ruby on Rails to allow users to manage University courses, their modules, and the students enrolled on them.
Currently, I have two classes: Application.rb and CourseModules.rb:
Application.rb is the class that I am using to interface with the user- i

View Replies

Computationally Intensive Ruby Calc for Rails App - Extract to Pure Ruby & Filesystem?
Category : Programming Languages

Good afternoon,

I am developing a Rails application where I can vastly speed up the site by doing a bunch of pre-calculations and storing the results to the database, rather than performing the calculation when requested by the user.

(Note that I am talking about million

View Replies

How do I embed ruby.rb file via form in a way that ruby.rb would be executed and results visible in view
Category : Programming Languages

let's say I want to embed this code via form in a separate ruby.rb file:

print "Hello, Please enter a value:"
var = gets.to_i
if var == 10
puts "Correct"
puts "Your answer is incorrect"

After the submit b

View Replies

is that a ruby on rails strange behaviour with overwrite params? Or do I just dont aderstand ruby, again?
Category : Programming Languages
pre annotation: I have a solution, I want to understand what happens here, and if this behaviour is intendedFollowing functioning little controller function, not very intersting, I know class SvgTestController < SiteController def get_the_page require "base64"

View Replies

2012 / 2017 Copyrights BigHow , All Rights Reserved .