ruby-debug

Is there any way to tell which gems and plugins are loaded at runtime for a Rails process?

二次信任 提交于 2019-12-18 10:35:51
问题 Is there any command either in debugger or ruby-debug to get a list of all gems and/or plugins loaded in memory for a Rails process? I understand only the ' require ' gems are loaded but I would like to quickly see what got loaded during runtime. 回答1: This should get you everything loaded through rubygems: Gem.loaded_specs.keys I don't know of a universal way to see which rails plugins are loaded, you can look at the source for Rails::Initializer (pre 3.0) & figure out what your version of

Thin with SSL support and ruby-debug

家住魔仙堡 提交于 2019-12-18 04:13:11
问题 Does anyone know of a way to run the ruby debugger and SSL at the same time with Thin? I've been using Thin successfully with Rails 3.0.10. I start it using rails server --debugger , and I can debug my code. Recently, I have also needed to add SSL support to my application, and I'd like to be able to test it locally with a self-signed certificate. Unfortunately, I have not found a way to start Thin with SSL support when using rails server . I can successfully start Thin with SSL support by

Ruby on Rails: debugging rake tasks

…衆ロ難τιáo~ 提交于 2019-12-17 23:06:17
问题 When I write debugger it does not start: NoMethodError: undefined method `run_init_script' for Debugger:Module from /usr/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:239:in `debugger' from (irb):4 If I run rake my:task --debugger ,it returns me to console immediately. How is it possible to debug rake tasks? 回答1: Andrey Kouznetsov's answer didn't work for me using Ruby 1.9.3. The ruby-debug gem doesn't seem to support Ruby 1.9. I had to use the debugger gem: https

Rails 3.1 and Ruby 1.9.3p125: ruby-debug19 still crashes with “Symbol not found: _ruby_threadptr_data_type” [duplicate]

佐手、 提交于 2019-12-17 07:37:42
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: ruby-debug with Ruby 1.9.3? I had heard rumors that ruby 1.9.3p125 has a solution for the ruby-debug19 problem, so per instructions on the RVM site, I reinstalled 1.9.3: $ rvm reinstall 1.9.3 --patch debug --force-autoconf $ ruby -v ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-darwin11.2.0] Then: gem install ruby-debug19 Added this entry to my Gemfile: gem 'ruby-debug19' Then: $ rails server -u => Booting

ruby-debug and cucumber

拈花ヽ惹草 提交于 2019-12-12 08:01:39
问题 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! 回答1: i had this same problem today, and i got it figured out. here's my

ruby-debug-base19-0.11.26 installation errror

自古美人都是妖i 提交于 2019-12-11 11:03:14
问题 I'm trying to get ruby-debug working with ruby 1.9.3 and rails on OSX Lion. I've been following http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug , but my problem is I can't get ruby-debug-base19-0.11.26.gem In my .Gemfile for sources i have source 'http://rubygems.org' source :rubyforge source 'http://gems.rubyforge.org' when I do gem install ruby-debug-base19-0.11.26.gem -- --with-ruby- include=/Users/minadoroudi/.rvm/rubies/ruby-1.9.3-p0/include=/Users/me/.rvm/rubies/ruby-1.9.3

Rails: Ruby debugger shows old code unless I stop the server and start it again

为君一笑 提交于 2019-12-10 19:08:47
问题 Using ruby-debug, when I issue a list command, it shows old code. So if I update the code surrounding (especially before) the debugger command in the model it still shows the old code. The only way I have found to 'refresh' this code is by stopping the server and running it again. Is there a better way? Thanks, Josh 回答1: Can't you just do a reload ? You can also set a flag for auto-reloading but never tried it myself (I tend to use Netbeans now) 来源: https://stackoverflow.com/questions/2449705

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

这一生的挚爱 提交于 2019-12-07 07:10:19
问题 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:

How to get awesome_print to work in pry/ruby-debug in running app

主宰稳场 提交于 2019-12-06 12:28:02
I super love awesome_print and ruby-debug but I can't get them to work together. AwesomePrint returns HTML for formatting but I'd it seems like ruby-debug and pry don't like multi-line output so I always end up with a complete mess. This is what it looks like when I run ap from pry or ruby-debug (in a running app). pry(#<#<Class:0x000001117f2f58>:0x000001117ef560>)> ap @user => "#<User:0x000001111de888> {\n<pre>:id</pre><pre> => </pre>\n ... snip ...}" Has anyone had any luck getting awesome_print to work in ruby-debug or pry on a running rails app? Am I just doing something wrong? I would

Installing ruby-debug19 locally

被刻印的时光 ゝ 提交于 2019-12-06 06:36:13
问题 I'm currently running Ruby 1.9.2p0 on a Windows XP 32-bit machine. Ever since we've upgraded to Ruby 1.9, I cannot get any form of debugging to work at all. I've been told that you need the new ruby-debug19 gem in order to get things running. Problem is, my company's proxy prevents the gem dependency manager from connecting external repositories. That's ok, I'll just download the gem myself and install it locally. The results: ERROR: Error installing ruby-debug19-0.11.6.gem: ERROR: Failed to