Rails Guides Offline Documentation

Rails Guides offline documentation

The comment of 'Shreyas Satish' led me to the rails guides on my harddisk. I had only to build it.

After installing Ruby (1.8) on Ubuntu:

sudo gem install rails
sudo apt-get install ruby1.8-dev # required for RedCloth
sudo gem install RedCloth
sudo ruby /var/lib/gems/1.8/gems/railties-3.0.7/guides/rails_guides.rb

then browse to:

file:///var/lib/gems/1.8/gems/railties-3.0.7/guides/output/index.html

Ruby and Ruby on Rails offline API documentation

Browser-based Solution – Updated Oct 19, 2017

DevDocs (https://devdocs.io/) uses your browser's IndexedDB to store the documentation you want. Make sure you follow the instructions on how to install the docs before you go offline.


For macOS try Dash

For Windows/Linux try Zeal

For packaged HTML try RubyDocs

Manual Download:

I used this commands on my server so I could get the files faster (they were cached, go figure).

wget -r -k -p http://api.rubyonrails.org/

  • r - recursive
  • k - convert links to point to local files
  • p - get all
    images, etc needed to display the html pages

Then I compress the folder so I can download it without overhead.

rar a -r rails_api.rar api.rubyonrails.org/

  • a - add files
  • r - recursive

https://gist.github.com/2149669

YARD Server

I prefer the yard format over rdoc.

  1. Install the gem gem install yard,
  2. Regenerate all the documentation gem rdoc --all --overwrite, and
  3. Run the server for the gems yard server --gems.

Rails 3: guides.rubyonrails.org in PDF?

You can't get them in PDF, but you can get them in HTML form by running these commands:

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

When these commands have finished you should be in the railties/guides/output folder which contains the HTML versions of the guides that were just generated with ruby rails_guides.rb, and if you're on a decent operating system then you'll see the homepage in your default browser.

Rails API Offline Documentation

You can try https://github.com/passion8/Rails-4-offline-documentation

This worked just fine, with a one-click download that gave me a zip file. Just extract the contents and open the index.html file, and you have a local copy of the Rails 4 API that works exactly like the online copy.

It looks like this is new and is only 4 months old.

Rails website documentation for an older version

http://apidock.com/rails/ has a version scale to see documentation for different versions.

Also official guides have branches for any older versions, e.g. Rails 2.3: http://guides.rubyonrails.org/v2.3.11/, Rails 3.2: http://guides.rubyonrails.org/v3.2.13/

Rails website documentation for an older version

http://apidock.com/rails/ has a version scale to see documentation for different versions.

Also official guides have branches for any older versions, e.g. Rails 2.3: http://guides.rubyonrails.org/v2.3.11/, Rails 3.2: http://guides.rubyonrails.org/v3.2.13/

Offline Rails Dev Enviornment

I had a similar experience. First thing I ran into was needing some documentation (rails guides, API docs). Sounds like you've already got that part. Next issue I ran into was external JavaScript dependencies (jQuery). I was using the Google CDN but that didn't work when I was offline. Make sure you have local copies of any files you usually get from a CDN. As far as gem dependencies, make sure you bundle install before you get on the plane. There's no way for me to know what gems you're going to need, but if all you need is built into rails, then doing bundle install will make sure you have all the gems you will need.

Offline documentation for various programming languages?

Most language should provide that.

Some examples:

Java: Java SE 6 docs (below on the page)

Perl: Unix versions of perl typically come with full docs as manpages and perldoc (some Linux distributions put these into extra packages); I suppose Windows versions do the same

C: the GNU libc library has downloadable docs



Related Topics



Leave a reply



Submit