api.rubyonrails.org previous versions?

First, let me say that api.rubyonrails.org is awesome. Whoever is hosting it - thank you. It blows all the other api tools out of the water in terms of usability. Yay!

That said, how come Ruby on Rails API doesn’t show me the 3.0.15 docs? 3.0.x is still actively maintained and supported. What about any other old version. I’m sure some folks would find this very useful. It is exceedingly difficult to get decent-to-use docs for old versions of rails.

Think we can make that happen somehow?

Love,

Josh

P.S. Same could be said for the guides.rubyonrails.org. I’m aware http://guides.rubyonrails.org/v2.3.8/ is available, but that’s just because it’s ingrained. As far as I can tell it’s not readily linked to anymore. Are there other versions of the guides?

First, let me say that api.rubyonrails.org is awesome. Whoever is hosting it - thank you. It blows all the other api tools out of the water in terms of usability. Yay!

That said, how come Ruby on Rails API doesn't show me the 3.0.15 docs? 3.0.x is still actively maintained and supported. What about any other old version. I'm sure some folks would find this very useful. It is exceedingly difficult to get decent-to-use docs for old versions of rails.

Think we can make that happen somehow?

Have you tried apidock yet? That has a picker for what version you are using, and shows when a particular function was deprecated. Very handy for this sort of thing.

Walter

First, let me say that api.rubyonrails.org is awesome. Whoever is hosting it - thank you. It blows all the other api tools out of the water in terms of usability. Yay!

That said, how comehttp://api.rubyonrails.org/v3.0.15doesn’t show me the 3.0.15 docs? 3.0.x is still actively maintained and supported. What about any other old version. I'm sure some folks would find this very useful. It is exceedingly difficult to get decent-to-use docs for old versions of rails.

Think we can make that happen somehow?

even if the powers that be don't want to make it happen

cd your_app touch README.rdoc rake doc:rails

This will dump the rdoc documentation for the rails version in doc/ api.

Unfortunately at the moment that will use a different template to api.rubyonrails.org (if you're using an older version of rails it might not matter)

You can hack things by:

- adding sdoc to your bundle - edit documentation.rake (in the railties gem) and add

require 'sdoc' #at the top of the file

Change the options passed to rdoc in the rails task

rdoc.options << '--line-numbers' rdoc.options << '-f' << 'sdoc' rdoc.options << '-T' << 'rails' rdoc.options << '-e' << 'UTF-8'

Remove doc/api, rerun rake doc:api and you should have api docs that look like the ones on api.rubyonrails.org (you need to serve them through an actual web server (e.g. thin -A file start), the links don't work when accessed via file:/// urls)

You can generate the guides too. First check that you have the RedCloth gem in your bundle. then run rake doc:guides and all the guides will be generated in doc/guides

P.S. Same could be said for the guides.rubyonrails.org. I'm awarehttp://guides.rubyonrails.org/v2.3.8/is available, but that's just because it's ingrained. As far as I can tell it's not readily linked to anymore. Are there other versions of the guides?

The guides front page links to Ruby on Rails guides Seems like you can pop any 3.1.x or 3.2.x version number in there

Fred

Yea, I know how to generate my own docs, and apidock is… okay. Both of the proposed solutions so far are missing the point. api.rubyonrails.org should host, at a minimum, all currently supported versions. Once that’s done it should be trivial to support as far back as the docs remain in the same format.

I strongly support Josh’s opinion. It’s extremely hard to find information on specific rails versions and you can’t even tell which version you’re currently following when you’re reading a guide. It’s a pity that the maintainers seem to not care much about people not living on the edge. What about a delivery point where people could drop the documentation they’ve generated for specific releases and make it available to the community? MySQL for example has a full set of documentation for each release …

Is this still a discussion? Me and my colleagues regularly work on outdated rails versions and we would like to know what/where/why things originated, got changed, got deprecated, got removed.

I would be more than happy to work with someone from the rails team and prepare an APIDock style “versioning toggle” or something else that we can use in the docs.

1 Like

There was a PR for this but it looks like it’s now closed and since this discussion was last active in 2014 I’ll add this here instead of the PR. I was curious how this was handled with the Rails guides and it actually closely mirrors the PR for docs.

The guides provide static links to major releases on the welcome(root for that version) page: rails/_welcome.html.erb at 4cfaa225bbd22d1856640833e81759e23fa6b83a · rails/rails · GitHub

And the API docs are versioned into a folder as well:

  • Docs: https://api.rubyonrails.org/v6.0/
  • Guides: https://guides.rubyonrails.org/v6.0/

With these static links they can easily be rendered as a list or a dropdown selector but version changes/presence of methods seems like a pretty big lift.

Side note, API doc also hasn’t been updated in 2 years for Rails docs it looks like. Does anyone know how API Dock is maintained? It looks like a skin over Redmine possibly. Nodeta, the company that manages API Dock also looks to be defunct as their website and blog are gone.

Did some more digging and here’s a PR when the theme for docs was updated a bit with some SEO additions and other enhancements.

@hidr0 It also looks like @zzak has some open issues related to improvements to the docs, probably worth a peruse to see if there’s anywhere you’d like to contribute.

1 Like