<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar/4684235500622716427?origin\x3dhttps://blog.caiwangqin.com', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Caiwangqin's blog

Focus on Life, Cloud Service, Smart Hardware, Architecture, Technic and beyond…

百度Web APP应用开发者大会演讲PPT

2011年5月11日星期三

昨天在百度Web APP应用开发者大会深圳站上,与参会者分享了“Ruby on Rails敏捷开发实践”,作为一个中国互联网从业人员,非常高兴看到越来越开放的互联网应用。应用开发者大会还在进行中,百度推进我国互联网应用开发行业发展的举动值得关注。以下是我的演讲PPT:

标签: , , ,

posted by Caiwangqin, 09:03 | Permalink | 0 comments |

Rails Best Practices

2009年12月7日星期一

posted by Caiwangqin, 11:54 | Permalink | 0 comments |

[ChinaonRails]中国 Ruby / Rails 优秀人物采访计划

2009年9月1日星期二

Dmitry Belitsky对几位成功的Rubyist进行了9个问题的email访问,然后公布了他们的回答,他们的经验对要想成为一个高效、成功、开心的Ruby / Rails工作者非常有帮助。

受此启发,我准备对中国 Ruby / Rails 优秀人物使用同样的问答对话方式,看看他们是怎样做到的。

以下是问题,如果你希望分享你的经验,请回答以下问题,发布到ChinaonRails社区,或我的Email(jesse.cai(at)gmail.com)中,同时也非常欢迎参与者邀请中国 Ruby / Rails 优秀人物参与。

1. 请简单介绍一下你自己,你目前的状态及对短期目标的打算,留下Blog、Twitter等。

2. 你是怎样找到你的第一个Ruby相关的工作的?

3. 你是在哪里和怎样搜索工作机会?你能给我一些最好的方法找到Ruby相关工作的建议吗?

4. 你能给一个没有完整项目展示的Ruby新手一些建议吗?

5. 你可以说说怎样做可以让现在比过去更好的吗?主要是关于使用Ruby工作、客户、如何寻找好的客户方面。很多人梦想着现在比过去好,将来比现在好,所以请写下任何你关于超越过去的想法。

6. 你可以推荐一些你认为将帮助一个程序员生活得更好的书籍、网站、秘诀吗?

7. 你一周工作多长时间?你怎样保持工作效率和精力集中呢?

8. 你怎样管理你的工作空间?你在工作时使用哪些工具?

9. 怎样成为一个成功和有用的程序员?

10. 什么是一个程序员应该知道的?

官方邀请链接:http://chinaonrails.com/topic/view/3337/1.html

已经回复的人有:

中国 Ruby / Rails 群英谱 - gigix
中国 Ruby / Rails 群英谱 - Robin Lu
中国 Ruby / Rails 群英谱 - Eric Sun
中国 Ruby / Rails 群英谱 - IceskYsl
中国 Ruby / Rails 群英谱 - saberma
中国 Ruby / Rails 群英谱 - Dave Liu

中国 Ruby / Rails 群英谱 - dongbin
中国 Ruby / Rails 群英谱 - Cai Li
中国 Ruby / Rails 群英谱 - Daniel Lv
中国 Ruby / Rails 群英谱 - 404
中国 Ruby / Rails 群英谱 - zhangxue
中国 Ruby / Rails 群英谱 - Rui Ma

标签: , ,

posted by Caiwangqin, 10:57 | Permalink | 0 comments |

ChinaonRails in 2009

2009年1月10日星期六

时光飞逝,ChinaonRails.Com又跨过入了新的一年。bd7lx来信说:希望COR新年能坚持下去,页脚也应该是“© 2007-2009

过去的两年时间里,很多人在在ChinaonRails上分享知识,增进友谊。而ChinaonRails也一直保持了朴素,自然,平和,亲切的风格,帮助了一些人解决问题(有问有答),招聘RubyonRails人才举办社区活动,协作翻译Raisl 2.1 更新了什么牵手InfoQ,部分充当了Rails中国社区和英语国家建起了桥梁的作用……

RubyonRails Framework也得到了不断的发展,源代码迁移到Git管理,Rails 2.1,2.2发布,与Merb统战,绑在一起……

新的一年里,不管国际社会风云怎样变幻,我希望Railser in China继续与世界的Rails developer们一起,保持程序员这一份追求效率、激情、快乐的心情,踏实学习,发展创新,为自己赢得更多机会,为这个时代做点看得见摸得着的实事。

祝广大Rails从业者新年行大运。




标签: , ,

posted by Caiwangqin, 13:48 | Permalink | 0 comments |

善用 Rails 的 script/runner

2008年12月15日星期一

网站中经常有一些需要在后台运行的程序,Rails 给我们提供了 script/runner 方法运行 model 中的 action, 如:

ruby script/runner User.find(:first)

之前一般都使用这种方法来处理后台运行的方法,其实还可以有另外一种灵活方法使用 script/runner,可以在 Rails app 的配置,和 Rails Framework 的一些内置方法,但将需要完成的任务写在独立的 Ruby 文件中,如:

vim cron_task.rb

u = User.find(:first)
puts u.inspect

然后在命令行中使用以下方式执行:

ruby script/runner cron_task.rb

使用这样的方式执行 cron_task.rb, 就可以在 ruby 文件中方便的使用 rails app 的 config 和 framework.

当然也可以直接使用Ruby/MySQL直接连数据库操作。

标签: ,

posted by Caiwangqin, 18:13 | Permalink | 0 comments |

BackgroundDRb service started, but MiddleMan.all_worker_info is empty.

2008年10月23日星期四

按这个指引安装了BackgrounDrb, 在启动BackgrounDrb服务时发生了错误,导致服务看起来已经启动成功,但没有worker. Google了一些页面,发现这个问题还很普遍,于是给BackgrounDRb的作者gethemant咨询问题,以下是问题解决过程(需要从下往上读):



Thank you very much for your quickly response, I installed the debian system 1 year ago, the ruby might be installed by manually. Gem also using tar.gz.



Best Regards,


Jesse Cai (蔡望勤)


Blog: http://www.caiwangqin.com


Email: 1@p1.cn


—–邮件原件—–


发件人: gethemant@gmail.com [mailto:gethemant@gmail.com]


发送时间: 2008年10月23日16:37


收件人: Jesse Cai


主题: Re: 答复: backgroundrb service can started, but MiddleMan.all_worker_info is empty.


Your rubygems setup looks weird, because if its set properly, it


should automatically add require “rubygems” on top, because if packet


is install through gem command, each executable will be wrapped in a


script.


Also, packet_worker_runner should be in path. Did you install rubygems


from debian repositories, rather than using tar.gz file? Thats known


to create problem for folks.


On 10/23/08, Jesse Cai <1@p1.cn> wrote:


> I have resolved this problem, the problem is the same as


> http://thr3ads.net/backgroundrb-devel/2008/09/372582-more-on-leopard-problem


> .


> To resolved this problem on Debian :


>


> 1. Add “require ‘rubygems’” to /var/lib/gems/1.8/gems/packet-0.1.


> 14/bin/packet_worker_runner, before require “packet”


>


> 2. ln -s


> /var/lib/gems/1.8/gems/packet-0.1.14/bin/packet_worker_runner /usr/bin/


>


> –


> Best Regards,


> Jesse Cai (蔡望勤)


> Blog: http://www.caiwangqin.com> Email: 1@p1.cn


> 发件人: Jesse Cai [mailto:1@p1.cn]


> 发送时间: 2008年10月23日11:47


> 收件人: ‘gethemant@gmail.com’


> 主题: backgroundrb service can started, but MiddleMan.all_worker_info is


> empty.


> Dear gethemant,


> I’m sorry to trouble you.> i’m trying backgroundrb 1.1, i can start backgroundrb service, but


> MiddleMan.all_worker_info is empty.


> i’m using packet (0.1.14),chronic (0.2.3)


> i have searched from google, and got many same error about : Invalid worker with name notice_worker and key


> /var/lib/gems/1.8/gems/packet-0.1.14/lib/packet/packet_connection.rb:52:in


> `ask_worker’


> Could I have any tips from you?> –


> Best Regards,


> Jesse Cai (蔡望勤)


> Blog: http://www.caiwangqin.com


> Email: 1@p1.cn



Let them talk of their oriental summer climes of everlasting


conservatories; give me the privilege of making my own summer with my


own coals.


http://gnufied.org


Technorati : ,

Del.icio.us : ,


标签:

posted by Caiwangqin, 09:10 | Permalink | 0 comments |

2008-10-10晚10点,新 P1.cn 发布!

2008年10月11日星期六


2008-10-10晚10点,我们发布了新版本的 P1.cn! 本次升级我们主要加强了 朋友管理Dating 、以及 活动管理 。这是一个新的里程碑。


另一个更新是,从这个 Release 开始,P1.cn 已经不再是单纯使用 Ruby on Rails 开发了,出于某些原因(非技术)考虑,在一些市场功能上,我们开始加入 PHP 作为开发语言。









Technorati : , ,
Del.icio.us :

标签: ,

posted by Caiwangqin, 07:11 | Permalink | 0 comments |

《Web开发大全-ROR版》推荐序

2008年8月13日星期三

bd7lx参与写的”莲花宝典”即将出笼:Web开发大全:ROR版, 我之前为此书写了一个推荐序,现在已经可以在China-pub上预订了.


Web开发大全-ROR版


很荣幸应邀为本书写推荐序。


看到样章时,我的第一感觉是亲切。本书的作者都是我的老熟人,而且他们的名字在业内颇具影响力,全书共分10章,虽然未能包含Ruby on Rails的所有方面,但每一章都是从实际经验中总结出的精华。可以毫不夸张的说,只要跟着本书进行一遍学习实践,你就已经完成一个功能全面的网站建设。


我做了十年的程序开发,前三年主要使用Turbo C 2.0,之后七年都在做Web开发。分别使用过ASPPHP.NETJAVA,自从2005年底我尝试使用ROR开发了一个Mushup应用后,我为ROR作为一个Web Framework的惊人表现力欣喜不已。相对于用JAVA开发Web来说,ROR终于让我在奔波了几年后,找到了一双合脚而又好看的皮鞋。


大家都知道二十一世纪最缺乏的是什么,现在这种形式依然没有得到改变,在过去的一年时间里,我们在招聘ROR人才时仍然非常困难。究其原因,我想一方面是学校教育和市场需求的脱节,另一方面是行业协会的无所作为。这本书作为《Programming Ruby中文版》第2版和《应用Rails进行敏捷Web开发》两本翻译之后,由中国人自己书写出版的书籍,是对前两本书进行经验串联,为人才的自我成长提供了良好的工具。


ROR 1.0发布至今的两年多时间里,推动ROR不断发展的源动力是热情高涨的ROR社区。本书的作者们就是来源于各个ROR中文社区,部分内容也与社区紧密相联,这种出书形式颇具创造力。在互联网时代读书,不仅要学会知识点,更要学会从社区解决问题的方法。


我始终认为,最有效的学习模式是师傅带徒弟,无论铁匠还是武林高手。但名师难求,而多位名师同时施教则更为难求。现在博文视点将这个行业里的名师都请到了, 并且将各自的绝招秘籍出版成书,让得到名师变得容易。为知识的传承创造了一个新的模式。


生逢佳世,何其有幸!


蔡望勤


P1.cn


20086月于北京




Technorati :


标签:

posted by Caiwangqin, 02:53 | Permalink | 0 comments |

Interview with Jesse Cai(中文翻译)

2008年8月11日星期一

Interview with Jesse Cai(中文翻译)


与蔡望勤的访谈录


I mentioned in my original article on working in beijingthat I would be chronicling a series of interviews with prominent Rails developers in China. The first person I was able to catch up with is Jesse Cai, founder of chinaonrails.com.


原文中曾提及在北京工作时,我会收录一系列与中国几位比较突出的Rails开发者的访谈。我有幸能够采访到的第一位就是chinaonrails.com的创始人 - 蔡望勤。


Tell us a little about your background (personal and technical)


I’m Jesse Cai, my chinese name is 蔡望勤 (Cai Wang Qin). I started programming in 1997 with Pascal, then Trouble C 2.0, and then 8086 assembly. I lived in southern China from 2001 to 2005, where I worked as a technical consultant for Cyberway, P&G. and made HRMS (human resources management systems) for Flextronics, AutoTec, and EuroTec. My previous experience includes ASP/PHP for 1 year, .NET for 1.5 years and Java for 2.5 years.


I started bloggingin July, 2005 and joined UUZone Inc. at the end of 2005, which was the biggest social networking site in China at the time.


Now i’m based in Beijing working for P1.cn, a fashion oriented social network focused on the emerging Chinese market. Of course, we’re using Rails.


请给我们介绍以下您的背景(个人及技术方面)



我是Jesse Cai,中文名叫蔡望勤。我最早接触编程是在1997年使用Pascal语言,之后依次使用过Trouble C 2.0以及8086 assembly2001年至2005年,我住在中国南方,并为宝洁公司(P&G) ,Cyberway担任技术顾问。同时,为FlextronicsAutoTecEuroTec编写了HRMS(人力资源管理系统)。我的个人经验还包括1年的ASP/PHP1.5年的.NET2.5年的Java编程。



我从20057月开始写博客。在2005年底,加入了当时中国最大的社交网络平台UUZone公司。


目前我住在北京,并在活跃在中国市场的时尚社交网络公司P1.cn工作,当然,我们使用的就是Rails




How did you first happen onto Rails?


When i started working for UUZone at the end of 2005, many web2.0-type sites were emerging and many of them had cool mashup applications. We saw this as an opportunity to join the trend and give give our members the latest and greatest user experience. At the time, we were using Java, and thought that if we built our new mashup application in Java, it would take too long to release. So we thought about using another language or framework optimized for web/mashup development.


Since we were Java oriented, we first found Groovy. It’s a Java-based scripting language, and we can use our existing packages and code, so that seemed pretty cool. But Groovy at that time was 1.0 beta, and there were almost no production applications using Groovy. We used Groovy to prototype an internal version of Delicious for UUZone members, and we finished it in 1 week, so that’s how we got turned on to the rapid prototyping of scripting languages. We then wanted to use Groovy for larger applications, but it wasn’t ready for production. I even exchanged several emails with the Groovy PM and received very fast response. But we never stopped looking for better, simpler way for web development, which lead me to Grails 0.3. Nobody was using it at the time, but that was how I came across Ruby on Rails 0.6, from the Grails site. I watched the video and tried Rails and found it simple and fast enough. Many people said it has performance problem, so I did many performance tests myself and found the results adequate. So I implemented my first Rails app: a UUZone members/photos and Google Map Mashup. After we debuted our app to our members, it received very positive feedback and the project was a very big success. I loved programming like this, so I stuck with Rails ever since.


你最初是如何结识Rails的?


2005年底,在我刚开始为UUZone工作的时候,很多Web2.0类型的网站浮出水面,并带有很多很酷的Mashup程序。我们认为这是一个很好的机会进入到这股潮流中并给我们的会员带来最新最棒的用户体验。那时我们使用的是Java,觉得如果使用Java搭建我们的Mashup程序,会需要太长时间才能上线。所以我们考虑使用另外一种更优化的web/mashup开发语言或框架。


由于我们的技术是Java导向的,我们最先发现了Groovy。这是一种基于Java的编程语言,它支持我们现有的程序包和代码,看起来不错。Groovy在那个时候还处于1.0beta版,而且市面上几乎没有使用Groovy编写的程序产品。我们使用Groovy1周时间内部编写了一套原型:Delicious for UUZone会员。这就是我们如何一步步转化到编程语言的快速成型。从那以后我们就考虑使用Groovy编写更大的程序,但从生产角度来看发现它并没有准备好。我甚至为此和GroovyPM做过几次邮件交流,并得到了很快的回复。但我们并没有因此放弃寻找更好、更简便的网络开发方法。这把我带到了Grails 0.3。那时候并没有人使用它,但这恰恰让我从Grails网站结识了Ruby on Rails 0.6。我看了视频并试用了Rails,觉得它够简单够快。很多人说它工作有问题,所以我自己对其工作做了一系列测试,对结果还是比较满意的。于是我编写了我的第一个Rails程序:一个UUZone会员/照片和Google地图Mashup。在程序首次和会员见面后,得到了很好的凡响,项目非常成功。我非常喜爱这样的编程方式,所以从此就和Rails结下了不解之缘。


Being the creator of Chinaonrails.com, you have a good pulse on the Rails community in China. What are your general thoughts on Ruby/Rails in China?


I created ChinaonRails.com at the beginning of 2006. There were only two books for Ruby on Rals, one was Programming Ruby, another one was Agile Web Development with Ruby on Rails. There were no Chinese books at all, and no Chinese community for Rails. As you know, the best part of Rails is its community!


For Ruby, I think many (Chinese) people have prejudice against it. I don’t know if it’s because it came from Japan or what. Maybe the Chinese education is too focused on Microsoft technologies since they teach Windows in school. Not a lot of people know linux or open source very well. For Rails, there are two kinds of people who use it: one is a senior programmer, they were expert in Java or other language, and the other is a newbie. In China, there are two kinds of companies using Rails: one is outsource consultancy and the other is startups. I haven’t seen many traditional commercial companies using Rails in China, and so it’s a little bit hard to find good Rails developers. I gave a talk at Beijing Institute and Technology University for Rails. The students ddin’t seem very interested, i don’t know why.


Fortunately, the Rails community in China is still growing and more and more good people are starting to be more curious about it.


作为Chinaonrails.com的创始人,你应该非常了解Rails的中国社区。你对中国Ruby/Rails的大体想法是什么?


我在2006年初创建了ChinaonRails.com。那时只有两本关于Ruby on Rails的书籍,一个是Programming Ruby,另一个是Agile Web Development with Ruby on Rails。根本没有Rails的中文书籍和中文社区。你知道的,Rails最好的部分就是它的社区。


我认为很多(中国)人对Ruby存在偏见。我不知道是不是因为它源于日本。也许中国式教育太专注于微软科技,他们在学校都教Windows。没有很多人知道或了解Linux和开源。有两种人群使用Rails:一个是高级编程人员,他们在Java或其它语言上是专家。另一种人群就是初学者。在中国有两种公司使用Rails:一些是外源咨询公司,另一些是刚起步的。我还没有看到多少中国传统商业公司使用Rails,因此找到好的Rails开发者是比较困难的。我曾在北京理工大学针对Rails做过一次讲义。不知道为什么,学生们并不是很感兴趣。


Why hasn’t Rails taken off in China as much as the US or Europe?


As i said, not so many people know it. I think another big reason is there was no organization to push Rails in China. Is US and Europe, there are many RailsConfs, barcamps, but not in China. And the final reason is how do people make money using Rails in China?


为什么Rails在中国还未像在美国欧洲那样普及?


就像我说的,很多人都不知道Rails。而且另外一个主要原因是没有一个组织推进Rails在中国的发展。在欧美有很多RailsConfsbarcamps,但是在中国就没有。还有最后一个原因就是大家如何在中国通过Rails赚钱?


What blogs or podcasts are you a fan of?


Many, I have more than 100 ruby on rails feeds in Google Reader. I especially like peepcode podcasts and Railscasts. I’m learning so many things through blogs and podcasts.


你对什么博客或播客感兴趣?


很多,我在Google Reader有过100的回复。我特别钟爱peepcode播客和Railscasts。我从博客和播客学到了很多东西。


Who would you like to buy a beer for in the Chinese Ruby/Rails community?


bd7lx, he is a hero in the Ruby/Rails community in China. He always brings Ruby/Rails news to the Chinese community, and answers questions frequently.


在中国Ruby/Rails社区你会请谁喝啤酒?


bd7lx, 他是中国Ruby/Rails的英雄人物。他总会给中国社区带来Ruby/Rails的最新消息,并积极答疑。


Who would you like to buy a beer for outside of China?


Hmm, the first guy of course is DHH, but probably many people buy beers for him, so I will take someone else :) . There’s Jason from http://railsenvy.com, Ilya Grigorik from http://igvita.com, Josh Susser from http://blog.hasmanythrough.com, anyone from http://www.engineyard.com, I may need help from them soon, and you - you help bridge the Rails communities in China and English speaking world.


在中国以外的地区你会请谁喝啤酒?


第一个人当然是DHH,不过估计很多人都会给他买啤酒,所以我还是选别人吧 :)。有一个来自http://railsenvy.comJason,来自http://igvita.comIlya Grigorik,来自http://blog.hasmanythrough.comJosh Susser,任何来自http://www.engineyard.com的人,我可能都会很快需要他们的帮助,还有你 - 你帮我为Rails中国社区和英语国家建起了桥梁。


标签:

posted by Caiwangqin, 08:03 | Permalink | 0 comments |

Redmine is really good project management web application

2008年7月28日星期一


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.


Ruby on Rails is great! to setup redmine, just need svn checkout, see Installing Redmine.


I used trac two years ago, which is so complicate setup and use. It’s time to switch to Redmine, i’m sure you will love it.




Technorati :


标签:

posted by Caiwangqin, 11:52 | Permalink | 0 comments |

Presentation of Working with Rails

2007年7月24日星期二

posted by Caiwangqin, 15:10 | Permalink | 0 comments |

Ruby on Rails 根据浏览器语言自动选择站点语言

2007年6月12日星期二

stephen kung 发来的解决方案:


def index
  @header = request.env[’HTTP_ACCEPT_LANGUAGE’]
  case @header
    when /zh-cn.*/
      @location=’china’
    when /en-us.*/
      @location=’english’
    else
      @location=’english’
  end
  render :text => @location
end



read more:


http://wiki.rubyonrails.org/rails/pages/VariablesInRequestEnv


标签:

posted by Caiwangqin, 03:12 | Permalink | 0 comments |

在 Ruby on Rails 中怎样给 link_to 加 class

2007年6月6日星期三


<%= link_to "Link name", { :controller => 'controller_name',
:action => 'action_name' },
:class => 'someclass' -%>


这段时间在闭关修炼,马上就会有新成果提交给大家鉴赏,请稍候。

标签:

posted by Caiwangqin, 08:41 | Permalink | 0 comments |

[团队建设]招聘 CSS 设计人才

2007年5月24日星期四

通过 ChinaonRais 和各位朋友的推荐,成功招聘到了一位 Ruby on Rails 人才。我们需要继续完善团队建设,招聘 CSS 设计人才。希望各位朋友继续帮忙推荐,谢谢。


 


[ 公司介绍可以看这里 12 ]


 


要求从简


北京。


男女不限。


激情、创新、活力。


有基本的美感,注重细节。


全职/可以兼职,但要每周到公司工作1-2天。


对 Web 开发有热情,不断的从工作本身获得快乐。


按 CSS + DIV 标准制作网页,适应 IE6 / IE7 / Firefox .


 


联系我们


发送 email 到 jesse@p1ay.cn ,简单介绍自己的经历。

您过去在网络方面的经验,如果您有过去的作品、成绩的展示,千万要提供出来。


标签:

posted by Caiwangqin, 02:37 | Permalink | 0 comments |

Ruby on Rails 人才计划

2007年5月22日星期二


时下,一方面是公司招聘不到合适的人才,一方面就业形势严峻。结合我们公司的经营特点,我们计划在北航招聘一批写 Ruby on Rails 的软件人才,实施国际项目。


Ruby on Rais 是一门相对较新的语言和技术,可能在校园的学生几乎没有听过,但有相关编程经验的人在指导下可以很快学习,所以我们计划在北航软件学院做几期针对性讲座。



关于亚艺


P1AY.cn 是亚艺网媒科技有限公司开发的网站之一。亚艺网媒科技有限公司是一家瑞典独资的新媒体科技公司,主要从事在线杂志、网络社区等项目的技术开发和运营。



职位需求


Ruby on Rails 开发(全职/兼职)



薪酬待遇


有竞争力的薪水


富有激情,勇于创新,有活力的国际化的团队伙伴



招聘要求


激情、创新、活力


对 Web 开发有热情,不断的从工作本身获得快乐。


有良好的英语能力,公司有一半的人必须使用英语沟通,学习 Ruby on Rails 也必须要阅读英文书箱和资料。



联系我们


发送 email 到 jesse@p1ay.cn ,简单介绍自己的经历。您过去在网络方面的经验,如果您有过去的作品、成绩的展示,千万要提供出来,那比多少文字都要有用。如果有,附上您的ruby on rails作品。



学习资源


http://www.rubyonrails.org


http://chinaonrails.com


http://www.caiwangqin.com


标签:

posted by Caiwangqin, 10:34 | Permalink | 0 comments |

Aptana : The project XXX is supposed to have a ruby nature.

2007年5月14日星期一

在使用Aptana IDE(build 0.2.8.14433)编辑导入的Ruby on Rails项目时,以Ruby Editor方式打开Ruby文件出现”The project XXX is supposed to have a ruby nature.”的错误,以文本编辑器方式打开编辑Ruby文件非常糟糕,从Google查找到Aptana Forums中看到已经有解决方法了:


The problem that’s showing up here is that we do a lot of things under the hood of ruby projects, and to recognize a ruby project we need to set it to have a “ruby nature”.
You can convert an imported existing project:


1. Add the project to your workspace
2. Switch to the Ruby perspective
3. Select the project in the Ruby Resources View
4. Select the menu option: project -> Add Ruby nature.
This should add the ruby nature to your project and it shouldn’t complain any more when you try to open and edit files.



顺便提醒一下:



  1. 使用 Aptana 时需要手动到首选项中配置Ruby和Rails的安装目录。

  2. Aptana 已经在 RadRails 的基础上前进了不少,使用了和 Eclipse 相同方式的管理插件,可以使用 Subclipse 1.2.1 了,而 RadRails 0.7.2 内置的 Subclipse 还是 1.x 的,支持的 Subversion 版本太老,使用过程中可能出现错误,建设使用 Aptana .


标签:

posted by Caiwangqin, 02:57 | Permalink | 0 comments |

我的新玩具 GVIM + Rails

2007年5月9日星期三


我工作的平台是Windows, 很少使用KDE或Gnome, 之前在选择Ruby on Rails编辑工具时,我一直推荐RadRails, 现在发现除了内置的SVN是我喜欢的外,其他没有任何优点,于是我常用UltraEdit来Coding.


这两天决定换到VIM, 由于我在Debian服务器上使用的Editor是VIM, 所以很容易切换, 经过两天的使用,感觉非常棒,分享给大家我所使用的Plugins:



  • GVim - 主程序

  • Rails.vim - Rails Plugin , 非常有效

  • Taglist - 也就是上图中的右边的部分

  • NERD_tree - 有用的文件浏览,上图中左边的部分

  • svncommand.vim - 集成源代码管理工具SVN客户端


其他学习资源:



标签:

posted by Caiwangqin, 04:39 | Permalink | 0 comments |

和孟岩聊Ruby on Rails

2007年4月19日星期四

bd7lx来北京,陪他去CSDN孟岩CSDN是我2001-2002年常去的社区,这次很高兴去到他们的大本营。结果被赶上架一起在摄像机前聊了一期Ruby on Rails, 纯属聊天,没有任何排演,看者不要扔鸡蛋 :)



标签:

posted by Caiwangqin, 02:09 | Permalink | 0 comments |

Ruby 1.8.6 & Rails 1.2.3

2007年3月19日星期一

Ruby 1.8.6 Release:要升级请三思:


Ruby 1.8.6 Release了,想看详细情形,或是下载 Source 请看这里。根据 fixneo 先生的提醒,我花了时间去找了一下 Bug Report ,发现到这篇文章。里面写到 Time.to_date 跟 MD5.new 会出现问题。不过这些 Bug 会在 Rails 1.2.3 做修正,也就是应该是 Rails 的问题?


隔天早上,Rails Team 也立刻发表了 Rails 1.2.3,所以要升级 Ruby 1.8.6也请顺便升级 Rails 1.2.3。



为啥我得升级 Ruby 1.8.6:


为什么我得升级 Ruby 1.8.6?会跟 Rails 冲突,还得一定要升到 Rails 1.2.3 才能够跑 Rails。那么麻烦的 Ruby 版本,为啥我一定要升级?我给你一个原因


Ruby 1.8.6 已经将 FastThread包进去了

也就是说灌 Mongrel 应该不用加装 FastThread 了。我们可以合理推测 Ruby Native 支持总比 Gem 支持来的好不是吗 :p
还有一点,随着 Ruby 1.8.6 的推出,看来下一版的 Mongrel 除了 fastThread,也不用装 cgi_multipart_eof_fix 了。 Ruby 的整合度越高,狗皮膏药越来越少总是一件好事。



标签:

posted by Caiwangqin, 11:12 | Permalink | 0 comments |

积木式网站建设

2007年3月16日星期五


Ruby on Rails让做网站像搭积木一样简单,例如使用acts_as_commentable的方法如下:


* Make you ActiveRecord model act as commentable.
class Model < ActiveRecord::Base
    acts_as_commentable
end
* Add a comment to a model instance
model = Model.new
comment = Comment.new
comment.comment = ‘Some comment’
model.comments << comment
* Each comment reference commentable object
model = Model.find(1)
model.comments.get(0).commtable == model



Plugins:


http://agilewebdevelopment.com/plugins/list


Useful code snippets in Ruby and Ruby on Rails



标签:

posted by Caiwangqin, 11:41 | Permalink | 0 comments |