Hello, I''m developing a Rails app on MS Windows XP, SP2 (it''ll run on a linux server, Windows is just my workstation) with the latest Ruby One-Click installer, the latest Rake gem, and non-gem Rails 0.8.5. When I run ''rake appdoc'' from the top directory of the Rails application, I get the following error:> rm -r doc/app > rdoc -o doc/app --line-numbers --inline-source --title ''Rails Application Docume > ntation'' -T ''html'' doc/README_FOR_APP app/controllers/abstract_application.rb ap > p/controllers/projects_controller.rb app/helpers/application_helper.rb app/helpe > rs/projects_helper.rb app/models/project.rb > rake aborted! > undefined method `exitstatus'' for nil:NilClassAny ideas? I didn''t see any related tickets in the bugtracker. (Running plain-old ''rdoc -NS'' from the top directory works just fine---as long as I remove the docs directory first---and all unit tests for the application pass.) -- Regards, John Wilger ----------- Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don''t know," Alice answered. "Then," said the cat, "it doesn''t matter." - Lewis Carrol, Alice in Wonderland
On Mon, 6 Dec 2004 16:10:09 -0500, John Wilger <johnwilger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > > I''m developing a Rails app on MS Windows XP, SP2 (it''ll run on a linux > server, Windows is just my workstation) with the latest Ruby One-Click > installer, the latest Rake gem, and non-gem Rails 0.8.5. When I run > ''rake appdoc'' from the top directory of the Rails application, I get > the following error:I get the same error also on XP/SP2 with 0.8.5. Interestingly enough, if you copy the bits out of the command-line and execute them manually it works just fine. Looks like it might be an issue with Rake interacting with the shell improperly. -- Chris Brooks http://www.chrisbrooks.org
John,
> When I run ''rake appdoc'' from the top directory of the
Rails
> application, I get the following error:
>
> rm -r doc/app
> rdoc -o doc/app --line-numbers --inline-source
> --title ''Rails Application Documentation'' -T
''html'' doc/README_FOR_APP
> app/controllers/abstract_application.rb
> app/controllers/projects_controller.rb
> ....
>rake aborted!
>undefined method `exitstatus'' for nil:NilClass
I see the same problem from win2k.
I managed to get it to work with the following hack. (Note that this
includes a modification to rake which may introduce a minor
incompatiblity into other Rake files which use the RDoc task.)
------------ rdoctask.rb ------------
require ''rake/tasklib''
> require ''rdoc/rdoc''
....
# Create the tasks defined by this task lib.
def define
....
< sh %{rdoc -o #{@rdoc_dir} #{opts} #{@rdoc_files}}
> r = RDoc::RDoc.new
> r.document([''-o'', @rdoc_dir] + option_list +
@rdoc_files)
....
def option_list
result = @options.dup
result << "--main" <<
"''#{main}''" if main
result << "--title" <<
"''#{title}''" if title
< result << "-T" <<
"''#{template}''" if template
> result << "-T" << template if template
result
end
------------ rails Rakefile ------------
Rake::RDocTask.new("appdoc") { |rdoc|
rdoc.rdoc_dir = ''doc/app''
rdoc.title = "Rails Application Documentation"
< rdoc.options << ''--line-numbers --inline-source''
> rdoc.options << ''--line-numbers'' <<
''--inline-source''
....
Rake::RDocTask.new("apidoc") { |rdoc|
rdoc.rdoc_dir = ''doc/api''
rdoc.title = "Rails Framework Documentation"
< rdoc.options << ''--line-numbers --inline-source''
> rdoc.options << ''--line-numbers'' <<
''--inline-source''
See http://groups-beta.google.com/group/comp.lang.ruby/msg/24dbdf4680e68493
John-Mason