0

I'm using ctran/annotate_models to annotate my models and route files. I'm now getting an error:

$ annotate -r
$ROOT/usr/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:151:in `block in cripple_rubygems': can't find executable rake (Gem::Exception)
from $ROOT/usr/lib/ruby/gems/1.9.1/bin/rake:19:in `<main>'
Route file annotated.

...with the result that annotate adds the comment block to config/routes.db, but the comment is empty. The message suggests that annotate can't find rake, but rake is certainly there:

$ which rake
$ROOT/usr/bin/rake

and here's what rake says about the current configuration:

$ rake about
About your application's environment
Ruby version              1.9.2 (x86_64-darwin10.6.0)
RubyGems version          1.3.7
Rack version              1.2
Rails version             3.0.5
Active Record version     3.0.5
Action Pack version       3.0.5
Active Resource version   3.0.5
Action Mailer version     3.0.5
Active Support version    3.0.5
Application root          .../myapp
Environment               development

The only things that's slightly odd in my Gemfile is that I am specifying a previous version of rake:

# file: Gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.5'
gem 'rake', '0.8.7'             # workaround "uninitialized constant Rake::DSL" bug
...
gem 'annotate', '2.4.0'

Any ideas of what's wrong?

fearless_fool
  • 33,645
  • 23
  • 135
  • 217

1 Answers1

-1

Try using bundle exec rake instead.

Chris Ledet
  • 11,458
  • 7
  • 39
  • 47
  • I typed `bundle exec rake` and got the same error message. But perhaps I didn't understand your comment: try using `bundle exec rake` instead of what? – fearless_fool Jul 24 '11 at 05:20