Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.74.0 foreman start fails with undefined method `spawn' #473

Closed
kukarzev opened this issue Jul 31, 2014 · 18 comments
Closed

0.74.0 foreman start fails with undefined method `spawn' #473

kukarzev opened this issue Jul 31, 2014 · 18 comments

Comments

@kukarzev
Copy link

When I get to foreman start, it fails:

/usr/local/foreman/lib/foreman/process.rb:54:in run': undefined methodspawn' for Process:Module (NoMethodError)
from /usr/local/foreman/lib/foreman/process.rb:53:in chdir' from /usr/local/foreman/lib/foreman/process.rb:53:inrun'
from /usr/local/foreman/lib/foreman/engine.rb:356:in spawn_processes' from /usr/local/foreman/lib/foreman/engine.rb:353:inupto'
from /usr/local/foreman/lib/foreman/engine.rb:353:in spawn_processes' from /usr/local/foreman/lib/foreman/engine.rb:352:ineach'
from /usr/local/foreman/lib/foreman/engine.rb:352:in spawn_processes' from /usr/local/foreman/lib/foreman/engine.rb:57:instart'
from /usr/local/foreman/lib/foreman/cli.rb:41:in start' from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/command.rb:27:insend'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command'
from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from /usr/local/foreman/vendor/gems/thor-0.19.1/lib/thor/base.rb:440:instart'
from /usr/bin/foreman:18

@kukarzev
Copy link
Author

Downgrading to 0.73.0 resolved the problem.

@ddollar
Copy link
Owner

ddollar commented Aug 10, 2014

What version of Ruby? I'm not sure why Process.spawn didn't exist for you but please try again.

@ddollar ddollar closed this as completed Aug 10, 2014
@tvanesse
Copy link

tvanesse commented Sep 4, 2014

Same problem here. How did you downgrade to 0.73.0? I'm running Ubuntu 12.04 and apt-get install foreman=0.73.0 won't work.

@kukarzev
Copy link
Author

kukarzev commented Sep 4, 2014

Hi Thomas,

I believe I followed some instruction that involved checking out its source
from git and rebuilding. I had to install a couple of other packages along
the way but it worked in the end. It would be good to get the developer
look at this issue though...

Cheers,
Gena

On Thu, Sep 4, 2014 at 10:19 AM, Thomas Vanesse notifications@github.com
wrote:

Same problem here. How did you downgrade to 0.73.0? I'm running Ubuntu
12.04 and apt-get install foreman=0.73.0 won't work.


Reply to this email directly or view it on GitHub
#473 (comment).

@tvanesse
Copy link

tvanesse commented Sep 6, 2014

Thanks kakerzev.

@ddollar I have ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] installed.

@mthomas610
Copy link

I am receiving the same exact error as mentioned. I currently have foreman 0.75.0. I could use some help fixing this.

@annibalbiondi
Copy link

@mthomas610 Check which version of Ruby you are using and see if it is one of the supported versions.

I was having the same problem (same context as OP) and then I saw I was running an unsupported older version of it. It works now :)

@bradparks
Copy link

hey... i'm getting the same problem, and I'm running a supported Ruby version:

$ ruby --version
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin12.0]

$ foreman start web
/usr/local/foreman/lib/foreman/process.rb:54:in run': undefined methodspawn' for Process:Module (NoMethodError)
from /usr/local/foreman/lib/foreman/process.rb:53:in chdir' from /usr/local/foreman/lib/foreman/process.rb:53:inrun'
from /usr/local/foreman/lib/foreman/engine.rb:356:in spawn_processes' from /usr/local/foreman/lib/foreman/engine.rb:353:inupto'
from /usr/local/foreman/lib/foreman/engine.rb:353:in `sp

@bradparks
Copy link

Turns out I must've been running an older version of Foreman? I did

gem install foreman as detailed in the foreman README.md

and tried again, and it worked!

@simspace-dev
Copy link

Thanks Brad Parks!
gem install foreman worked for me as well

$ gem install foreman
Fetching: dotenv-1.0.2.gem (100%)
Successfully installed dotenv-1.0.2
Fetching: foreman-0.76.0.gem (100%)
Successfully installed foreman-0.76.0
2 gems installed

@skarkkai
Copy link

I fixed this by switching to ruby 1.9 roughly as following:

apt-get install ruby1.9.1
apt-get remove ruby1.8
hash -r
gem install foreman # install foreman on ruby 1.9 instead of 1.8

@fbownz
Copy link

fbownz commented Jan 16, 2015

When I try to install foreman, I get the error
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.

And when I try sudo gem install foreman
I only get foreman version 0.77.0

@sowright
Copy link

Hey, I'm following the heroku getting started with python instructions on a mac. Got the same error when I tried to run [$ foreman start web].

Following recommendations found on this thread and some others, I tried to upgrade my foreman version with [$ gem install foreman]. It says the update was successful to version 0.77.0, but when I check [$ foreman --version] it tells me it is still 0.75.0, and [$ foreman start web] still doesn't work. Why am I not operating with the upgraded version of foreman and how can I fix that?

(as a side question, I'm new to writing on github – how do I write with the special highlighted/plain text format for terminal commands?)

@svsaraf
Copy link

svsaraf commented Jan 31, 2015

Hey sowright. You actually should be downgrading your version of foreman, not upgrading it.
Try doing this:

gem uninstall foreman
gem install foreman -v 0.61

@komor72
Copy link

komor72 commented Feb 18, 2015

Hey, I'm following the heroku getting started with python instructions on a mac. Got the same error when I tried to run [$ foreman start web].

I’m just following the Ruby version of this Heroku tutorial and have the same issue. Using Ruby 2.0.0p598 on OS X 10.7 (Lion), RVM 1.26.3, Bundler 1.7.7, Foreman 0.75. The important bit is that Foreman was installed with Heroku Toolbelt and was not installed as gem in my gemset. And this is expected according to https://devcenter.heroku.com/articles/getting-started-with-ruby#run-the-app-locally

But I followed the advices above and installed it again as gem: gem install foreman -v 0.75 and now it’s working as expected. I’m reporting this to Heroku, just in case this problem relates to their (excellent otherwise) tutorial and not to (excellent otherwise) Foreman project.

@asmaier
Copy link

asmaier commented May 4, 2015

I'm also coming here from the Heroku Tutorial. I'm running Mac OS X 10.8.5 with ruby 2.2.0p0 installed. To workaround the problem I did

gem uninstall foreman  # uninstall all installed versions
gem install foreman     # the newest version v 0.78 worked fine for me

Then I needed to open up a new(!) terminal window and inside this new window foreman finally worked as expected:

$ foreman --version
0.78.0
$ foreman start web
12:13:52 web.1  | started with pid 10965 ....

@danielosan
Copy link

I have exactly the same problem on OSX 10.7.5. I updated to Ruby 2.2.2p95 and tried several versions of foreman 0.61, 0.75, 0.77. 0.78. No luck so far…

usr/local/foreman/lib/foreman/process.rb:54:in `run': undefined method `spawn' for Process:Module (NoMethodError

@danielosan
Copy link

Correction, I should have read better what asmaier wrote:

Then I needed to open up new(!) terminal window and inside this new window foreman finally worked

Downgrade to foreman version 0.75 worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests