Defect #10965

rake yard does not work for generating documentation.

Added by Antoine Rodriguez about 10 years ago. Updated about 10 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Documentation
Target version:2.0.1
Resolution:Fixed Affected version:2.0.0

Description

Procedure to reproduce the trouble :
  1. Install Yard : gem install yard
  2. Generate documentation, from root redmine folder : rake yard
Symptoms are :
  • rake yard ends with error :
    rake aborted!
    Don't know how to build task 'yard'
    
    (See full trace by running task with --trace)
    
Environment:
  • Redmine version: 2.0.0.stable
  • Ruby version: 1.8.7 (x86_64-linux)
  • Rails version: 3.2.3
  • Environment: production
  • Database adapter: MySQL
  • Yard : 0.8.1

output.txt Magnifier - output of the "rake yard" command containing warnings (38.5 KB) Antoine Rodriguez, 2012-05-22 13:44

Associated revisions

Revision 9701
Added by Etienne Massip about 10 years ago

Added yard to development gems.

History

#1 Updated by Etienne Massip about 10 years ago

  • Status changed from New to Resolved
  • Target version set to 2.0.1
  • Resolution set to Fixed

Thanks, fixed with r9701.

#2 Updated by Antoine Rodriguez about 10 years ago

Applied the fix but nothing has changed .... still having the same error.

Best regards,

#3 Updated by Etienne Massip about 10 years ago

Did you bundle install?

#4 Updated by Antoine Rodriguez about 10 years ago

I've installed 2.0.0 with the bundle at rubyforge.

Then I've applied the 3 releases(up to r9701)

I've restarted

And tried under production and then under development RAILS_ENV var

Did I miss something ?

Best regards,

#5 Updated by Etienne Massip about 10 years ago

Yes, you need to do a bundle install to update your bundle.

#6 Updated by Antoine Rodriguez about 10 years ago

I've made it and nothing changed ... still having the issue.

However I've already installed yard before as I've mentioned in the ticket. shall I uninstall it and make a bundle install ?

#7 Updated by Etienne Massip about 10 years ago

rake yard is designed to run on development (like rdoc) so you have to include the development group in your bundle and run rake in development RAILS_ENV.

If you have bundle install --without development ... in the first place then bundle install won't change your bundle since --without is a remembered option, so you have to delete and recreate your bundle.

#8 Updated by Antoine Rodriguez about 10 years ago

I've deleted the .bundle folder inside the redmine root folder and made a bundle install without any other option.

After the completion of the command I've made the following :
  1. export RAILS_ENV=development
  2. rake yard

rake yard worked but with a lot of warnings.

At the end the doc has been generated into the doc/app folder inside the redmine root folder.

You can appreciate the warnings inside the output.txt that I've uploaded with this message.

Thank you very much. Original bug is fixed.

#9 Updated by Jean-Philippe Lang about 10 years ago

  • Target version changed from 2.0.1 to 2.1.0

Not sure that this one is really needed in the core. I think that Gemfile.local would be a more appropriate place to add it for those who want to use extra rake tasks. Any suggestions?

#10 Updated by Antoine Rodriguez about 10 years ago

What would be the advantages of putting it in the Gemfile.local instead than the core knowing that it is equaly important than the project ?

Best regards,

#11 Updated by Jean-Philippe Lang about 10 years ago

Antoine Rodriguez wrote:

What would be the advantages of putting it in the Gemfile.local instead than the core knowing that it is equaly important than the project ?

I think that > 99% of users won't need it.

#12 Updated by Etienne Massip about 10 years ago

I would treat it just as rdoc?

Rake task was already here in < 2.0.0, that's why I considered it as a regression.

#13 Updated by Etienne Massip about 10 years ago

It doesn't make sense to have a source:/branches/2.0-stable/lib/tasks/yardoc.rake and not have yard task available because of a missing entry in Gemfile, does it?

#14 Updated by Antoine Rodriguez about 10 years ago

having documentation up to date is being sure of having more participation in the project and having more plugins ....

For core developpers is also a good tool ....

#15 Updated by Jean-Philippe Lang about 10 years ago

  • Status changed from Resolved to Closed
  • Target version changed from 2.1.0 to 2.0.1

You're right, it's merged for 2.0.1.

Also available in: Atom PDF