我正在尝试在Rubymine中运行调试器并且我一直收到此错误。
/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
有什么想法吗?
答案 0 :(得分:2)
您的应用中看起来像gem或其他依赖项已更改。您报告的错误似乎有嵌入其中的答案:检查您的/app/mailers/user_notifications.rb并查看第1行要求的要求。然后在第29行查看lib / rubygems / custom_require。其中一个文件似乎要求找不到的东西。我没有你正在使用的宝石的经验,但似乎你可能错过了一个宝石依赖,有一个Gem版本错误,或者一个不再存在或移动/更改名称的Include语句。
答案 1 :(得分:0)
使用Run&gt;时出现类似错误使用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
最初,当我在示例ruby文件team.rb中设置断点并运行Run&gt;调试它有效(控制台显示0>
而不是Process finished with exit code 0
)
class Team
attr_reader :size
def initialize(size)
@size = size
end
end
team = Team.new(100)
我花了几个小时试图解决它而没有成功,在互联网上发布帖子。我准备重新安装RubyMine,我决定联系他们的支持电子邮件。我告诉过我已经尝试了所有的东西,比如:
rm -rf .idea
gem pristine --all
rvm install 2.1.2
rvm list
rvm use 2.1.2
)rvm -v
rvm 1.26.11 gem env
和which ruby
检查宝石的位置。这表明它们都在/ usr / bin / ruby和/Users/Ls/.rvm/rubies/ruby-2.3.0/bin/ruby gem uninstall ...
)相关宝石
$ 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
我收到了RubyMine支持部门的反馈,建议我向他们展示gem list
的输出并打开详细输出(设置&gt;构建,执行,部署&gt;调试器&gt;详细调试器)。
而不是立即回应他们的反馈给了我一个强有力的线索它必须是由宝石冲突造成的,所以我尝试了以下方法,让它再次起作用!
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>
而不是Process finished with exit code 0