lib/smartcloud/grids/buildpacker.rb in smartcloud-0.0.163 vs lib/smartcloud/grids/buildpacker.rb in smartcloud-0.0.164
- old
+ new
@@ -18,19 +18,26 @@
def pack_rails
# Remove server.pid if it exists
FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"
logger.info "Performing bundle install ..."
- if system("bundle install --deployment --clean")
- logger.info "Installing Javascript Dependencies & Pre-compiling Assets ..."
- if system("bundle exec rails assets:precompile", out: File::NULL)
- logger.debug "Starting Server ..."
- if system("god -c Godfile -D")
- logger.info "Launched Application ... Success."
- end
- # exit 0
+ Open3.popen2("bundle", "install", "--deployment", "--clean") do |stdin, stdout_andstderr, wait_thr|
+ stdout_andstderr.each do |line|
+ logger.info "LINE: #{line}"
end
+ raise "bundle install failed." unless wait_thr.value.success?
end
+
+ # if system("bundle install --deployment --clean")
+ # logger.info "Installing Javascript Dependencies & Pre-compiling Assets ..."
+ # if system("bundle exec rails assets:precompile", out: File::NULL)
+ # logger.debug "Starting Server ..."
+ # if system("god -c Godfile -D")
+ # logger.info "Launched Application ... Success."
+ # end
+ # # exit 0
+ # end
+ # end
end
end
end
end