This project is archived and is in readonly mode.
[PATCH] Rake doc:rails Failing
-
codehugger
- Tag changed from doc, rails3, rake, tasks to bugmash, doc, rails3, rake, tasks
-
Rishav Rastogi
Problem exists with ruby 1.8.7 and ruby 1.9.1
-
Rizwan Reza
The problem is that rails is not in the vendor directory. This works if you try after pasting rails dir in vendor.
-
codehugger
I am using an installed version of rails 3.0.pre (by means of rake install from source directory)
-
makevoid
- Tag changed from bugmash, doc, rails3, rake, tasks to bugmash, bundler, doc, rails3, rake, tasks
The problem is that rails is not in the vendor directory. This works if you try after pasting rails dir in vendor.
Rizwan you are right, putting rails in vendor/rails will generate the doc, but bundler links already rails into vendor/gems/ruby/#{version}/gems..., could rake pick from it?
-
Rizwan Reza
- Milestone cleared.
- Tag changed from bugmash, bundler, doc, rails3, rake, tasks to bundler, doc, patch, rails3, rake, tasks
- State changed from new to verified
- Assigned user set to José Valim
- Title changed from rake doc:rails failing to [PATCH] Rake doc:rails Failing
Attached patch is a revamp of the rake documentation task. Here are some of the changes:
- It takes bundler into account.
- It now includes ActiveModel.
- You can specify Rails path to generate documentation from there.
- There is an easier way to change versions now.
- The task itself is refactored a bit, so it's easier to include more paths when needed.
I've reapplied it to master and generated documentation by both specifying a path and without it.
-
Rizwan Reza
- State changed from verified to resolved
This is now fixed.
rake doc:rails should work if you've already done gem bundle. If not, you can use rake doc:rails RAILS_PATH="path/to/rails" to generate docs from that rails directory.
-
trevor
this didn't work -
% rake doc:rails rake aborted!
Don't know how to build task 'vendor/gems/gems/actionmailer-3.0.pre/README'this does -
% rake doc:rails RAILS_PATH="vendor/gems/ruby/1.9.1/gems/rails-3.0.pre"
-
Rizwan Reza
That's the reason why I had to alter the task to have a RAILS_PATH argument. Until Bundler is not finalized, I think it's better to keep it as is. I'll surely submit a patch once things get final. Thanks.
-
trevor
seems to have changed when moving to rails 3.0.0.beta. when installing the gems, the rdoc for the libraries are generated, and for rails and railties i get this error through gem server:
`/doc_root/rails-3.0.0.beta/rdoc/index.html' not found. `/doc_root/railties-3.0.0.beta/rdoc/index.html' not found.
trying to generate via doc:rails isn't working for me -
% rails -v Rails 3.0.0.beta % ruby -v ruby 1.9.2dev (2010-02-03 trunk 26544) [x86_64-darwin10.2.0] % rails myapp % cd myapp % rake doc:rails rake aborted! Don't know how to build task 'vendor/gems/gems/actionmailer-3.0.0.beta/README' /usr/local/lib/ruby/1.9.1/rake.rb:1720:in []' /usr/local/lib/ruby/1.9.1/rake.rb:603:inblock in invoke_prerequisites' % mkdir -p vendor/gems/gems % cp -R /usr/local/lib/ruby/gems/1.9.1/gems/*.beta vendor/gems/gems % mv vendor/gems/gems/actionmailer-3.0.0.beta vendor/gems/gems/actionmailer % mv vendor/gems/gems/actionpack-3.0.0.beta vendor/gems/gems/actionpack % mv vendor/gems/gems/activemodel-3.0.0.beta vendor/gems/gems/activemodel % mv vendor/gems/gems/activerecord-3.0.0.beta vendor/gems/gems/activerecord % mv vendor/gems/gems/activeresource-3.0.0.beta vendor/gems/gems/activeresource % mv vendor/gems/gems/activesupport-3.0.0.beta vendor/gems/gems/activesupport % mv vendor/gems/gems/rails-3.0.0.beta vendor/gems/gems/rails % mv vendor/gems/gems/railties-3.0.0.beta vendor/gems/gems/railties % rake doc:rails RAILS_PATH="vendor/gems/gems" rake aborted! Don't know how to build task 'vendor/gems/gems/railties/MIT-LICENSE' /usr/local/lib/ruby/1.9.1/rake.rb:1720:in []' /usr/local/lib/ruby/1.9.1/rake.rb:603:inblock in invoke_prerequisites'
-
Rizwan Reza
- State changed from resolved to open
-
José Valim
- Assigned user changed from José Valim to Rizwan Reza
Bundler paths should not change from now on. Rizwan, can you please provide a new patch? Please assign to me when you are done.
-
Rizwan Reza
I will provide a new patch.
Currently, I see that vendor/cache has all the .gems files, rather than open
directories as before. Also, though I see docs in my /usr/local/lib/.../gems
area, I don't think it's okay to use that path, isn't it? Any ideas? -
José Valim
Couldn't you simply load the "bundler.rb" file at the root of the rails source?
-
Rizwan Reza
- State changed from open to verified
Thanks to Yehuda for the API help on Bundler, the attached patch now supports Bundler. I have tested it by both providing a path to rails edge and with installed rails 3 beta gems. Also, I have removed the need of environment variable RAILS_PATH that I added before, it is not needed anymore.
This applies cleanly on master.
-
Rizwan Reza
- Assigned user changed from Rizwan Reza to José Valim
-
José Valim
- State changed from verified to committed
-
Rizwan Reza
- State changed from committed to open
- Assigned user changed from José Valim to Rizwan Reza
Reverted back by Jeremy Kemper. Will work on this one.
-
Rizwan Reza
- State changed from open to resolved
(from [de2b0147d04d5460e576cc21afbb062eb012ea7e]) Reapply Rizwan's patch, but memoize Bundler.load.specs in an ivar. [#3697 [PATCH] Rake doc:rails Failing state:resolved]
Signed-off-by: wycats wycats@gmail.com
http://github.com/rails/rails/commit/de2b0147d04d5460e576cc21afbb06... -
Gabe da Silveira
I haven't had time to dig into this yet, but on beta2 under 1.8.7 with bundled gems cached in vendor/cache I get:
uninitialized constant RubyToken::AlreadyDefinedTokenWhich appears to be a known issue going back several years (http://rubyforge.org//tracker/index.php?func=detail&aid=18026&a...)
If I have time I'll take a deeper look, but I thought I'd post here in case it's obvious to anyone what the problem is.
