0

I copied an example Procfile from heroku's docs, and am trying to use foreman to run a Sinatra app locally.

Whenever I try foreman start, I get this:

~/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

These are the contents of my Procfile:

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

I tried this with and without rbenv. I currently have Ruby installed via Arch's package manager, pacman. I also have bundler installed. I have already tried answers listed here and here. Any help would be really appreciated.

Community
  • 1
  • 1
Nick McCurdy
  • 17,658
  • 5
  • 50
  • 82
  • 1
    Did you tried to add foreman to your Gemfile and start it with "bundle exec foreman start" ? – alno Aug 25 '12 at 06:42
  • Good idea, I didn't do that before. I added it now, but I'm getting this error: https://gist.github.com/f2db5ec84d29043be4b1. I tried another suggestion from Heroku's dev center and replaced my Procfile with `web: bundle exec rackup config.ru -p $PORT`, but for some reason foreman now just tells me my PID and freezes. :\ Oddly enough, I see some brief thin output (of thin starting up) when I hit ctrl-c. Seems like it could be an issue with stdout getting routed around. – Nick McCurdy Aug 25 '12 at 19:26

1 Answers1

0

After waiting a while, updating gems, and trying again, I now got this to work when the Procfile contains the following:

web: bundle exec rackup

Nick McCurdy
  • 17,658
  • 5
  • 50
  • 82