开发者

Does rails and other gems install documentation anywhere when you install them?

And where can I find it? I'm running OSX.

In addition I have to do a开发者_StackOverflow中文版 lot of work offline while travelling so if anyone can offer any tips for downloadable documentation please let me know.


If you have installed your gems the "normal" way, they install rdoc documentation.

Just run gem server in your console and go to http://localhost:8808 in your browser. There you'll find all available Gems and the RDoc documentation


http://railsapi.com provides you to download offline documentation for:

  • Rails 2.2.2, 2.3.8, 3.0.8
  • Ruby 1.8, 1.9.2
  • Authlogic
  • AWS-S3
  • EventMachine
  • Haml
  • Hpricot
  • Nokogiri
  • Rack
  • Rspec
  • Sinatra

The downloadable file has wonderful jQuery search functionality, so it's pretty useful


@klaustopher's answer didn't work for me directly, so here is how I got this to work for the rspec-expectations gem:

  1. Install gem documentation by either

    • using the --rdoc flag: gem install --rdoc rspec-expectations
    • or by installing rdocs for all gems: gem rdoc --all
  2. Run rdoc server.

gem server

  1. Go to http://localhost:8808 in my browser.

Caveat: at a first glance the rdoc for rspec-expectations is pretty useless. I bet there is a better way to do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜