I had a very similar problem - getting Eclipse to recognize my installed gems. I used rvm , pointing to ruby 2.1.0 by default. The ruby code I was debugging had one require 'mail' at the top. When launching or debugging a script, an error was displayed on the console:
/Users/username/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- mail (LoadError) from /Users/username/.rvm/rubies/ruby-2.1.0/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require' `<main>'
Eclipse had the correct ruby configured in its settings> Ruby> Interpreters: /Users/username/.rvm/rubies/ruby-2.1.0/bin/ruby
I knew that a mail stone outside of Eclipse was installed for this ruby:
$ gem which mail /Users/username/.rvm/gems/ruby-2.1.0/gems/mail-2.6.3/lib/mail.rb
I tried @Don Kirkby to suggest adding -rubygems as an Interpreter argument in Debug Configurations, but it still didn't work.
What DID got this, oddly enough, was to add the GEM_HOME and GEM_PATH to the "Environment" section of Debug configurations.
I found the correct values (given by rvm, I suppose), echoing them in the terminal, outside of Eclipse:
$ echo $GEM_HOME /Users/username/.rvm/gems/ruby-2.1.0 $ echo $GEM_PATH /Users/username/.rvm/gems/ruby-2.1.0:/Users/username/.rvm/gems/ ruby-2.1.0@global
Adding these two environment variables to “Debug Configurations”> the “Environment” tab got debugging that works in Eclipse using the Ruby Built-In Debugger as Engine in Preferences debugger. By the way, I tried using "Fast Ruby Debugger (ruby-debug)", but got this error:
dyld: lazy symbol binding failed: Symbol not found: _rb_vm_get_sourceline Referenced from: /Users/username/.rvm/gems/ruby-2.1.0/extensions/x86_64-darwin-12/2.1.0-static/debugger-1.6.8/ruby_debug.bundle Expected in: flat namespace dyld: Symbol not found: _rb_vm_get_sourceline Referenced from: /Users/username/.rvm/gems/ruby-2.1.0/extensions/x86_64-darwin-12/2.1.0-static/debugger-1.6.8/ruby_debug.bundle Expected in: flat namespace
Sidenote: an attempt to find a fix for the Symbol not found error for the fast Ruby Debugger mechanism led me to this topic: Debugging in ruby 1.9 , which seems like neither ruby-debug nor debugger gem is suitable for use with ruby 2.0+ and recommends byebug gem instead. But since I see no way to use byebug with Eclipse, I just finished using the Ruby Built-In Debugger engine with debugger and ruby-debug-ide gems:
$ gem install debugger Successfully installed debugger-1.6.8 $ gem install ruby-debug-ide Successfully installed ruby-debug-ide-0.4.26
which I got from this post: https://endocode.com/blog/2012/09/03/debugging-ruby-1-9-3-applications-in-eclipse/
Hope this helps someone trying to debug Ruby 1.9 / 2.0 + while working with Eclipse.