我正在尝试运行此rake任务,但它继续返回以下错误:
Could not find libv8-3.3.10.4 in any of the sources
Run `bundle install` to install missing gems.
当我尝试运行bundle install
时,Bundler说一切都是最新的。
我正在使用此命令运行任务:
bundle exec rake deploy:staging
这是我的佣金任务的样子:
task :staging do
app = "heroku-app-name"
puts "Turn maintenance on"
system "heroku maintenance:on --app #{app}"
end
答案 0 :(得分:1)
通过将命令包装在Bundler.with_clean_env块中,我可以从rake任务中发出heroku命令,如下所示:
Bundler.with_clean_env do
system "heroku maintenance:on --app #{app}"
end