Foreman installed by heroku toolbelt on windows can't be found
Asked Answered
H

5

18

I simply followed the getting started with nodejs tutorial from Heroku. https://devcenter.heroku.com/articles/getting-started-with-nodejs#declare-process-types-with-procfile

But I get an error at the part "declare process types with procfile" My problem is that my cmd (using windows 7) didn't find the command "foreman"

Any solutions ? I downloaded/installed the heroku toolbelt, the login works fine, but foreman dont

Hallucination answered 29/9, 2013 at 14:4 Comment(1)
It sounds like the heroku toolbelt isn't working correctly for windows. There are some suggestions you might want to try in this question or this question, or you can open a new issue with the heroku toolbelt. I don't see any open issues that are exactly your problem.Bumkin
P
32

I had the same problem on Windows7 64-bit, using git's bash. Here's what I did:

  • uninstall the toolbelt, Ruby, and Git using Control Panel's "Program and Features"
  • reinstall the toolbelt to C:\Heroku (see known issue for more info)
  • add C:\Program Files (x86)\git\bin;C:\Heroku\ruby-1.9.2\bin to the system PATH variable: Control Panel, System, Advanced system settings, Environment Variables..., System variables, Variable Path, Edit... (Change ruby-1.9.2 if a future version of the toolbelt includes a newer version of Ruby.)
  • open a git bash window and uninstall foreman version 0.63
    $ gem uninstall foreman
  • then install version 0.61 (see here for more info)
    $ gem install foreman -v 0.61

Now foreman worked for me:
$ foreman start

Provender answered 24/12, 2013 at 1:45 Comment(5)
Simply uninstalling and reinstalling foreman 0.61, and adding the heroku\ruby-1.9.2\bin to PATH was enough for it to work for me.Helainehelali
Simply adding ruby to path was enough for me. I am still using foreman 0.63Schmitz
SAme here, only had to add ruby to system path.Kail
@ddollar should really get this fixed.Groom
@MichaelKariv Hi, I have posted new question about Javascript #24837260 help me outMosemoseley
M
7

You can do this without uninstall/reinstall:

  1. Open Environment Variables
  2. Add C:\Program Files (x86)\Heroku\ruby-x.x.x\bin to system path (assuming that you installed heroku toolbelt in this directory).
  3. You're done! try it by opening a new shell window and typing foreman start .
Mccowyn answered 5/6, 2014 at 15:6 Comment(1)
Good point. Some systems may require a reboot. Mine did not, although I did need to close my shell and open it again.Owain
A
3

Foreman finished support for Windows. You can use forego instead. It is a foreman implementation in GO lang.

https://github.com/ddollar/forego

Anisotropic answered 19/8, 2014 at 11:32 Comment(1)
Yes, forego worked for me as well. But even better, Heroku recently added a new command 'heroku local', which uses forego behind the scenes. Just install the latest version of Heroku Toolbelt to enable it. And as you say, Heroku no longer support the use of foreman.Immateriality
S
1

Adding C:\Program Files (x86)\Heroku\ruby-1.9.3\bin to the Environment variable PATH worked for me.

Soapbark answered 22/8, 2014 at 5:51 Comment(0)
T
0

After installing Heroku toolbelt, I was getting weird errors about required modules when running foreman start. Adding the ruby bin directory to path, and reopening the shell window did not work for me. It seems that foreman was never installed! When I attempted to uninstall foreman, ruby told me it was not installed. So I ran gem install foreman, and 0.77 was installed. One gotcha, I had to open the shell to install the foreman gem as Administrator. Maybe that is how the Heroku toolbelt seems to not have installed properly the first time. Running foreman start seemed to do something after it was installed (naturally).

Tound answered 26/1, 2015 at 3:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.