ActionView::Template::Error (undefined method `run_init_script' for Debugger:Module)

Haven't tried debugging through RubyMine in some time ... wanted to do it again today and its not working for me.

Here's what's in my Gemfile:

  # ruby debugger

  gem 'ruby-debug19', :require => 'ruby_debug'
  gem 'ruby-debug-base19'
  gem 'ruby-debug-base19x'
  gem 'ruby-debug-ide19', '~> 0.4.12'

9 comments
Comment actions Permalink

Chris, you may remove all lines related to debugger from your gemfile, it should work after that

0
Comment actions Permalink

Thanks.

I tried commenting all debug lines in Gemfile.  I then started a debug session from RubyMine.  I got the same run_init_script error.

Then I went to iTerm at the project root (same Gemset).  I gem uninstalled each gem with gem uninstall.

I started another debug session with RubyMine and was prompted to install a gem (ruby-debug-base I think?) and I agreed.  However, installing that failed with:

Error running Development: foo: Failed to install gems. Following gems were not installed: /Applications/RubyMine 3.2.3.app/rb/gems/ruby-debug-base19x-0.11.28.gem: Error installing ruby-debug-base19x-0.11.28.gem: ERROR: Failed to build gem native extension. /Users/chris/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... no checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/chris/.rvm/rubies/ruby-1.9.2-head/bin/ruby --with-ruby-dir --without-ruby-dir --with-ruby-include --without-ruby-include=${ruby-dir}/include --with-ruby-lib --without-ruby-lib=${ruby-dir}/lib /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:268:in `block (2 levels) in read': Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p274.tar.gz and all I got was a 404! (URI::NotFoundError) from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1194:in `block in transport_request' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:2342:in `reading_body' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1193:in `transport_request' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1177:in `request' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1170:in `block in request' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:627:in `start' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/net/http.rb:1168:in `request' from /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read' from /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect' from /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read' from /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download' from /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core' from /Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/tempfile.rb:320:in `open' from /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core' from extconf.rb:16:in ` ' Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p274.tar.gz Gem files will remain installed in /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby-debug-base19x-0.11.28 for inspection. Results logged to /Users/chris/.rvm/gems/ruby-1.9.2-head@foo/gems/ruby-debug-base19x-0.11.28/ext/ruby_debug/gem_make.out

0
Comment actions Permalink

Chris, it seems that ruby_core_sources gem is not able to get sources for your ruby version (which is rvm 1.9.2 head). I'll try to make some workaround for building on rvm-based sdk's on ruby-debug-base19x side

0
Comment actions Permalink

Chris, I've pushed fixed version to rubygems. Please try gem install ruby-debug-base19x --pre and see if it works for you

0
Comment actions Permalink

Hi - here's my results:

NoMethodError in CoursesController#new

undefined method `run_init_script' for Debugger:Module
Rails.root: /Users/chris/Orion/bar/projects/foo

Application Trace | Framework Trace | Full Trace
/gems/ruby-debug-base19x-0.11.30.pre/lib/ruby-debug-base.rb:241:in `debugger'
app/controllers/courses_controller.rb:16:in `new'
/gems/actionpack-3.0.7/lib/action_controller/metal/implicit_render.rb:5:in `send_action'
/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:150:in `process_action'
/gems/actionpack-3.0.7/lib/action_controller/metal/rendering.rb:11:in `process_action'
/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:451:in `_run__225116522137373807__process_action__2479267789116812015__callbacks'
/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:94:in `run_callbacks'
/gems/actionpack-3.0.7/lib/abstract_controller/callbacks.rb:17:in `process_action'
/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `block in instrument'
/gems/activesupport-3.0.7/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/gems/activesupport-3.0.7/lib/active_support/notifications.rb:52:in `instrument'
/gems/actionpack-3.0.7/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/gems/actionpack-3.0.7/lib/action_controller/metal/rescue.rb:17:in `process_action'
/gems/actionpack-3.0.7/lib/abstract_controller/base.rb:119:in `process'
/gems/actionpack-3.0.7/lib/abstract_controller/rendering.rb:41:in `process'
/gems/actionpack-3.0.7/lib/action_controller/metal.rb:138:in `dispatch'
/gems/actionpack-3.0.7/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/gems/actionpack-3.0.7/lib/action_controller/metal.rb:178:in `block in action'
/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:27:in `call'
/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `block in call'
/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `block in recognize'
/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:68:in `optimized_each'
/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize'
/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/routing/route_set.rb:493:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/head.rb:14:in `call'
/gems/rack-1.2.3/lib/rack/methodoverride.rb:24:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/flash.rb:182:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/cookies.rb:302:in `call'
/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:32:in `block in call'
/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:12:in `cache'
/gems/activerecord-3.0.7/lib/active_record/query_cache.rb:31:in `call'
/gems/activerecord-3.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:46:in `block in call'
/gems/activesupport-3.0.7/lib/active_support/callbacks.rb:421:in `_run_call_callbacks'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/gems/rack-1.2.3/lib/rack/sendfile.rb:107:in `call'
/gems/rack-1.2.3/lib/rack/static.rb:33:in `call'
/gems/sass-3.1.7/lib/sass/plugin/rack.rb:54:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/gems/railties-3.0.7/lib/rails/rack/logger.rb:13:in `call'
/gems/rack-1.2.3/lib/rack/runtime.rb:17:in `call'
/gems/activesupport-3.0.7/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/gems/rack-1.2.3/lib/rack/lock.rb:11:in `block in call'
:10:in `synchronize'
/gems/rack-1.2.3/lib/rack/lock.rb:11:in `call'
/gems/actionpack-3.0.7/lib/action_dispatch/middleware/static.rb:30:in `call'
/gems/railties-3.0.7/lib/rails/application.rb:168:in `call'
/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/gems/railties-3.0.7/lib/rails/rack/log_tailer.rb:14:in `call'
/gems/rack-1.2.3/lib/rack/content_length.rb:13:in `call'
/gems/rack-1.2.3/lib/rack/handler/webrick.rb:52:in `service'
/Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/webrick/httpserver.rb:111:in `service'
/Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/webrick/httpserver.rb:70:in `run'
/Users/chris/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/webrick/server.rb:183:in `block in start_thread'
Request

Parameters:

None
Show session dump

Show env dump

Response

Headers:

None

0
Comment actions Permalink

Does your courses controller initializer contain 'debugger' call?

0
Comment actions Permalink

Its within an action definition, i.e.:

class CoursesController < ApplicationController

  def new

    debugger

  end

end

0
Comment actions Permalink

I'd suggest to comment it out, it has no effect on ide debugger (except crashing it)

0
Comment actions Permalink

I had it in my head that this was the way to set a breakpoint. :(

Just tried it with the IDE margin clicking red icon breakpoint thingie and all is good.

Thanks much.

0

Please sign in to leave a comment.