Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 使用windows8和aptana进行ruby调试_Ruby On Rails_Ruby_Windows_Ruby On Rails 3_Windows 8 - Fatal编程技术网

Ruby on rails 使用windows8和aptana进行ruby调试

Ruby on rails 使用windows8和aptana进行ruby调试,ruby-on-rails,ruby,windows,ruby-on-rails-3,windows-8,Ruby On Rails,Ruby,Windows,Ruby On Rails 3,Windows 8,我已经安装了 gem install ruby-debug-ide --pre 但是当我运行debug时,我收到了这个错误消息 4088: Exception in DebugThread loop: wrong number of arguments (0 for 1) Backtrace: c:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.2.2/lib/ruby-debug/interface.rb:163:in `read_command'

我已经安装了

gem install ruby-debug-ide --pre
但是当我运行debug时,我收到了这个错误消息

4088: Exception in DebugThread loop: wrong number of arguments (0 for 1)
Backtrace:
c:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.2.2/lib/ruby-debug/interface.rb:163:in `read_command'
  from: c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide/ide_processor.rb:83:in `process_commands'
  from: c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.17.beta14/lib/ruby-debug-ide.rb:160:in `block in start_control'
Exiting
不知道少了什么

更新:

我安装了这个宝石

gem install ruby-debug-ide19 --platform=ruby
并删除

gem 'debugger'
在我的档案中基于这篇文章

现在可以了

经过几天的试验,我终于在Windows8中成功地使用了Aptana3.2.2,并结合了从其他帖子中发现的步骤。似乎一个人走向成功的步骤对其他许多人都不起作用,但如果可能有帮助的话,下面是我采取的步骤。我对Ruby和Rails还不熟悉,所以冒着包含不相关步骤的风险,我将尝试非常详细地介绍。注意,我已经安装了MySQL,并让它与Ruby 1.9.3一起工作

  • 清除了现有的Ruby和DevKit安装(包括在Windows注册表中)。(我将我的C:\Ruby193目录重命名为C:\Ruby193_old。请参阅下面的步骤8d。)

  • 使用rubyinstaller.org网站上的rubyinstaller-1.9.3-p327.exe安装Ruby。我将其安装到C:\Ruby193

  • 将DevKit(rubynstaller.org上的DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe)安装到C:\Ruby193\DevKit

  • 将C:\Ruby193\DevKit\bin添加到我的路径。(我打开控制面板,系统和安全,系统,选择高级系统设置,打开“系统属性”窗口,高级选项卡。在那里,我单击“环境变量”按钮,打开另一个窗口。在“系统变量”部分,我选择“路径”变量,单击编辑,并附加;C:\Ruby193\DevKit\bin.)

  • 关闭所有当前打开的命令/dos窗口并打开一个新窗口(以便新路径生效)

  • 在命令窗口中,运行以下命令:

    6a<代码>gem安装导轨

    6b
    gem安装ruby-debug-ide19--platform=ruby
    (此操作失败。)

    6c<代码>cd\Ruby193\Devkit

    6d`德夫基特瓦尔斯蝙蝠

    6e<代码>curl-OLhttp://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem

    6f<代码>curl-OLhttp://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem

    6g<代码>gem安装linecache19-0.5.13.gem

    6h
    gem安装ruby-debug-base19-0.11.26.gem--with ruby include=c:\ruby193\include\ruby-1.9.1\ruby-1.9.3-p327

    6i
    gem安装ruby-debug-ide19--platform=ruby
    (与上面相同,但这次安装没有错误。)

  • 下载并安装了RubyMine 4.5.4的评估。(一些人曾表示,RubyMine将安装必要的缺失宝石。)

  • 在RubyMine中:

    8a。Ruby不知道SDK在哪里,所以我单击了文件、设置。在出现的设置窗口的左窗格中,我单击了“RubySDK和Gems”。在右侧窗格中,我单击“添加SDK…”并选择
    C:\Ruby193\bin\ruby.exe(ruby-1.9.3-p327)
    。单击“确定”返回主窗口

    8b。单击Run,Debug,弹出一个上下文菜单。菜单中有几个项目的左边有数字标签。选择“Development:myproject”(左边的数字是“1”)

    8c。弹出一个窗口说“调试器所需的gem ruby-debug-base19x当前未安装。是否安装?”我选择了“是”。下载进度窗口中的文本变化很快,但似乎至少下载了2个gem:

    • ruby-debug-base19x-0.11.30.pre10.gem–无rdoc

    • <> >代码> LICACHAEXYOX/<代码>(我不能理解空白部分)

    8d.再次尝试调试。我相信是在这一点上,控制台警告我需要在C:\Ruby193\bin文件夹中有一个正确版本的“libmysql.dll”。我从旧Ruby安装中复制了该文件,在上面的步骤1中,我已将其重命名为C:\Ruby193\bin

    8e.再次尝试调试。这次RubyMine说“找不到指定的模块:
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/1.9/mysql2.so
    。浏览C:/Ruby193/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib文件夹时,我注意到有一个“mysql”文件夹,而不是一个“mysql2”文件夹和“mysql”文件夹有一个1.9文件夹和一个mysql2.so文件。因此,我创建了一个“mysql2”文件夹,并将所有内容从“mysql”文件夹复制到“mysql2”文件夹

    再次尝试调试,这次成功了

    8g.退出RubyMine

  • 启动Aptana。在Aptana:

    9a.在左窗格的Project Explorer选项卡中,我选择了项目的根目录

    9b.在菜单栏中,我单击了运行,然后单击调试服务器

  • 成功了!控制台显示:

    
    快速调试器(ruby debug ide 0.4.17.beta14,ruby debug base 0.11)侦听127.0.0.1:53561
    =>启动WEBrick
    =>Rails 3.2.9应用程序开始在ht tp://0.0.0.0:3000上开发 =>使用-d调用以分离
    =>Ctrl-C关闭服务器
    [2012-12-20:23:51]信息WEBrick 1.3.1
    [2012-12-20 20:23:51]信息ruby 1.9.3(2012-11-10)[i386-mingw32]
    [2012-12-20 20:23:51]信息WEBrick::HTTPServer#启动:pid=4416端口=3000

    在IE中,当我浏览
    http://localhost:3000/
    ,它在调试上下文中运行。(URL拼写错误是故意的,因此此帖子通过了stackoverflow的发布验证测试。)