Closed avivrosenberg closed 11 years ago
Hmm, that's weird. debugger-xml, which is used by vim-ruby-debugger, only requires builder >= 2.0.0 (https://github.com/astashov/debugger-xml/blob/master/debugger-xml.gemspec#L22)
Can you show me your Gemfile.lock?
Yes, here it is. Thanks for your help.
GEM
remote: https://rubygems.org/
specs:
activemodel (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
activerecord (4.0.0)
activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activerecord-import (0.4.1)
activerecord (>= 3.0)
activerecord-postgis-adapter (0.6.5)
rgeo-activerecord (~> 0.5.0)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.0)
atomic (1.1.14)
bindata (1.6.0)
builder (3.1.4)
colorize (0.6.0)
i18n (0.6.5)
minitest (4.7.5)
multi_json (1.8.1)
pg (0.17.0)
rgeo (0.3.20)
rgeo-activerecord (0.5.0)
activerecord (>= 3.0.3)
arel (>= 2.0.6)
rgeo (>= 0.3.20)
ruby-progressbar (1.2.0)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.5)
shoulda-matchers (2.4.0)
activesupport (>= 3.0.0)
thread_safe (0.1.3)
atomic
trollop (2.0)
tzinfo (0.3.38)
PLATFORMS
ruby
DEPENDENCIES
activerecord
activerecord-import
activerecord-postgis-adapter
bindata
colorize
pg
rgeo
ruby-progressbar
shoulda
trollop
I don't see debugger-xml
there at all. Can you try to add it to your Gemfile, and try again?
Ok, I tried that. Removed Gemfile.lock and ran bundle
again. I still get the same error (same versions and everything) when reaching the require 'bundler/setup'
line.
Here is the new Gemfile.lock. As you said, debugger-xml does requires builder >= 2.0.0.
GEM
remote: https://rubygems.org/
specs:
activemodel (4.0.0)
activesupport (= 4.0.0)
builder (~> 3.1.0)
activerecord (4.0.0)
activemodel (= 4.0.0)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.0)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activerecord-import (0.4.1)
activerecord (>= 3.0)
activerecord-postgis-adapter (0.6.5)
rgeo-activerecord (~> 0.5.0)
activesupport (4.0.0)
i18n (~> 0.6, >= 0.6.4)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.0)
atomic (1.1.14)
bindata (1.6.0)
builder (3.1.4)
colorize (0.6.0)
columnize (0.3.6)
debugger (1.6.2)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.2.3)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.2.3)
debugger-xml (0.1.8)
builder (>= 2.0.0)
debugger (>= 1.6.2)
i18n (0.6.5)
minitest (4.7.5)
multi_json (1.8.1)
pg (0.17.0)
rgeo (0.3.20)
rgeo-activerecord (0.5.0)
activerecord (>= 3.0.3)
arel (>= 2.0.6)
rgeo (>= 0.3.20)
ruby-progressbar (1.2.0)
shoulda (3.5.0)
shoulda-context (~> 1.0, >= 1.0.1)
shoulda-matchers (>= 1.4.1, < 3.0)
shoulda-context (1.1.5)
shoulda-matchers (2.4.0)
activesupport (>= 3.0.0)
thread_safe (0.1.3)
atomic
trollop (2.0)
tzinfo (0.3.38)
PLATFORMS
ruby
DEPENDENCIES
activerecord
activerecord-import
activerecord-postgis-adapter
bindata
colorize
debugger-xml
pg
rgeo
ruby-progressbar
shoulda
trollop
I also tried adding builder itself as a dependency in the Gemfile. If I add gem 'builder', '3.2.2'
for example and run bundle update builder
it gives me an error that the dependency for 'activerecord' can't be met.
Some extra info: I'm using RVM with two gemsets
@global
- Installed debugger-xml here and now I see that builder 3.2.2 is also here (used rvm @global do gem list
)@mwmt
- This is a gemset for my app. Here I have 'activerecord' which caused the installation of builder 3.1.4.I think I might be using RVM/bundler wrong. If I try to remove builder 3.2.2 from my global gemset, it says that debugger-xml depends on it. So maybe removing debugger-xml & builder from the global gemset will do the trick (i'll check that later, and update).
But does it make sense to add debug-only dependencies to my Gemfile? Whats the usual convention?
I removed all debugger-related gems from my global gemset, including builder. Then I added 'debugger-xml' to my app's Gemfile. Now it works. I guess installing 'debugger-xml' into the global gemset caused the installation of 'builder 3.2.2' (the newest version thats >= 2.0.0 which is what debugger-xml needs). Since the global gemset is always included, the gemset for my app had two versions of builder in it... When running the app through the debugger, the newer builder was loaded first, and when reaching the bundler require line, bundler tried to load the older version thats specified in the Gemfile.lock.
So it's not a problem with the debugger actually... sorry :) Thanks again.
I guess installing 'debugger-xml' into the global gemset caused the installation of 'builder 3.2.2' (the newest version thats >= 2.0.0 which is what debugger-xml needs).
Yeah, right.
But does it make sense to add debug-only dependencies to my Gemfile? Whats the usual convention?
Well, this is development dependency. I usually create a group in my Gemfile for them, like:
group :development do
gem "debugger-xml"
end
And then just exclude it when deploying to production.
Using MacVim 7.4, ruby 1.9.3p448, bundler 1.3.5.
The issue: I can't debug my app, because vim-ruby-debugger somehow loads or depends on a newer version of the builder gem than my app needs.
I'm developing a non-rails app which requires the 'activerecord' gem to work with some db. This gem depends on 'activemodel' which in turn depends on builder (~> 3.1.0).
When I debug the app, I can step it until it reaches my
require 'bundler/setup'
line. When stepping over this line I get the following runtime exception:My Gemfile.lock does indeed specify builder 3.1.4, so thats what my app needs and the app runs fine without the debugger. So I'm assuming one of the debugger gems requires the newer version of builder (3.2.2).
What I've tried:
:Rdebugger 'bundler exec ... '
. In this case no exception is thrown, but the debugger doesn't stop at any breakpoints. According to another open issue here, the debugger currently doesn't work withbundle exec ...
.bundler install --path .gems
) instead of with the rest. It was a longshot and indeed it had no effect.So it seems i've reached a dead end. I need the 'activerecord' gem, it's a core part of the app. But I can't debug the app when I require it.
Any ideas?
Thanks for your help and for developing this awesome plugin!
BTW, in case you need my
ruby_debugger_log
, here it is...