mislav / hanna

More than just a new RDoc template
MIT License
234 stars 40 forks source link

Hanna and Rails 3 #19

Open gdeest opened 14 years ago

gdeest commented 14 years ago

Hi,

I had a very hard time of making Hanna work with Rails 3 (pre). It looks like all is required is to append the following line to Gemfile:

gem "hanna", '0.1.12', :require => 'hanna/rdoctask'

Perhaps it would help others to update the instructions.

Hope this helps !

nasa42 commented 13 years ago

Yes, it helped me. Adding gem 'hanna', :require => 'hanna/rdoctask' in Gemfile helped me suppressing following error -

/usr/lib/ruby/gems/1.8/gems/rdoc-2.3.0/lib/rdoc/generator/html.rb:44: uninitialized constant RDoc::RDoc (NameError) from /usr/lib/ruby/gems/1.8/gems/hanna-0.1.12/lib/hanna/hanna.rb:9:in require' from /usr/lib/ruby/gems/1.8/gems/hanna-0.1.12/lib/hanna/hanna.rb:9 from /usr/lib/ruby/gems/1.8/gems/hanna-0.1.12/lib/hanna.rb:1:inrequire' from /usr/lib/ruby/gems/1.8/gems/hanna-0.1.12/lib/hanna.rb:1 from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in require' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in each' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:inrequire' from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.0.rc.5/lib/bundler.rb:107:in require' from [....absolute path to application here....]/config/application.rb:3 from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/commands.rb:21:inrequire' from /usr/lib/ruby/gems/1.8/gems/railties-3.0.0.rc/lib/rails/commands.rb:21 from script/rails:6:in `require' from script/rails:6

Thanks.

raggi commented 13 years ago

At runtime, you probably don't want to require anything, I'd recommend having :require => nil