我是Heroku的新手。
我将我的Rails应用程序上传到Heroku,并希望使用Thin而不是Webrick来运行它。在执行Heroku’s guide之后,我应该使用web: bundle exec rails server thin -p $PORT -e $RACK_ENV来创建过程文件。但是,我总是得到响应web:: command not found。
我遗漏了什么?
发布于 2012-04-20 10:29:25
您不应该将web: bundle exec rails server thin -p $PORT -e $RACK_ENV作为命令运行,而是创建一个名为Procfile的新文件作为其内容。
创建文件并使用编辑器将其粘贴到其中,或者直接执行以下操作:
echo "web: bundle exec rails server thin -p \$PORT -e \$RACK_ENV" > Procfile发布于 2012-04-20 07:35:30
你有没有在你的应用程序中捆绑了thin?
gem 'thin'如果不是,您将看到Rails试图使用默认服务器。就我个人而言,我会考虑在Heroku上使用Unicorn,但要小心您可能需要的工人数量。
http://neilmiddleton.com/the-procfile-is-your-friend。缓存版本:https://web.archive.org/web/20130926005616/http://www.neilmiddleton.com/the-procfile-is-your-friend
http://neilmiddleton.com/getting-more-from-your-heroku-dynos
https://stackoverflow.com/questions/10237200
复制相似问题