Reputation: 22370
I am trying to run the debugger in Rubymine and I keep getting this error.
/Users/skline/.rvm/rubies/ruby-1.9.2-p136/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/skline/.rvm/gems/ruby-1.9.2-p136/gems/ruby-debug-ide-0.4.17.beta3/bin/rdebug-ide --port 49877 -- /Users/skline/Sites/2t2/app/mailers/user_notifications.rb
Fast Debugger (ruby-debug-ide 0.4.17.beta3, ruby-debug-base 0.11.26) listens on 127.0.0.1:49877
<internal:lib/rubygems/custom_require>:29:in `require'
<internal:lib/rubygems/custom_require>:29:in `require'
/Users/skline/Sites/2t2/app/mailers/user_notifications.rb:1:in `<top (required)>'
/Users/skline/.rvm/gems/ruby-1.9.2-p136/gems/ruby-debug-ide-0.4.17.beta3/lib/ruby-debug-ide.rb:112:in `debug_load'
/Users/skline/.rvm/gems/ruby-1.9.2-p136/gems/ruby-debug-ide-0.4.17.beta3/lib/ruby-debug-ide.rb:112:in `debug_program'
/Users/skline/.rvm/gems/ruby-1.9.2-p136/gems/ruby-debug-ide-0.4.17.beta3/bin/rdebug-ide:87:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
Uncaught exception: no such file to load -- safe_mailer
Process finished with exit code 0
Any thoughts?
Upvotes: 2
Views: 2786
Reputation: 4513
I got a similar error when using Run > Debug using RubyMine 2016.2.4.
/Users/Mp/.rvm/rubies/ruby-2.3.0/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/Mp/.rvm/gems/ruby-2.3.0@global/gems/ruby-debug-ide-0.6.0/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 54743 --host 0.0.0.0 --dispatcher-port 54744 -- /Users/Mp/code/apps/ruby_test/team_system/team.rb
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 0.0.0.0:54743
Process finished with exit code 0
Initially when I set a breakpoint in a sample ruby file team.rb and ran Run > Debug it worked (console it displayed 0>
instead of Process finished with exit code 0
)
class Team
attr_reader :size
def initialize(size)
@size = size
end
end
team = Team.new(100)
I spent hours trying to resolve it without success, following posts on the internet. I was ready to reinstall RubyMine, and I decided to contact their support email. I told I had tried everything, such as:
rm -rf .idea
gem pristine --all
rvm install 2.1.2
rvm list
rvm use 2.1.2
)rvm -v
rvm 1.26.11gem env
and which ruby
. This indicated they are in both in /usr/bin/ruby and /Users/Ls/.rvm/rubies/ruby-2.3.0/bin/rubygem uninstall ...
) relevant gems in both the global Ruby location and default RVM
$ gem install debug_inspector
$ gem install debugger-linecache
$ gem install ruby-debug-ide
$ gem install debase
$ gem install debase-ruby_core_source
$ gem install -i /Users/Ls/.rvm/gems/ruby-2.3.0@global debug_inspector
$ gem install -i /Users/Ls/.rvm/gems/ruby-2.3.0@global debug-linecache
$ gem install -i /Users/Ls/.rvm/gems/ruby-2.3.0@global ruby-debug-ide
$ gem install -i /Users/Ls/.rvm/gems/ruby-2.3.0@global debase
$ gem install -i /Users/Ls/.rvm/gems/ruby-2.3.0@global debase-ruby_core_source
$ gem install linecache19-0.5.13.gem
bundle update
I got feedback from RubyMine Support suggesting that I show them the output of gem list
and to turn on Verbose Output (Settings > Build, Execution, Deployment > Debugger > Verbose debugger).
Instead of responding immediately their feedback gave me a strong clue it must be caused by a gem conflict, so I tried the following approach, which got it to work again!
File > Invalidate Caches & Restart > Invalidate Caches & Restart
$ GEM_PATH=$GEM_HOME gem list
LOCAL GEMS
debase (0.2.1)
debase-ruby_core_source (0.9.2)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
linecache19 (0.5.13)
ruby-debug-ide (0.6.1.beta2, 0.6.0)
ruby_core_source (0.1.5)
$ rvm ruby-2.3.0 do gem list
LOCAL GEMS
debase (0.2.1)
debase-ruby_core_source (0.9.2)
debug_inspector (0.0.2)
debugger-linecache (1.2.0)
linecache19 (0.5.13)
ruby-debug-ide (0.6.1.beta2, 0.6.0)
ruby_core_source (0.1.5)
$ rvm ruby-2.3.0 @global do gem list
LOCAL GEMS
debase (0.2.1)
debase-ruby_core_source (0.9.2)
debug_inspector (0.0.2)
linecache19 (0.5.13)
ruby-debug-ide (0.6.0)
$ rvm install ruby-2.3.1
$ rvm ruby-2.3.1 do gem list
$ rvm ruby-2.3.1 @global do gem list
LOCAL GEMS
bigdecimal (1.2.8)
did_you_mean (1.0.0)
gem-wrappers (1.2.7)
io-console (0.4.5)
json (1.8.3)
minitest (5.8.3)
net-telnet (0.1.1)
power_assert (0.2.6)
psych (2.0.17)
rake (10.4.2)
rdoc (4.2.1)
rvm (1.11.3.9)
test-unit (3.1.5)
$ rvm -v
$ rvm get stable
$ rvm reload
$ rvm list
rvm ruby-2.3.1 do rvm gemset create rubymine_2016_4_2
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
$ rvm ruby-2.3.1@rubymine_2016_2_4 do gem list
LOCAL GEMS
bigdecimal (1.2.8)
debase (0.2.2.beta8, 0.2.1)
debase-ruby_core_source (0.9.2)
did_you_mean (1.0.0)
gem-wrappers (1.2.7)
io-console (0.4.5)
json (1.8.3)
minitest (5.8.3)
net-telnet (0.1.1)
power_assert (0.2.6)
psych (2.0.17)
rake (10.4.2)
rdoc (4.2.1)
ruby-debug-ide (0.6.1.beta2)
rvm (1.11.3.9)
test-unit (3.1.5)
0>
instead of Process finished with exit code 0
Upvotes: 0
Reputation: 1892
It looks like a gem or other dependency changed in your app. The error you're reporting seems to have the answer embedded in it: check your /app/mailers/user_notifications.rb and see what requirement line 1 is calling for. Then look at lib/rubygems/custom_require at line 29. One of those two files appears to be asking for something that it can't find. I've no experience with the gem you are using, but it seems you may have missed a gem dependency, have a Gem version error, or an Include statement for something that no longer exists or has moved/changed names.
Upvotes: 2