Rails 3:以PDF格式指南.rubyonrails.org?

don*_*ald 15 ruby-on-rails ruby-on-rails-3

哪里可以找到PDF格式的Rails 3指南以便离线阅读?

谢谢

Rya*_*igg 45

您无法以PDF格式获取它们,但可以通过运行以下命令以HTML格式获取它们:

git clone git://github.com/rails/rails.git
cd rails
git checkout origin/3-2-stable -b 3-2-stable
cd railties/guides
ruby rails_guides.rb
cd output
open index.html
Run Code Online (Sandbox Code Playgroud)

当这些命令完成后,你应该在railties/guides/output包含刚刚生成的指南的HTML版本的文件夹中ruby rails_guides.rb,如果你在一个不错的操作系统上,那么你将在默认浏览器中看到主页.

  • 如果您还没有RedCloth gem,则可能需要'$ gem install RedCloth'. (7认同)

aal*_*cia 8

我正在使用rails 4 rc1,所以@ ryan-bigg在接受的答案中提供的说明不起作用.我在Ruby on Rails指南中找到了解决方案:

git clone git://github.com/rails/rails.git
cd rails/guides
bundle install
bundle exec rake guides:generate:html
Run Code Online (Sandbox Code Playgroud)

现在我在rails/guides/output文件夹中有HTML指南.


Rol*_*ndo 6

我在http://ruby.kyoto-wu.ac.jp/RailsDocs/(Ruby on Rails Guides(v4.2.0)上找到它们为pdf或html)