ruby-debug

Error: installing ruby-debug-ide

随声附和 提交于 2019-12-06 03:15:24
问题 The truth is that i am new to ruby on rails development. Not that i can not install the gem install ruby-debug-ide on aptana studio 3. gem install ruby-debug-ide Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing ruby-debug-ide: ERROR: Failed to build gem native extension. c:/Ruby193/bin/ruby.exe mkrf_conf.rb Building native extensions. This could take a while... Gem files will remain installed in c:/Ruby193/lib/ruby

How to debug a plugin / gem? (with useful notes to setup and use ruby-debug gem)

£可爱£侵袭症+ 提交于 2019-12-05 12:33:31
Is there a way like how we debug models / controllers with logger.debug? Or even a better method? Thank you! Edit 1 Using ruby-debug seems like a steep learning curve for me, could anyone point me something similar to logger.debug, perhaps? Edit 2 Alright, I think I started to get a grasp on ruby-debug. Some useful notes for newbies to setup & use ruby-debug: gem install ruby-debug in config/environments/development.rb add include 'ruby-debug' then just above the code you want to debug add: debugger if you need to debug third party plugin / gem, use include 'ruby-debug' debugger just use ruby

Installing ruby-debug-base19 on Windows in Ruby 1.9.3

佐手、 提交于 2019-12-05 04:44:09
I need to install ruby-debug-base19 in order to active debug on Netbeans IDE, when I execute: $ gem install ruby-debug-base19 I got the following error. Extracted from log generate C:/Ruby193/bin/ruby.exe extconf.rb checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... no C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config. checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... yes checking for iseq.h... yes checking for insns.inc... yes checking for

Aptana 3 and ruby debugging

天涯浪子 提交于 2019-12-05 03:40:14
问题 How I can set the watch on variable's in ruby. I am using Aptana as IDE. I am coming for .NET and am used to seeing the variable values just by hovering over the variable. In aptana 3 i cant find way through which i see current state and values of the variable. I seeing the self object there too much information and difficut to find the value of the variable i am looking for ? 回答1: This answer to a very similar question includes step-by-step instructions on getting ruby-debug-ide to work with

Rails view activerecord sql statements on debug console

戏子无情 提交于 2019-12-05 02:46:14
问题 I am using debugger gem in my Rails 3.2 application. How do I view the resulting SQL statement of active record method calls on the debug console? For eg: If I run Product.all on the debug console it prints out all the products. I would also like to see the "Select * from Products" as well. Is this possible? Edit Now that I am wiser(;p) active record also provides .to_sql method on the active record relation objects, to inspect the sql queries that they run against the underlying database.

Aptana 3 and ruby debugging

感情迁移 提交于 2019-12-03 20:06:43
How I can set the watch on variable's in ruby. I am using Aptana as IDE. I am coming for .NET and am used to seeing the variable values just by hovering over the variable. In aptana 3 i cant find way through which i see current state and values of the variable. I seeing the self object there too much information and difficut to find the value of the variable i am looking for ? Jordan Running This answer to a very similar question includes step-by-step instructions on getting ruby-debug-ide to work with Aptana 3. It's written from an OS X perspective but you should be able to apply it to your

ruby-debug with Pow — breakpoints never hit

时间秒杀一切 提交于 2019-12-03 13:02:21
I'm trying to use ruby-debug with Pow. Rails 3 app. I have done everything here: https://gist.github.com/1098830 I've restarted the server and machine several times. I can get rdebug to connect: → rdebug -c Connected. but it never stops at the breakpoints. Any idea what could be going on? I got it to hit a few breakpoints a few hours ago, and not since. controller def index debugger ... end Gemfile gem 'ruby-debug19', :require => 'ruby-debug' development.rb EG::Application.configure do ... require 'ruby-debug' Debugger.start_remote Debugger.settings[:autoeval] = true puts "=> Debugger enabled"

ruby-debug and cucumber

烂漫一生 提交于 2019-12-03 12:56:55
I have a failing scenario in cucumber, and I'd like to debug my rails controller using ruby-debug. But if I add 'debugger' to the point where I want to break, it doesn't stop. I tried adding require of ruby-debug and rubygems to the features/support/env.rb but then it says to me that it can't load ruby-debug, although ruby-debug is on the gem list and I can load it in irb. So... what should I do to get it working? Thanks! i had this same problem today, and i got it figured out. here's my blog post explaining the two different ways I got it working: http://lostechies.com/derickbailey/2011/06/29

Start ruby debugger if rspec test fails

三世轮回 提交于 2019-12-03 11:14:46
问题 Often, when a test fails, I spend quite sometime trying to figure out the what caused it to fail. It'd be useful if RSpec could kick off a Ruby debugger when the test fails, so that I can inspect the local variables immediately to drill down on the cause. The work-around I'm using right now looks something like this: # withing some test debugger unless some_variable.nil? expect(some_variable).to be_nil However, this approach is cumbersome, because I first wait for a test to fail, then add the

Ruby Debug “no such file to load --spec_helper”

夙愿已清 提交于 2019-12-03 10:35:22
Noob who may be missing something obvious ... I'm trying to debug an Rspec file. The Rspec file is stripped down at this point: require 'spec_helper' describe PagesController do render_views describe "GET 'home'" do describe "when not signed in" do before(:each) do get :home end it "should be successful" do response.should be_success end it "should have a vendor section" do response.should have_selector("h1", :content => "Vendor") end it "should have a hospital section" do response.should have_selector("h1", :content => "Hospital") end end end I make the following call from the command line: