Heroku Rails Procfile [英] Heroku rails Procfile

查看:59
本文介绍了Heroku Rails Procfile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Heroku非常陌生.

I am very new to Heroku.

我将Rails应用程序上传到Heroku,并希望使用Thin而不是Webrick来运行它.按照 Heroku的指南,我应该使用web: bundle exec rails server thin -p $PORT -e $RACK_ENV创建procfile.但是我总是得到响应web:: command not found.

I uploaded my Rails app to Heroku and would like to run it with Thin instead of Webrick. Following Heroku’s guide I am supposed to use web: bundle exec rails server thin -p $PORT -e $RACK_ENV to create the procfile. However I always get the response web:: command not found.

我想念什么?

推荐答案

您不应该将web: bundle exec rails server thin -p $PORT -e $RACK_ENV作为命令运行,而是创建一个名为Procfile的新文件,其内容为该文件.

You’re not supposed to run web: bundle exec rails server thin -p $PORT -e $RACK_ENV as a command, rather you create a new file called Procfile with that as its contents.

创建文件并将其粘贴到您的编辑器中,或者执行以下操作:

Either create the file and paste it in using your editor, or just do:

echo "web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV" > Procfile

这篇关于Heroku Rails Procfile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆