如何在 Eclipse aptana 插件中调试 ruby​​ on Rails

发布于 2024-11-09 11:27:21 字数 1132 浏览 0 评论 0原文

我正在尝试找出这个 eclipse aptana 插件(来自视觉工作室背景)。当我尝试按如下方式调试我的项目时:

在此处输入图像描述

它会抛出此错误:

Unable to find ' rdebug-ide' 二进制脚本。可能需要安装“ruby-debug-ide”gem,或者可能需要将 gem 可执行目录添加到 PATH(通过“gem 环境”检查位置)。

这是 gem 环境

RubyGems Environment:
  - RUBYGEMS VERSION: 1.5.2
  - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby192/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/Ruby192/lib/ruby/gems/1.9.1
     - C:/Users/Lol/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

服务器可以启动,我可以转到 localhost:3000 并加载。但我不明白这个错误或如何开始调试。知道出了什么问题吗?

附言。来自 asp.net mvc 背景,我可以右键单击控制器文件夹并添加控制器。然后右键单击一个操作并为其生成一个视图。我不能在 ruby​​ on Rails 开发中这样做吗?

I'm trying to figure out this eclipse aptana plugin (coming from a visual studio background). When I try to debug my project as follows:

enter image description here

It throws this error:

Unable to find 'rdebug-ide' binary script. May need to install 'ruby-debug-ide' gem, or may need to add your gem executable directory to your PATH (check location via 'gem environment').

This is gem environment:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.5.2
  - RUBY VERSION: 1.9.2 (2011-02-18 patchlevel 180) [i386-mingw32]
  - INSTALLATION DIRECTORY: C:/Ruby192/lib/ruby/gems/1.9.1
  - RUBY EXECUTABLE: C:/Ruby192/bin/ruby.exe
  - EXECUTABLE DIRECTORY: C:/Ruby192/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mingw32
  - GEM PATHS:
     - C:/Ruby192/lib/ruby/gems/1.9.1
     - C:/Users/Lol/.gem/ruby/1.9.1
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

The server can be started, I can go to localhost:3000 and it loads. But I dont understand this error or how to get debugging started. Any idea what is wrong?

PS. Coming from an asp.net mvc background, I can right click controllers folder and add controller. Then right click an action and generate a view for it. Can I not do this in ruby on rails development?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

新雨望断虹 2024-11-16 11:27:21

从命令行发出以下命令:

gem install ruby​​-debug-ide

错误消息表明您没有安装此 gem。似乎 Aptana 在激活某些功能之前不会检查安装了哪些 gem。

如果您不知道 gem 是什么,请将其视为在系统范围内安装的插件。

Issue the following command from the command line:

gem install ruby-debug-ide

The error message is saying that you don't have this gem installed. It seems as though Aptana does not check to see what gems are installed before activating certain features.

In case you don't know what a gem is, think of it as a plugin that is installed system-wide.

栖迟 2024-11-16 11:27:21

Take a look at this post for installing ruby debug for ruby 1.9.3

爱的那么颓废 2024-11-16 11:27:21

我在 osX 中遇到了与 Mel Padden 相同的问题。已经安装了 gem 后,它给我带来了同样的错误(我安装了 rvm)。我所做的是建立一个到 aptana 的符号链接,然后从控制台调用它。

$ ln -s /Applications/Aptana\ Studio\ 3/AptanaStudio3.app/Contents/MacOS/AptanaStudio3 /usr/local/bin/aptana
$ aptana&

不是最好的解决方案,但它有效:)

I was having the same problem as Mel Padden in osX. With the gem already installed it threw me the same error(I have rvm installed).What I did it was make a symbolic link to aptana and after that invoke it from console.

$ ln -s /Applications/Aptana\ Studio\ 3/AptanaStudio3.app/Contents/MacOS/AptanaStudio3 /usr/local/bin/aptana
$ aptana&

Is not the best solution, but it works :)

小草泠泠 2024-11-16 11:27:21

我在 64 位 Ubuntu 上也遇到这个问题。
我不仅无法调试,现在当我打开 IDE 时,它还会出现奇怪的 UI 错误。包资源管理器不会显示,并且对话框不断弹出。

这是我从 Rails 安装中获得的列表

Installing RDoc documentation for ruby-debug-ide-0.4.16...
mel@ubuntu:/usr/share/eclipse/features$ gem list

*** LOCAL GEMS ***

cgi_multipart_eof_fix (2.5.0)
daemons (1.1.4)
fastthread (1.0.7)
gem_plugin (0.2.3)
linecache (0.46)
mongrel (1.1.5)
rake (0.9.2)
rbx-require-relative (0.0.5)
ruby-debug-base (0.10.4)
ruby-debug-ide (0.4.16)
ruby-mysql (2.9.4)

mel@ubuntu:/usr/share/eclipse/features$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /var/lib/gems/1.8
     - /home/mel/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

I'm also having this problem on 64-bit Ubuntu.
Not only can I not debug, now when I open the IDE it gives strange UI errors. The package explorer won't display and dialogs keep popping up.

Here's the listing I get from my Rails install

Installing RDoc documentation for ruby-debug-ide-0.4.16...
mel@ubuntu:/usr/share/eclipse/features$ gem list

*** LOCAL GEMS ***

cgi_multipart_eof_fix (2.5.0)
daemons (1.1.4)
fastthread (1.0.7)
gem_plugin (0.2.3)
linecache (0.46)
mongrel (1.1.5)
rake (0.9.2)
rbx-require-relative (0.0.5)
ruby-debug-base (0.10.4)
ruby-debug-ide (0.4.16)
ruby-mysql (2.9.4)

mel@ubuntu:/usr/share/eclipse/features$ gem environment
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
  - INSTALLATION DIRECTORY: /var/lib/gems/1.8
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /var/lib/gems/1.8
     - /home/mel/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文