开发者

annotate cannot find rake executable

开发者 https://www.devze.com 2023-03-22 13:26 出处:网络
I\'m using ctran/annotate_models to annotate my models and route files.I\'m now getting an error: $ annotate -r

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://r开发者_Python百科ubygems.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?


Try using bundle exec rake instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号