by agate - Published: 2008-08-31 [12:17 上午] - Category: 开发环境, 软件工程

Redmine
Redmine is a flexible project management web application. Written using Ruby on Rails framework, it is cross-platform and cross-database.

Redmine is very easy to setup and powerful right now, include many useful component for Agile software development team. like Wiki, Bug tracker, SCM and Forum.

How to install u can see Installing Redmine.

Tags: [ , , ] - Comments: View Comments
by agate - Published: 2008-08-26 [10:48 下午] - Category: 程序编码

java的老习惯, 就奔着这个富文本编辑器了, 免得我再做一个图片和 flash 的上传组件~ 省时省力.

废话少说, 上地址:http://github.com/bilson/fckeditor/tree/master

使用方式:
1. 解压到 rails 项目中 vendor/plugins 目录下, 并重命名为 fckeditor
2. 在命令行下(rails 目录下)执行 $rake fckeditor:install

ps. 也许真的是 java 中毒太深, 老是觉得配置文件是什么文本啊 xml 啊这类的东东. 在为 fckeditor 上传文件类型限制找设置点的时候, 甚至翻到了 fckeditor 源目录下, 可是那里的设置并没有问题. 却忽略了 ruby 一直是代码维护配置的! 其实这个插件中上传的 MIME 类型设置在本插件目录下 app/controllers/fckeditor_controller.rb 文件中.

Tags: [ , , ] - Comments: View Comments
by agate - Published: 2008-08-26 [9:29 上午] - Category: 软件使用

自从体验过 IE 7 的特性之后的确为其更加标准的渲染方式感到高兴, 但是毕竟很多人还是 winxp 中的 IE 6 .如果设计网页完全标准似乎还是不能让很多朋友"接受". 所以还是用回了原来傻逼一样的 IE 6.

现在在小众软件上面看到了一个称作: Multiple IE 的软件, 可以让你同时使用不同版本的 IE 浏览器. (其实就是一大堆 IE 核心包, 然后做一个软件让它同时可以使用.)
Multiple IE

这样, 我就好将系统默认浏览器升级到 IE 7, 必要的时候再切换到 IE 6 下进行预览啦!

Tags: [ , ] - Comments: View Comments
by agate - Published: 2008-08-25 [3:10 下午] - Category: 程序编码

Ruby官方网站在8月23日发布了安全通告:

http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/

在Ruby当前使用的XML解析库REXML在解析具有嵌套递归元素的XML文件的时候, 将会出现拒绝服务攻击的缺陷, 导致服务器资源耗尽!

凡是在Rails应用程序当中使用到了XML文件解析功能的都存在上述缺陷,需要进行修复. 在Rails当中的修复办法如下:

1. Rails2.0.2和以前的老版本
下载修复文件, 拷贝到RAILS_ROOT/lib目录下, 并且在environment.rb当中加入语句
require 'rexml-expansion-fix'

2. Rails 2.1.0以上版本
下载修复文件, 拷贝到RAILS_ROOT/config/initializers目录下即可。

Tags: [ , ] - Comments: View Comments
by agate - Published: 2008-08-23 [10:52 下午] - Category: 程序编码

"will_paginate" is a rails plugin for helping developer to create the pagination links. use it, you can very easily to make a nice pagination links.

usage:
It’s very easy to do pagination on ActiveRecord models:
cattr_reader :per_page
@@per_page = 5 #modify this

It’s also very easy to make a on Controller:
@posts = Post.paginate :page => params[:page], :order => 'created_at DESC'
In the view, page links can be rendered with a single view helper:
<%= will_paginate @posts %>

Homepage: http://github.com/mislav/will_paginate/wikis
Clone URL: git://github.com/mislav/will_paginate.git
Doc URL: http://mislav.caboo.se/static/will_paginate/doc/

Tags: [ , , ] - Comments: View Comments
by agate - Published: 2008-08-23 [12:34 上午] - Category: 程序编码

if you want to get the current controller and action's name, you can use this way:
# in controller class file, you can use
self.class.controller_path # to get the current controller name
# and use
self.action_name           # to get the current action name

Tags: [ , ] - Comments: View Comments
by agate - Published: 2008-08-23 [12:27 上午] - Category: 程序编码

# You can have the root of your site routed by hooking up ''
# -- just remember to delete public/index.html.
# map.connect '', :controller => "welcome"

change your root page! in [/config/routes.rb]!

Tags: [ , ] - Comments: View Comments
by agate - Published: 2008-08-21 [4:38 下午] - Category: 开发环境, 未分类, 程序编码

FastRI 是一个类似 ri 的 Ruby 文档文档浏览器. 比 ri 快很多, 能对你所有的rdoc文档进行快速的全文搜索, 比ri更聪明,可以查找任意地方的类名而不用指定它的完整名称域, 比ri更好地支持RubyGems.

是不是遇到找一个方法却找不到对应的文档? 是不是即使输入 ActiveRecord::Base.find 这样详细的路径 ri 却告知有 n 个可选查询却无从下手? 是不是忍受不了 ri 那个蜗牛的速度? 是时候用 fastri 代替 ri 了!

安装/使用方法:
安装:
gem install fastri
建立索引:
fastri-server -b
使用:
qri String

传说: 如果你使用 gem 来安装 FastRI, 它会有一定的性能损失, 所以最好的使用办法是使用它的安装包来安装. 我没什么感觉...
FastRI 主页

Tags: [ , , ] - Comments: View Comments
by agate - Published: 2008-08-15 [12:33 上午] - Category: 日志

很清晰地记着高中的自己, 平日里一直很安静但是似乎内心无法安静的自己, 只有在深夜大家都入睡后才能静下心来思考/做事的人. 现在的我似乎又渐渐回到那个时候了!

我是真的很宅, 有很多癖好, 收藏的/喜好的等等! 不善于和人分享, 就像这个 blog 一样, 喜欢静静地躲在一个角落里, 不被人发觉地存在着! 这样才有更多的时间, 自己的时间去静静的想问题, 思考...

把桌面换成了很 blue 的一张风景, 昏暗的光线, 安寂的~ 还是原来的那个内心极度孤独有恋上这孤独的我! 喜欢安静~~~

Tags: [ ] - Comments: View Comments
by agate - Published: 2008-08-14 [12:59 上午] - Category: 软件使用

在微软操作系统下一直在用 intype 开发 ror 应用. 官方网站上面依旧还是稳定的  Intype 0.3.1 发布版. 除了良好的运行速度, 很好用的 bundles 外(以及我中意的主题颜色). 没有什么特殊的了, 难怪 javaeye 的老大说它简陋得不能再简陋了.

但是这些都是过去了, 虽然还没发布, 无意中发现的非稳定版本让我打开眼界. 刚才还在 mac 环境下用 textmate 的感觉竟然在微软系统下感受到了... 工程侧栏, bundles 编辑器, 更人性化的设置介面...

试试看吧! 即使是老版本都是我的最爱! 这个更强大的开发版你一定不会失望!

Tags: [ , ] - Comments: View Comments