如何debug ruby】的更多相关文章

how to debug ruby: 1. 第一种方法,直接使用ruby内建的debug在命令行调试,这个个gdb或者pdb的命令差不多. ruby -r debug yourubyfile.rb 2. 在eclipse中debug ruby 2.1 使用内建的ruby debugger,在上图中选择"Ruby Build-In Debugger" 2.2 使用Fast Ruby Debugger(ruby-debug),但是一般的ruby都没有ruby-debug包,所有需要自己安装…
ri #rdoc reader attr_reader attr_writer @@xx 类变量都是私有的 def 类名.xx end 类方法 [1,3,5,7].inject(0){|sum,e| sum+e} String 8bit字节序列 #{expr} 全局变量,类变量,实例变量,{}可省略 %q %Q < 有-结束xxx可缩进="有-结束xxx可缩进" xxx="xxx"><<-xxx> Debug ruby –r debug…
Today I finally got ruby debugging working in Eclipse. Below are the major setup steps involved, as well as some problems one might encounter along the way. 1.   Install DLTK plugin To make Eclipse a Ruby IDE, one popular plugin to be installed is, "…
Komodo is the professional IDE for major web languages, including Python, PHP, Ruby, Perl, HTML, CSS and JavaScript. You'll enjoy developing faster with Komodo IDE's complete set of  tools http://www.activestate.com/komodo-ide Komodo Installation Gui…
eclipse 创建的maven项目,引入jar包之后出现红色叹号,一直找不到原因,连main方法都无法运行,提示找不到类: 错误: 找不到或无法加载主类 soapsampler.SoapSamplerGui 百思不得其解,使用maven -X clean package  打了 个空包,啥类都没有打进去,比较无语 D:\tools\eclipse-jee-oxygen-2-win32-x86_64\eclipse\workspace\soapsampler>mvn -X clean packa…
上午,莫名其妙的rails app不能用了,rails -v一查发现不存在.ruby -v发现是2.0的版本.很着急上火,因为很少使用过rvm这个ruby版本控制器.所以照官网文档.从新安装ruby,然后发现还是rail没有安装,后来决定从新安装rails. 在document/upgrade 发现一条命令 $ rvm gemset update 可以全部更新gem.于是我就更新了,rails app也可以用了.这就是悲剧的开始…
网上目前还找不到完整的mac下golang环境配置支持,本人配置成功,现在整理分享出来. mac最好装下xcode,好像有依赖关系安装Homebrew打开终端窗口, 粘贴脚本执行/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 安装go语言最新版,去官网 https://golang.org/dl/  下载,需要挂科学上网 推荐一个 58j…
本文仅适用于Windows系统. 一.安装Ruby Sass是用Ruby语言写的,但是两者的语法没有关系,所以学 Sass 不用学 Ruby,只是必须先安装Ruby,然后再安装Sass. Linux和Mac已自带Ruby,不用再安装.Windows用户可以从这里下载Ruby的安装程序. 我下载的是第二个,Ruby 2.3.1 (x64) 安装过程没什么麻烦的地方,按提示来就可以. 二.安装SASS 进入运行cmd进入命令提示符,输入ruby -v查看版本号,如果能正确显示版本号,则说明ruby安…
1.强类型,即不会自动进行类型转换,而C/C++为弱类型. # Ruby i = 1 puts "Value is " + i # TypeError: can't convert Fixnum into String # from (irb):2:in `+' # from (irb):2 2.完全地OO(Object-Oriented面向对象),所有方法都是对对象,无全局函数. strlen(“test”) # error “test”.length 3.变量:以小写开头. my_…
When you first started coding, errors were probably the last thing you wanted to see. After all, it’s not a far stretch to associate “error” with “I messed up”. Hopefully by now you’ve come to appreciate the value of a good error message. Take a look…