Archive for the 'Ruby' Category
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
<%= link_to "Link name", { :controller => 'controller_name', :action => 'action_name' }, :class => 'someclass' -%>
这段时间在闭关修炼,马上就会有新成果提交给大家鉴赏,请稍候。
序
时下,一方面是公司招聘不到合适的人才,一方面就业形势严峻。结合我们公司的经营特点,我们计划在北航招聘一批写 Ruby on Rails 的软件人才,实施国际项目。
Ruby on Rais 是一门相对较新的语言和技术,可能在校园的学生几乎没有听过,但有相关编程经验的人在指导下可以很快学习,所以我们计划在北航软件学院做几期针对性讲座。
关于亚艺
P1AY.cn 是亚艺网媒科技有限公司开发的网站之一。亚艺网媒科技有限公司是一家瑞典独资的新媒体科技公司,主要从事在线杂志、网络社区等项目的技术开发和运营。
职位需求
Ruby on Rails 开发(全职/兼职)
薪酬待遇
有竞争力的薪水
富有激情,勇于创新,有活力的国际化的团队伙伴
招聘要求
激情、创新、活力
对 Web 开发有热情,不断的从工作本身获得快乐。
有良好的英语能力,公司有一半的人必须使用英语沟通,学习 Ruby on Rails 也必须要阅读英文书箱和资料。
联系我们
发送 email 到 jesse@p1ay.cn ,简单介绍自己的经历。您过去在网络方面的经验,如果您有过去的作品、成绩的展示,千万要提供出来,那比多少文字都要有用。如果有,附上您的ruby on rails作品。
学习资源
在使用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.
顺便提醒一下:
- 使用 Aptana 时需要手动到首选项中配置Ruby和Rails的安装目录。
- Aptana 已经在 RadRails 的基础上前进了不少,使用了和 Eclipse 相同方式的管理插件,可以使用 Subclipse 1.2.1 了,而 RadRails 0.7.2 内置的 Subclipse 还是 1.x 的,支持的 Subversion 版本太老,使用过程中可能出现错误,建设使用 Aptana .
希望使用Ruby on Rails实现一个server push的短消息系统,很多人都在介绍Comet,说是用于Server Push的Ajax. 在RubyForge也有一个叫Juggernaut的插件,说是 allowing the server to push data to the client,有需要可以试试。
参考:
http://ajaxian.com/archives/juggernaut-comet-for-rails
http://ajaxian.com/archives/comet-a-new-approach-to-ajax-applications










