我真的希望有人可以帮助解决这个问题,因为它让我发疯。
我正在尝试在 Ubuntu 上的 RubyMine 中启动和运行调试,但完全没有运气。我花了几个小时在谷歌上搜索和阅读文章,没有快乐地尝试不同的事情。
当我在调试模式下运行时,会出现以下消息:
Fast Debugger (ruby-debug-ide 0.6.0, debase 0.2.1, file filtering is supported) listens on 127.0.0.1:56580
然后我得到一个加载栏,上面写着 Debugger 等待 10 秒。然后我得到:
Process finished with exit code 143
我不知道该尝试什么,我什至一直在努力寻找一篇关于如何从头开始配置的像样的文章,我只是从 RubyMine 获得了很多相当模糊的文章。
是否有任何特定的宝石最适合(甚至需要)进行调试。
我正在使用 Rails 4 和 Ruby 2.2.1。我对 Ruby 很陌生,这让这个过程变得更加困难,但更重要的是我让它工作!!
非常感谢大卫
编辑
这是我的宝石文件:
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.4'
# Use postgresql as the database for Active Record
gem 'pg'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# add user authentication
gem 'devise'
gem 'omniauth'
gem 'omniauth-google-oauth2'
# add geo location
gem 'geokit'
gem 'geokit-rails', github: 'geokit/geokit-rails'
# add friendly id for sef URLS
gem 'friendly_id'
# add image uploader
gem 'carrierwave'
gem 'rmagick'
# for sass grid system
gem 'sass-rails'
gem 'compass-rails', git: 'https://github.com/Compass/compass-rails', branch: 'master'
gem 'susy'
# require js
gem 'requirejs-rails'
# load pagination module
gem 'will_paginate'
# allow adding of meta tags and descriptions to pages
gem 'meta-tags'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
# gem 'byebug'
gem 'rspec-rails'
gem 'factory_girl_rails'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
group :test do
gem 'faker'
gem 'capybara'
gem 'guard-rspec'
gem 'launchy'
end
我尝试手动添加 Debugger gem,rails-debugger-ui 但没有任何乐趣,所以我暂时将它们取出。我在那里确实有 byebug,我已经注释掉了,因为 RubyMine 在我第一次尝试使用它进行调试时抱怨并且我并没有真正使用它,这只是我从我开始的教程中添加的东西,但还没有完成到整理呢。
非常感谢大家的帮助。
编辑 2
我通过 RubyMine 创建了一个新项目(在我通过命令行完成之前),并通过控制器中的数字数组进行了一个简单的测试,它已经工作了!!这一次,我第一次运行该项目时,它说它需要安装一些我同意的东西,它以前没有对我现有的项目执行此操作,但问题是我不知道它做了什么。我已经针对这两个项目进行了捆绑展示,以查看它是否添加了任何宝石,但我看不到任何明显的东西。:
有什么想法可以尝试吗?如果我能帮上忙的话,我不愿意开始一个新项目并将所有东西都搬进去。
再次感谢
编辑 3
非常感谢所有的帮助。最后,我决定将所有内容复制到我通过 RubyMine 本身而不是通过终端创建的新项目中并解决了它。
编辑 4
我想我终于让一切正常了。在一遍又一遍地重新创建新项目并逐行复制我的代码之后,我能找到的与其余项目的唯一区别是我现在从 Dropbox 不监视的文件夹中运行它,我不知道这会如何或为什么会影响它,但这是我能找到的唯一解释。
非常感谢我收到的所有帮助