Ruby on Rails Directory Structure
其实这个主题的文章以及不算少数了,而且以及有很多官方或者权威的文章讲述这个主题,重复造轮子也好,copy也罢,还是要在这个地方有我自己的认识为好.
其实这个主题的文章以及不算少数了,而且以及有很多官方或者权威的文章讲述这个主题,重复造轮子也好,copy也罢,还是要在这个地方有我自己的认识为好.
http://euruko.org/欧洲ruby年会
EuRuKo is an annual conference about the Ruby language with an informal atmosphere and lots of opportunities to listen, to talk, to hack and to have fun.
EuRuKo是Ruby开发语言的一个年会,氛围很自由,在那里可以听到很多,也可以发表自己的观点,主要的是能够快乐.
Ruby is a dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.
Ruby是动态的开源的编程语言,专注于简单高效.它的语法很优雅让人容易看懂.
最近在倒腾ruby,可是在配置环境这个环节总是卡住,感觉很麻烦。所然有rvm这样的工具辅助,但是还是感觉很麻烦。就拿这次的事情来说。在安装RVM时,如果不是以root身份安装,安装的目录就会不同,而且还会产生附带的很多问题。
notepad++的具体特征我就不详细说了,大家可以去网站看看:
http://notepad-plus.sourceforge.net/uk/site.htm
启动notepad++:
创建一个新rb文件
点击菜单上的Run?
no, no, no 在这里是不行的,不像SciTE, 我们得需要来配置下一个非常棒的插件。
去这个地方: http://sourceforge.net/projects/npp-plugins/files/
小心按坏F6, :), 按下快键 F6 ,将出现下面窗口(NppExec),在窗口中输入:
ruby $(FULL_CURRENT_PATH) (一定要到当前的目录)
点击ok, 啊哦,ruby: No such file or directory -- new (LoadError)
(在运行之前一定要保存,才可以看见当前的代码的效果哦,人家是读文件来解释的)
呵呵 老兄你忘了保存(注:不要保存在有空格的目录下),save and ok again, 结果出来了。
随后,我们可以保存这个Command 为Ruby Run, 这样以后就直接按F6点ok(如果一建就能执行默认的command就好了)。
下面,我们创建一个Run Server 的Command, 按F6, 脚本: ruby script/server
如何快捷,批量的创建和删除Command(界面上没有delete按钮):
你也可以在npp的 pluginsConfig 目录下找到 npes_saved.txt 和npes_temp.txt 文件,打开它们,自己看了哈。下面是我的 npes_save.txt:
::Ruby Run
ruby $(FULL_CURRENT_PATH)
::GO to Project Directory
CD D:tempMy DocumentsNetBeansProjectsRailsDemo
::Run Server
ruby script/server
::Rails Destroy Template
ruby script/destroy --help
::Rails Generate Template
ruby script/generate --help
补充: pluginsdocNppExec.txt 有详细的关于NppExec的说明。
总结,notepad++上还有好一些插件,感觉还不错, 如果不喜欢java ide的同学,喜欢速度快的ide的同学们,不妨考虑使用一下这种方式来develop (应该不光是ruby,其他语言也一样可以配置)
共同学习:Functions List这个插件应该是类是自动完成,不过我在pluginsAPIs目录下 创建了一个erb.api,添加了一些常用的字串, 但打开erb文件还是无法在Functions list中看到。我已经给这个插件作者发送了一份email,等待他的答复
lemonzc
Symbio Chengdu
from his blog: http://kunal.kundaje.net/2007/07/notepad-and-the-ruby-blue-style/
I enjoy using Visual Studio as an all-in-one IDE for Windows programming, but when I’m writing code for the web, I prefer simpler text editors. I’ve tried many, and eventually settled on Notepad++ sometime last year.
What I really like about Notepad++ (besides the fact that it’s free) is how lightweight it is. It fires up instantly, just like classic Notepad does, and at the same time includes all the features that I want, including syntax highlighting, auto-completion, brace matching and auto-indentation, tabs, support for regular expressions, macros etc.

As I was working on a project this morning, it occurred to me that I should mention a custom syntax highlighting style called Ruby Blue that I’ve been using (image above, courtesy of the author). It’s quite surprising how beneficial a good font and syntax highlighting scheme can be, and Ruby Blue, coupled with DejaVu Sans Mono or Consolas, works very well for me.
The Ruby Blue style is also available for Vim and TextMate.
Do you have a favorite text editor, monospace font, and syntax highlighting scheme?