Error when trying to debug

When I try to debug my app, I am getting the following error:


/home/levi/.rvm/rubies/ruby-1.9.3-p194/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/levi/.rvm/gems/ruby-1.9.3-p194@goodsmiths/gems/ruby-debug-ide-0.4.17.beta9/bin/rdebug-ide --port 43534 -- /home/levi/Projects/project_name/app/models/listing.rb
Fast Debugger (ruby-debug-ide 0.4.17.beta9, ruby-debug-base 0.11.30.pre10) listens on 127.0.0.1:43534
Uncaught exception: uninitialized constant ActiveRecord
 /home/levi/Projects/project_name/app/models/listing.rb:1:in `<top (required)>'

Process finished with exit code 0


And line 1 of listing.rb is simply:

class Listing < ActiveRecord::Base

Debugging has worked for me in the past, but stopped either during an upgrade of RM, or Ruby / Rails. Unfortunately, I don't use the RM debugger a lot, and we have recently upgraded RM, Ruby and Rails, so I can't say exactly when this started happening.

I should also add that in other projects, I am able to debug.

I'm on Ruby 1.9.3-p194 and here's my gem list:


Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.0.4)
Using activesupport (3.2.2)
Using builder (3.0.0)
Using activemodel (3.2.2)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.2)
Using actionpack (3.2.2)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.2)
Using braintree (2.16.0)
Using activemerchant (1.16.0)
Using hashie (1.2.0)
Using metaclass (0.0.1)
Using mocha (0.10.0)
Using json (1.6.6)
Using money (4.0.1)
Using active_paypal_adaptive_payment
Using sass (3.1.16)
Using bourbon (2.1.0)
Using bcrypt-ruby (3.0.1)
Using orm_adapter (0.0.7)
Using rack-ssl (1.3.2)
Using rdoc (3.12)
Using thor (0.14.6)
Using railties (3.2.2)
Using warden (1.1.1)
Using devise (2.1.0.rc) from https://github.com/plataformatec/devise.git (at master)
Using fastercsv (1.5.4)
Using formtastic (2.1.1)
Using has_scope (0.5.1)
Using responders (0.9.1)
Using inherited_resources (1.3.1)
Using jquery-rails (1.0.19)
Using kaminari (0.13.0)
Using arel (3.0.2)
Using tzinfo (0.3.32)
Using activerecord (3.2.2)
Using polyamorous (0.5.0)
Using meta_search (1.1.3)
Using activeresource (3.2.2)
Using bundler (1.1.3)
Using rails (3.2.2)
Using activeadmin (0.4.4)
Using acts-as-taggable-on (2.1.1)
Using addressable (2.2.6)
Using annotate (2.4.0)
Using bond (0.4.1)
Using haml (3.1.4)
Using highline (1.6.8)
Using sexp_processor (3.0.8)
Using ruby_parser (2.3.1)
Using ruby2ruby (1.3.1)
Using terminal-table (1.4.5)
Using brakeman (1.6.0)
Using net-ssh (2.2.1)
Using net-scp (1.0.4)
Using net-sftp (2.0.5)
Using net-ssh-gateway (1.1.0)
Using capistrano (2.9.0)
Using nokogiri (1.5.0)
Using ffi (1.0.11)
Using childprocess (0.3.2)
Using libwebsocket (0.1.3)
Using rubyzip (0.9.5)
Using selenium-webdriver (2.21.2)
Using xpath (0.1.4)
Using capybara (1.1.2)
Using carmen (0.2.8)
Using carrierwave (0.6.2)
Using chunky_png (1.2.5)
Using coffee-script-source (1.2.0)
Using execjs (1.3.0)
Using coffee-script (2.2.0)
Using coffee-rails (3.2.2)
Using fssm (0.2.9)
Using compass (0.12.1)
Using compass-rails (1.0.1)
Using diff-lcs (1.1.3)
Using gherkin (2.10.0)
Using cucumber (1.2.0)
Using cucumber-rails (1.3.0)
Using daemons (1.1.4)
Using database_cleaner (0.7.0)
Using date_validator (0.6.3)
Using declarative_authorization (0.5.4)
Using git (1.2.5)
Using jeweler (1.8.3)
Using deep_cloneable (1.4.0)
Using eventmachine (0.12.10)
Using exceptional (2.0.32)
Using excon (0.7.9)
Using factory_girl (3.3.0)
Using factory_girl_rails (3.3.0)
Using formatador (0.2.1)
Using ruby-hmac (0.4.0)
Using fog (1.1.1)
Using term-ansicolor (1.0.7)
Using foreman (0.26.1)
Using friendly_id (4.0.5)
Using ruby-openid (2.1.8)
Using rack-openid (1.3.1)
Using sinatra (1.2.7)
Using gatekeeper (0.1.4)
Using guard (0.8.8)
Using guard-cucumber (0.8.0)
Using guard-rspec (0.5.8)
Using spork (0.9.0.rc9)
Using guard-spork (0.3.2)
Using launchy (2.0.5)
Using rest-client (1.6.7)
Using heroku (2.14.0)
Using heroku_san (1.3.0)
Using multi_xml (0.4.2)
Using httparty (0.8.1)
Using libnotify (0.5.9)
Using libv8 (3.3.10.4)
Using little-plugger (1.1.3)
Using logging (1.6.1)
Using logging-rails (0.3.0)
Using lol_dba (1.3.0)
Using memcache-client (1.8.5)
Using subexec (0.1.0)
Using mini_magick (3.3)
Using mysql2 (0.3.11)
Using nested_form (0.2.0) from git://github.com/ryanb/nested_form.git (at master)
Using newrelic_rpm (3.3.0)
Using rack-raw-upload (1.0.11)
Using rails-dev-tweaks (0.6.1)
Using rails-footnotes (3.7.5)
Using randumb (0.1.4)
Using rash (0.3.1) from https://github.com/tallgreentree/rash.git (at bump-hashie-version-dependency)
Using rb-inotify (0.8.8)
Using redis (2.2.2)
Using redis-namespace (1.0.3)
Using vegas (0.1.8)
Using resque (1.19.0)
Using resque-lock-timeout (0.3.3)
Using trollop (1.16.2)
Using resque-pool (0.2.0)
Using rufus-scheduler (2.0.13)
Using resque-scheduler (1.9.9)
Using rspec-core (2.8.0)
Using rspec-expectations (2.8.0)
Using rspec-mocks (2.8.0)
Using rspec (2.8.0)
Using resque_spec (0.8.0)
Using riddle (1.5.0)
Using ripl (0.6.2)
Using ripl-multi_line (0.3.0)
Using ripl-rack (0.2.0)
Using rspec-rails (2.8.0)
Using sass-rails (3.2.5)
Using sendgrid (1.0.1)
Using shoulda-matchers (1.0.0)
Using simplecov-html (0.5.3)
Using simplecov (0.6.4)
Using sqlite3 (1.3.5)
Using tabs_on_rails (2.1.1)
Using therubyracer (0.10.1)
Using thin (1.3.1)
Using thinking-sphinx (2.0.10)
Using ts-resque-delta (1.2.1)
Using tux (0.3.0)
Using uglifier (1.2.4)
Using uuidtools (2.1.2)
Using will_paginate (3.0.0)


Let me know what other information you need.

4 comments
Comment actions Permalink

I have confirmed that I get this error in both the current release as well as the EAP version.

0
Comment actions Permalink

I've also confirmed that this same code base functions correctly on another developers machine, using 4.0.3. Said developer is on OSX, and I am on Ubuntu, so now I'm even further confused as to what the actual issue is.

In regards to gems, these are the only gems that would be different between his gemset and mine:

group :osx_test do
  gem "rb-fsevent", "~> 0.9.1", :require => false
  gem "growl", :require => false
end

group :linux_test do
  gem "libnotify", :require => false
  gem "rb-inotify", :require => false
end



So I don't think that's the cause.

In both of our cases, we let RM take care of installing the debug gems.
0
Comment actions Permalink

Hello Levi,

what are you actually trying to debug? If you want to debug your Rails application you should debug configuration named Development: <YourProjectName>, not Listing model file

0
Comment actions Permalink

#facepalm

You are correct!  :)

All this time, and I some how had the listing model selected in the dropdown in the toolbar. Since I rarely use my mouse, and instead use the hotkey, I never even thought to look at that.

Thanks for pointing out what should have been obvious!

0

Please sign in to leave a comment.