- 浏览: 2076075 次
- 性别:
- 来自: NYC
文章分类
- 全部博客 (628)
- Linux (53)
- RubyOnRails (294)
- HTML (8)
- 手册指南 (5)
- Mysql (14)
- PHP (3)
- Rails 汇总 (13)
- 读书 (22)
- plugin 插件介绍与应用 (12)
- Flex (2)
- Ruby技巧 (7)
- Gem包介绍 (1)
- javascript Jquery ext prototype (21)
- IT生活 (6)
- 小工具 (4)
- PHP 部署 drupal (1)
- javascript Jquery sort plugin 插件 (2)
- iphone siri ios (1)
- Ruby On Rails (106)
- 编程概念 (1)
- Unit Test (4)
- Ruby 1.9 (24)
- rake (1)
- Postgresql (6)
- ruby (5)
- respond_to? (1)
- method_missing (1)
- git (8)
- Rspec (1)
- ios (1)
- jquery (1)
- Sinatra (1)
最新评论
-
dadadada2x:
user模型里加上 protected def email ...
流行的权限管理 gem devise的定制 -
Sev7en_jun:
shrekting 写道var pattern = /^(0| ...
强悍的ip格式 正则表达式验证 -
jiasanshou:
好文章!!!
RPM包rpmbuild SPEC文件深度说明 -
寻得乐中乐:
link_to其实就是个a标签,使用css控制,添加一个参数: ...
Rails在link_to中加参数 -
aiafei0001:
完全看不懂,不知所然.能表达清楚一点?
"$ is not defined" 的问题怎么办
Update April 21, 2008: Delynn Berry now has a new CHM file up for Rails version 2.0.2 with a much better index and fewer broken links than what I was able to create. Get it here.
CHM (compiled HTML Help) is arguably one of the better Microsoft inventions and generating these files from Ruby on Rails documentation is should be easy using Rdoc.
A general article on the different ways of generating Rails offline documentation is here.
The Rdoc approach is described in this article:
http://wiki.rubyonrails.org/rails/pages/HowToGenerateChmForRails
Older (and possibly newer in the future) CHM files created using this technique are here: http://delynnberry.com/projects/rails-chm-documentation
These are the basic rdoc instructions:
The core command is:
rdoc -f chm -o chm_folder action* rails-*
which you have to run in
C:\ruby\lib\ruby\gems\1.8\gems\
(assuming c:\ruby is your ruby directory).
You might (or will likely) get this error:
rails-2.0.1/lib/rails_generator/generators/components/controller/templates/controller.rb:3:15: Expected class name or ‘<
<’. Got RubyToken::TkLT: “<”
This is the offending file:
C:\ruby\lib\ruby\gems\1.8\gems\rails-2.0.2\lib\rails_generator\generators\components\controller\templates\controller.rb
You can exclude this file by altering the command like so:
rdoc -f chm -o chm_folder action* rails-* -x controller.rb
It should then run up to this point.
Generating CHM…
C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1293:in `initialize’: Invalid argument - classes/<.html (Errno::EINVAL)
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1293:in `open’
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1293:in `gen_into’
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1289:in `each’
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1289:in `gen_into’
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1277:in `generate_html’
from C:/ruby/lib/ruby/1.8/rdoc/generators/html_generator.rb:1197:in `generate’
from C:/ruby/lib/ruby/1.8/rdoc/generators/chm_generator.rb:38:in `generate’
from C:/ruby/lib/ruby/1.8/rdoc/rdoc.rb:284:in `document’
from C:/ruby/bin/rdoc:62
This is quite hard to work around and some suggest you should just compile help for the action* packages:
rdoc -f chm -o chm_folder action*
which contain enough documentation to get by with most daily tasks.
Update March 2, 2008: The technique described by Michael in the comments using the command
rdoc -f chm -o chm_folder action* rails-* -x template/*
works fine to create a chm file. However, I use this technique only to create the index.hhk file which I then use in the following HTML Help “manual” process, which IMHO leads to a better linked document and nicely inlined source code:
- Download the Rails Project files from here: http://rubyforge.org/frs/?group_id=307 and unzip to your hard drive.
- Download HTML Help Workshop and install (which you need for the above rdoc technique as well).
- Start HTML Help Workshop and create a new project:
Give it a descriptive name (damn, is that a real wizard on the left?!; I guess those were the good old days):
In the Existing Files step, select just HTML files:
Click add:
Navigate to the <folder you unzipped rails to>\rails\doc\api:
Select only the index.html file:
The project is created.
Go to the Contents tab:
Give it a name and save:
Optionally do the same for index (I haven’t had any luck generating an index file).
Update March 2, 2008: Simply navigate to the index.hhk file generated using the
rdoc -f chm -o chm_folder action* rails-* -x template/*
command. This index will work only partly and many links will be dead but many work, so…
Set the project options as follows:
Make sure the Default file is set to “index.html”, not the full path:
Select “Automatically create content file (.hhc) when compiling”:
I was so far unable to create an index, so checking “Include keywords from HTML files” has no effect for me.
Set “Compile full-text search information”:
Fire “Save all and compile”. You should get a searchable CHM file with the Rails documentation.
Here is the resulting CHM file, now with (rudimentary and flaky) index. Enjoy.
Update March 2, 2008: I’ve uploaded a new version of the CHM file, now with an index I generated with the technique described by Michael (see comments below). However, the index works only party, many links are broken. But it’s better than nothing I guess.
And finally, some non-Windows CHM readers (thanks to Delynn Berry):
-
Chamonix - OS X
-
Chmox - OS X
-
GnoCHM - Linux
-
KchmViewer - Linux
http://dirk.net/2007/12/30/generate-ruby-on-rails-chm-documentation/
发表评论
-
Destroying a Postgres DB on Heroku
2013-04-24 10:58 935heroku pg:reset DATABASE -
VIM ctags setup ack
2012-04-17 22:13 3259reference ctags --extra=+f --e ... -
alias_method_chain方法在3.1以后的替代使用方式
2012-02-04 02:14 3295alias_method_chain() 是rails里的一个 ... -
一些快速解决的问题
2012-01-19 12:35 1472问题如下: 引用Could not open library ... -
API service 安全问题
2011-12-04 08:47 1386这是一个长期关注的课题 rest api Service的 ... -
Module方法调用好不好
2011-11-20 01:58 1349以前说,用module给class加singleton方法,和 ... -
一个ajax和rails交互的例子
2011-11-19 01:53 1908首先,这里用了一个,query信息解析的包,如下 https: ... -
Rails 返回hash给javascript
2011-11-19 01:43 2277这是一个特别的,不太正统的需求, 因为,大部分时候,ajax的 ... -
关于Rubymine
2011-11-18 23:21 2267开个帖子收集有关使用上的问题 前一段时间,看到半价就买了。想 ... -
ruby中和javascript中,动态方法的创建
2011-11-18 21:01 1241class Klass def hello(*args) ... -
textmate快捷键 汇总
2011-11-16 07:20 8147TextMate 列编辑模式 按住 Alt 键,用鼠标选择要 ... -
Ruby面试系列六,面试继续面试
2011-11-15 05:55 2025刚才受到打击了,充分报漏了自己基础不扎实,不肯向虎炮等兄弟学习 ... -
说说sharding
2011-11-13 00:53 1492这个东西一面试就有人 ... -
rails面试碎碎念
2011-11-12 23:51 1946面试继续面试 又有问ru ... -
最通常的git push reject 和non-fast forward是因为
2011-11-12 23:29 17216git push To git@github.com:use ... -
Rails 自身的many to many关系 self has_many
2011-11-12 01:43 2738简单点的 #注意外键在person上people: id ... -
Rails 3下的 in place editor edit in place
2011-11-12 01:20 946第一个版本 http://code.google.com/p ... -
Heroku 的诡异问题集合
2011-11-11 07:22 1697开个Post记录,在用heroku过程中的一些诡异问题和要注意 ... -
SCSS 和 SASS 和 HAML 和CoffeeScript
2011-11-07 07:52 12960Asset Pipeline 提供了内建 ... -
Invalid gemspec because of the date format in specification
2011-11-07 02:14 2122又是这个date format的错误。 上次出错忘了,记录下 ...
相关推荐
### Flexible Rails: Flex3 on Rails2 #### 关于Flexible Rails 本书《Flexible Rails: Flex 3 on Rails 2》由Peter Armstrong撰写,旨在探讨如何结合使用Flex 3和Rails 2来开发高效的富互联网应用程序(Rich ...
《深入浅出Rails》将使你的编程和生产力达到最大值。你将学习一切Rails scaffolding的基本原理,以创建自定义的交互式网络应用程序,全部使用Rails的一套丰富的工具和MVC框架。 你将掌握数据库交互、Ajax和XML的集成...
Rails::API 是 Rails 的精简版本,针对不需要使用完整 Rails 功能的开发者。 Rails::API 移除了 ActionView 和其他一些渲染功能,不关心Web前端的开发者可更容易、快速地开发应用程序,因此运行速度比正常的 Rails ...
RailsConsole 工具包 :wrench: :toolbox: 可配置的 Rails 控制台助手更快地查找记录,添加自定义助手,将您的控制台寿命提高 100%。安装将此行添加到应用程序的 Gemfile 中: gem 'rails_console_toolkit' 然后生成...
本参考手册是学习Rails 2.2.2的重要资源,特别适合初学者和有一定经验的开发者。它提供了详尽的API文档,帮助开发者深入理解Rails框架中的各个组件和方法。以下是一些关键的知识点: 1. **MVC架构**:Rails的核心...
Rails的秘密 此gem将config/secrets.yml从Rails 4.1 config/secrets.yml移植到Rails 4.0应用程序。 安装 将此行添加到您的应用程序的Gemfile中: gem 'rails-secrets' 然后执行: $ bundle 或将其自己安装为: ...
标题 "在Rails中使用RSpec生产CHM文档" 暗示了这个话题是关于如何在Ruby on Rails(简称Rails)框架中使用RSpec测试工具来创建帮助文档,特别是以CHM(Microsoft Compiled HTML Help)格式。CHM文件是一种常见的...
Rails ::虚拟 使用RSpec或Test :: Unit为引擎生成虚拟应用程序的简单任务。 安装 将此行添加到您的应用程序的Gemfile中: gem 'rails-dummy' 然后执行: $ bundle 或自己安装为: $ gem install rails-dummy ...
12. **部署**:手册还将涵盖如何将Rails应用部署到生产环境,如Heroku、AWS或自己的服务器,以及配置Nginx和Passenger等服务器。 通过深入学习和实践Rails开发手册中的内容,开发者能够掌握构建高效、可维护的Rails...
标题中的“rails3 api chm格式”指的是一个关于Rails 3框架API的离线帮助文档,采用CHM(Microsoft Compiled HTML Help)格式。这种格式通常用于制作电子书或技术文档,便于用户在没有网络连接的情况下查阅。Rails是...
Web开发:Ruby on Rails.pdf
Rails的设置 Ruby gem通过将ActiveRecord实例的设置作为序列化的Hash存储在单独的数据库表中来处理ActiveRecord实例的设置。 包括命名空间和默认值。 要求 Ruby 2.4或更高版本 Rails 4.2或更高版本(包括Rails 6) ...
本书教您如何使用Ruby on Rails开发和部署真正的,具有工业实力的Web应用程序,Ruby on Rails是为诸如Twitter,Hulu,GitHub和Yellow Pages等顶级网站提供支持的开源Web框架。
rails-timeago提供了一个timeago_tag助手来创建可用于插件的时间标签。 安装 将此行添加到您的应用程序的Gemfile : gem 'rails-timeago' , '~> 2.0' 然后执行: $ bundle 或将其自己安装为: $ gem install ...
$ rails g kickbox_rails:install 用法 # Rails class Person < ActiveRecord::Base validates_kickbox_email_format :email # OR validates :email, kickbox_email_format: { message: 'Email
在这个"rails本地安装包完整版"中,包含了Rails 2.1.0版本的关键组件,这些组件是Rails框架的核心部分。 1. **activesupport-2.1.0.gem**:ActiveSupport是Rails的一个重要库,提供了许多实用的工具和方法,如时间...
《敏捷Web开发与Rails:程序指南 第四版》是一本深度探讨使用Ruby on Rails框架进行敏捷Web应用开发的专业书籍。本书旨在帮助开发者充分利用Rails 4的特性,提高开发效率,实现快速迭代和高质量的代码编写。 Rails是...
Errawr :: Rails 使用Errawr在Rails中引发和渲染错误安装将此行添加到您的应用程序的Gemfile中: gem 'errawr-rails'然后执行: $ bundle或将其自己安装为: $ gem install errawr-rails用法入门要开始在Rails中引发...
2020年7月:Rails 6现在建议使用来管理前端依赖项。 感谢所有使npm-pipeline-rails成功进行实验的贡献者。 npm-pipeline-rails 将npm用作Rails资产管道的一部分 npm-pipeline-rails允许您使用任何工具链在 4.2+中...