Ruby:rake:22:Gem的未定义方法`activate_bin_path’:模块(NoMethodError)

我在Ruby 1.8.7-p374中遇到过这个问题。

当尝试运行“rake db:migrate”时出现此错误:

RubyGems installed the following executables: /home/wellington/.rbenv/versions/1.8.7-p374/bin/gem RubyGems system software updated /home/wellington/.rbenv/versions/1.8.7-p374/bin/rake:22: undefined method `activate_bin_path' for Gem:Module (NoMethodError) 

它发生在部署Rails应用程序上。

有什么想法解决这个问题?

我解决了这个更新的gem和bundler

 gem update --system gem update bundler