Bug report - error in gem caused by gem dependency not included in project Gemfile

I'm using RubyMine to write an application around a gem that I'm developing.  The gem's name is "TDAmeritradeApi".  My application is named "StockTrendFinder".  Within "TDAmeritradeApi" I'm using another gem from Rubygems named "BinData".

The problem I'm having is that in one of my "TDAmeritradeApi" files, I have a call to

    require 'bindata'

This works fine in the standalone gem, but causes a problem in my debugger in the "StockTrendFinder" project because the breakpoints I set from "StockTrendFinder" in the "TDAmeritradeApi" gem don't work.  I noticed this conflict becuase running

    bundle exec rake -T

from the StockTrendFinder project comes up with this error:
uninitialized constant TDAmeritradeApi::BinData
/Users/wkotzan/Development/gem-development/tdameritrade_api/lib/tdameritrade_api/client.rb:6:in `<module:TDAmeritradeApi>'

I was able to remedy the problem by including this line in the StockTrendFinder Gemfile:

    gem "bindata"



BinData is included in the TDAmeritradeApi gem via the gemspec file.


I'm using RubyMine 6.

2 comments
Comment actions Permalink

Update: just noticed that my fix of including the dependency in the project Gemfile doesn't fix the breakpoints issue.  My breakpoints within the TDAmeritradeApi gem still don't work.

0
Comment actions Permalink

Hi,

it looks like we have two separate problems here:

- debugger doesn't stop at breakpoint
- RubyMine doesn't load gem from gemspec in certant situation.

As for the former problem: try to run debugger in verbose mode (Settings|Debugger|Ruby) and provide (attach) its output here.

As for the latter one: could you pelase provide a simple test project which reproduce the problem for you.  Also I'd check if this is RM problem or not.
i.e. does rake -T executed from command line reproduce the same problem.  If it is then this is not a RM problem but (most likely) problem in your code :(

Regards, Oleg.

0

Please sign in to leave a comment.