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

Mina 1.0.6, on windows, fork() function is unimplemented on this machine #534

Closed
insub opened this issue Apr 6, 2017 · 3 comments
Closed
Labels
Milestone

Comments

@insub
Copy link

insub commented Apr 6, 2017

On my windows, setup mina version = 1.0.6
when i run "mina deploy", still have error:
fork() function is unimplemented on this machine

ruby 2.3
rails 5.0.0.1

More info:
mina deploy -t :
** Invoke deploy (first_time)
** Execute deploy
** Invoke environment (first_time)
** Execute environment
** Invoke git:clone (first_time)
** Execute git:clone
** Invoke deploy:link_shared_paths (first_time)
** Execute deploy:link_shared_paths
** Invoke bundle:install (first_time)
** Execute bundle:install
** Invoke rails:db_migrate (first_time)
** Execute rails:db_migrate
** Invoke rails:assets_precompile (first_time)
** Execute rails:assets_precompile
** Invoke deploy:cleanup (first_time)
** Execute deploy:cleanup
mina aborted!
NotImplementedError: fork() function is unimplemented on this machine
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/open4-1.3.4/lib/open4.rb:62:in fork' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/open4-1.3.4/lib/open4.rb:62:in do_popen'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/open4-1.3.4/lib/open4.rb:34:in popen4' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/runner/pretty.rb:15:in run'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/runner.rb:14:in run' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/commands.rb:49:in block in run'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/helpers/internal.rb:39:in report_time' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/commands.rb:48:in run'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/dsl.rb:30:in run' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/mina-1.0.6/lib/mina/dsl.rb:49:in deploy'
D:/Sites/rongzhi/config/deploy.rb:48:in block in <top (required)>' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/task.rb:248:in block in execute'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/task.rb:243:in each' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/task.rb:243:in execute'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/task.rb:187:in block in invoke_with_call_ch n' D:/RailsInstaller/Ruby2.3.0/lib/ruby/2.3.0/monitor.rb:214:in mon_synchronize'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/task.rb:180:in invoke_with_call_chain' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/task.rb:173:in invoke'
D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/application.rb:152:in invoke_task' D:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/rake-11.3.0/lib/rake/application.rb:108:in block (2 levels) in t
_level'

@RedNoo
Copy link

RedNoo commented Oct 8, 2017

do you have any solution for this problem?

@skyway777
Copy link

You can try to set in config/deploy.rb
set :execution_mode, :exec if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/

@lovro-bikic lovro-bikic added this to the 2.0.0 milestone Aug 19, 2021
@lovro-bikic
Copy link
Member

This should be fixed with #686, which will be released in 1.3.0. We used to use the open4 gem which calls fork, but it has since been replaced with the Windows-compatible open3.

@lovro-bikic lovro-bikic modified the milestones: 2.0.0, 1.3.0 Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants