Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

rvm_install_ruby_threads should fallback to 1 #46

Closed
jcsrb opened this Issue · 4 comments

2 participants

@jcsrb

when installing ruby to MacOS during cap deploy:setup, "$(cat /proc/cpuinfo | grep vendor_id | wc -l)" fails and returns 0, therefore rvm refuses to compile ruby with the -j0 flag

One workaround would be:

set :rvm_install_ruby_threads, "$(CPUCORECOUNT=$(cat /proc/cpuinfo | grep vendor_id | wc -l) && echo $(( CPUCORECOUNT == 0 ? 1 : CPUCORECOUNT )))"

but it is probably a better way to ensure rvm_install_ruby_threads>0 in capistrano.rb#L170
maybe a simple ternary?

#{rvm_install_ruby_threads==0 ? 1 : rvm_install_ruby_threads}

or maybe just add this to the readme

set :rvm_install_ruby_threads, 1  #if you get a "cat: /proc/cpuinfo: No such file or directory" error
@mpapis
Owner

and I was tweeting yesterday that I do not recall anyone deploying not on linux ;) will fix it shortly.

@jcsrb

mine is a staging system, but you are right 99.9% will be linux / freebsd deploys

@mpapis mpapis closed this in 30e9287
@mpapis
Owner

released as 1.3.0.rc6

@jcsrb

thanks, looking good, better then my proposals :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.