2

我正在尝试运行此 rake 任务,但它不断返回以下错误:

Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.

当我尝试运行bundle installbundler 时说一切都是最新的。

我正在使用以下命令运行任务: bundle exec rake deploy:staging

这是我的 rake 任务的样子:

  task :staging  do
    app = "heroku-app-name"

    puts "Turn maintenance on"
    system "heroku maintenance:on --app #{app}"
  end
4

1 回答 1

1

通过将命令包装在 Bundler.with_clean_env 块中,我能够从 rake 任务中提取 heroku 命令,如下所示:

Bundler.with_clean_env do
  system "heroku maintenance:on --app #{app}"
end
于 2014-04-30T19:14:10.083 回答