Why am I asked to run 'rake db:migrate RAILS_ENV=test'?

后端 未结 6 1731
逝去的感伤
逝去的感伤 2020-12-07 10:58

On Rails 4.0.0.rc1, Ruby 2.0.0, after I run a migration, I see the following error when I try to run a test through rspec:

/Users/peeja/.

6条回答
  •  不知归路
    2020-12-07 11:39

    I've found I have this problem when using chruby to manage my ruby versions. Rails calls bin/rails db:test:prepare via the system command. This doesn't take advantage of chrubys $PATH env var, so it runs as whatever the system ruby is, and fails because of missing gems typically. Unfortunately, I don't currently have a good solution for this.

提交回复
热议问题