foreman start with a manual path
Asked Answered
A

3

4

I am trying to run foreman on heroku. This is a common error, however, i still didnt find a solution. It is clearly missing a path here:

"/c/Program Files/ruby-1.9.2/bin/foreman: "C:/Program: bad interpreter: no such file or directory

My question is: is there a way to avoid this error by manually adding the whole path? Or where should I look to change it? Thank you.

Autoharp answered 4/1, 2013 at 13:16 Comment(0)
B
4

This is a known issue with running foreman in Git bash shell on windows enviroment. (See github issue)

The only current workaround is running foreman in another environment, like Windows cmd prompt or powershell.

Benempt answered 4/1, 2013 at 15:13 Comment(6)
Could you add the exact command you are running? It's not clear what you're actually trying to do.Benempt
I'm going to take a wild stab and say you are running this through the Git bash window. This is a known error for foreman: github.com/ddollar/foreman/issues/166 with no work around (besides not running it in git bash on windows)Benempt
Excuse me, kind sir, but how do I run it then?Autoharp
Windows command line seems to be the only place people have gotten foreman to run. (Start menu => run => enter "cmd.exe")Benempt
Thank you very much, it's a shame I didn't try it earlier!Autoharp
I'm convinced now that there is a conspiracy between Microsoft and all creators of development tools to make web development on Windows as hard and frustrating as humanly possible. I'm on my 4th different shell trying to get Heroku to work.Invaluable
F
4

After reading knut's answer to this question, I fixed this problem on my system by re-installing Heroku Toolbelt to c:\heroku. After re-installation, the heroku command worked, but foreman would not run. I fixed this by manually adding the following to my system path.

C:\heroku\ruby-1.9.2\bin

You'll likely need to search for the foreman program to get the version of the above path that's correct for your system.

I also needed to replace foreman version 0.62 with 0.61, which I learned from this post.

Farrar answered 13/4, 2013 at 22:10 Comment(0)
J
3

I don't know foreman, but I know this problem from other gems. Perhaps the following works:

Don't install ruby (resp. foreman) in c:\Program Files\..., use a installation path without spaces.

My ruby installation is in a path without spaces and when I start foreman, foreman is executed (and stops with a error ([...]lib/foreman/process.rb:54:in spawn': Exec format error - ./spawner (Errno::ENOEXEC) - but I think that's a problem of my test data).

Background:

Anywhere a script is called with a parameter c:\Program Files\..., but windows takes it as two parameters c:\Program and Files\.... Normally you can mask the parameters in ", but I found no place where the problem occurs - sorry.

Jon answered 5/1, 2013 at 23:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.