“foreman start”导致“无法在...之中找到捆绑器(> = 0)”错误

问题描述:

我从heroku的文档复制了一个示例Procfile,并试图使用工头在本地运行Sinatra应用程序。“foreman start”导致“无法在...之中找到捆绑器(> = 0)”错误

每当我试着foreman start,我得到这个:

~/Repos/website ➜ foreman start 
14:04:43 web.1 | started with pid 2916 
14:04:44 web.1 | /usr/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [bigdecimal-1.1.0, daemons-1.1.9, eventmachine-0.12.10, io-console-0.3, json-1.5.4, minitest-2.5.1, rack-1.4.1, rack-protection-1.2.0, rake-0.9.2.2, rdoc-3.9.4, rubygems-update-1.8.24, sinatra-1.3.3, thin-1.4.1, tilt-1.3.3, yard-0.8.2.1] (Gem::LoadError) 
14:04:44 web.1 | from /usr/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec' 
14:04:44 web.1 | from /usr/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem' 
14:04:44 web.1 | from /home/nicolas/.gem/ruby/1.9.1/bin/bundle:22:in `<main>' 
14:04:44 web.1 | exited with code 1 
14:04:44 system | sending SIGTERM to all processes 
SIGTERM received 

这些都是我Procfile的内容:

web: bundle exec thin start -R config.ru -e $RACK_ENV -p $PORT 

我想这与不rbenv。我目前通过Arch的软件包管理器pacman安装了Ruby。我也安装了捆绑软件。我已经尝试过列出herehere的答案。任何帮助将非常感激。

+1

你试图工头添加到您的Gemfile,并启动它“捆绑执行领班开始”? – alno

+0

好主意,我以前没有这样做。我现在添加了,但是我收到了这个错误:https://gist.github.com/f2db5ec84d29043be4b1。我尝试了另一个来自Heroku开发中心的建议,并用'web:bundle exec rackup config.ru -p $ PORT'替换了我的Procfile,但由于某种原因,现在工头只是告诉我我的PID并冻结。 :\奇怪的是,当我点击ctrl-c时,我会看到一些简短的输出(薄启动)。似乎它可能是一个与标准输出绕开的问题。 –

等待一段时间,更新的宝石,并再次尝试之后,我现在得到这时候Procfile包含以下工作:

web: bundle exec rackup