Rails
gaoshengyang
这个作者很懒,什么都没留下…
展开
-
rails 3.0.x 和mysql2 0.3.x的错误
[size=medium]rails 3.0.x mysql2 0.3.x 执行rake db:create 报如下错误:[/size] [code="ruby"][size=medium]WARNING: This version of mysql2 (0.3.2) doesn't ship with the ActiveRecord adapter bundled anymore as i...原创 2011-05-09 16:46:09 · 107 阅读 · 0 评论 -
rails3中h helper的使用
[size=large]在rails3模板中,默认会将输出的内容进行html编码,即在rails2中用到的h helper,如:[/size] [code="ruby"][/code] [size=large]如果要在rails3模板中,对输出内容进行html解码,需要用到raw helper,如下:[/size] [code="ruby"][/code]...原创 2011-05-09 22:29:51 · 83 阅读 · 0 评论 -
最好的Ruby On Rails教程
[size=large]最好的Ruby On Rails教程 [url]http://guides.rubyonrails.org/[/url][/size]原创 2011-05-17 08:06:20 · 107 阅读 · 0 评论 -
Ruby的include和extend
在ruby中基本上有三种引入module的方式 一、在类定义中引入module后,module中的方法成为类的实例方法。 在类定义中用include引入module。 例如: [code="ruby"]module Base def test p "This is a instance method!" e...原创 2011-07-03 21:56:17 · 160 阅读 · 0 评论 -
Rails3环境下新建Rails2的项目
[size=medium]rails环境从rails2升级到rails3后,用如下命令生成rails2的项目。命令如下: rails _2.3.8_ dept_name[/size]原创 2011-03-25 21:17:37 · 95 阅读 · 0 评论 -
apache+passenger部署rails项目
1、安装apache [code="java"]sudo apt-get install apache2[/code] 打开浏览器,请求http://localhost,出现如下界面,证明安装成功 [code="java"]It works! This is the default web page for this server. The web server soft...原创 2011-04-03 21:42:43 · 284 阅读 · 0 评论