Rails应用程序无法正确查看Ruby的版本,因此我无法迁移db

时间:2014-01-24 09:12:48

标签: ruby-on-rails heroku rake push migrate

本地安装了Ruby 2.0.0,但app认为安装了1.9.3版本:
    # bundle install
>> Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0

# ruby -v
>> ruby 2.0.0p353 (2013-11-22 revision 43784) [i686-linux]

<小时/> [也许是]尝试按下时出现错误:

# heroku run rake db:migrate
>> Running rake db:migrate attached to terminal... up, run.5384
>> /usr/bin/env: ruby1.9.1: No such file or directory

和本地:

# rake db:migrate
>> rake aborted!
>> cannot load such file -- bundler/setup

谢谢...

1 个答案:

答案 0 :(得分:0)

在你的Gemfile中添加

ruby '2.0.0'