This project is archived and is in readonly mode.
[PATCH] Rake doc:rails Failing
Reported by codehugger | January 15th, 2010 @ 02:09 PM | in 3.0.2
Rake task doc:rails fails with the following output when running from a newly created Rails 3.0.pre project:
$ rake doc:rails
rm -r doc/api
rake aborted!
Don't know how to build task 'vendor/rails/railties/CHANGELOG'
(See full trace by running task with --trace)
Comments and changes to this ticket
-
codehugger January 15th, 2010 @ 02:13 PM
- Tag changed from doc, rails3, rake, tasks to bugmash, doc, rails3, rake, tasks
-
Rizwan Reza January 16th, 2010 @ 08:15 AM
The problem is that rails is not in the vendor directory. This works if you try after pasting rails dir in vendor.
-
codehugger January 18th, 2010 @ 02:15 PM
I am using an installed version of rails 3.0.pre (by means of rake install from source directory)
-
makevoid January 23rd, 2010 @ 07:40 AM
- 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 January 24th, 2010 @ 09:02 AM
- 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 January 24th, 2010 @ 09:19 PM
- 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 January 29th, 2010 @ 10:54 PM
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 January 29th, 2010 @ 10:59 PM
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 February 9th, 2010 @ 02:52 PM
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 February 12th, 2010 @ 12:31 PM
- State changed from resolved to open
-
José Valim February 16th, 2010 @ 11:28 PM
- 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 February 17th, 2010 @ 08:12 AM
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 February 17th, 2010 @ 08:19 AM
Couldn't you simply load the "bundler.rb" file at the root of the rails source?
-
Rizwan Reza March 10th, 2010 @ 06:03 PM
- 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 March 10th, 2010 @ 06:17 PM
- Assigned user changed from Rizwan Reza to José Valim
-
José Valim March 11th, 2010 @ 12:46 PM
- State changed from verified to committed
-
Rizwan Reza March 27th, 2010 @ 01:43 PM
- 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 March 29th, 2010 @ 01:43 AM
- State changed from open to resolved
(from [de2b0147d04d5460e576cc21afbb062eb012ea7e]) Reapply Rizwan's patch, but memoize Bundler.load.specs in an ivar. [#3697 state:resolved]
Signed-off-by: wycats wycats@gmail.com
http://github.com/rails/rails/commit/de2b0147d04d5460e576cc21afbb06... -
Gabe da Silveira April 12th, 2010 @ 09:48 PM
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::AlreadyDefinedToken
Which 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.
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Medium
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 3697 [PATCH] Rake doc:rails Failing (from [de2b0147d04d5460e576cc21afbb062eb012ea7e]) Reapply...