-
Notifications
You must be signed in to change notification settings - Fork 564
Description
I am working with a team where we are trying to make some code improvements for this gem, but we are running into trouble getting the tests to run. I cloned the repository locally, performed bundle install, and set the following environment variables:
ACTIVERECORD_UNITTEST_HOST=192.168.5.33
ACTIVERECORD_UNITTEST_USER=rails
ACTIVERECORD_UNITTEST_PORT=1433
RAILS_SOURCE=/Users/wkotzan/Google Drive/development/rails-source/rails
RAILS_VERSION=3.2
Whenever I run "rake test" from the command line, I get this error:
$ rake test
rake aborted!
undefined method full_gem_path' for nil:NilClass /Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:10:in
test_libs'
/Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:32:in block (3 levels) in <top (required)>' /Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:31:in
new'
/Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:31:in block (2 levels) in <top (required)>' /Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:29:in
each'
/Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:29:in block in <top (required)>' /Users/wkotzan/Google Drive/Development/remote-gems/activerecord-sqlserver-adapter-original-runtests/Rakefile:27:in
<top (required)>'
(See full trace by running task with --trace)
When I try "bundle exec rake test" I get this error instead:
$ bundle exec rake test
/Users/wkotzan/.rbenv/versions/2.0.0-p247/bin/rake:23:in load': cannot load such file -- /Users/wkotzan/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/specifications/default/bin/rake (LoadError) from /Users/wkotzan/.rbenv/versions/2.0.0-p247/bin/rake:23:in
For the first scenario when I ran "rake test", the test setup seems to be failing because of this line of code in /Rakefile:
['lib',
'test',
"#{File.join(Gem.loaded_specs['activerecord'].full_gem_path,'test')}"]
Gem.loaded_specs does not appear to be populated with 'activerecord'. The only two keys in the hash are for 'rake' and 'psych'.
I'm out of ideas on how to debug this. If you can give me some suggestions on how to troubleshoot, it would be most helpful.
Thanks!
FYI I also posted this question on StackOverflow and plan to update both threads with the correct answer. http://stackoverflow.com/questions/20228139/gem-loaded-specsactiverecord-full-gem-path-not-populated-for-test