7

I am following this tutorial of Heroku. I installed foreman with

sudo gem install foreman

but when I try to use this in the terminal with command

foreman

this returns

foreman: command not found

Jorge Castro
  • 71,754

5 Answers5

7

Just got the same error: foreman command not found.
I managed to succeed removing my gem with:

sudo gem uninstall foreman

And re-install it back with rvm.

rvm gem install foreman

Good luck!

ASX
  • 171
6

I would check where gem installs executables into and add that directory to your PATH.

4
gem install foreman 

was all I needed to do

However, when I followed the deb instructions on this page: http://theforeman.org/projects/foreman/wiki/Installation_instructions I had lots of issues...Eventually, I completely uninstalled before running gem install foreman. Then it worked like a charm.

0

I agree with the accepted answer that the issue might be with PATH.

If you run rbenv put this to your ~/.bashrc or ~/.bash_profile:

export PATH="$PATH:~/.rbenv/shims”

Then source the file and check for foreman: which foreman.

Evgeny Mikhaylov
  • 129
  • 1
  • 10
0

You haven't given quite enough information for the problem to be properly diagnosed. (Eg, give a link to the tutorial, indicate if you tested foreman by itself, and tell us what "this" is, ie what command you entered or selected.)

If the install appeared to be ok, and if which foreman reports a reasonable path to foreman, and if the invocation that failed is in a non-interactive shell, then the usual problem is a different $PATH value in that shell, and the usual solution is to specify a fully-qualified path.

James Waldby - jwpat7
  • 2,079
  • 1
  • 15
  • 16