B
B
Bogdan2017-06-08 10:39:48
Ruby on Rails
Bogdan, 2017-06-08 10:39:48

Rails + Webpacker + Windows?

Hello. Rails: 5.1.1, Ruby: 2.3.3-p222 Windows 10. Error when compiling

>rails webpacker:compile --trace
** Invoke webpacker:compile (first_time)
** Invoke webpacker:verify_install (first_time)
** Invoke webpacker:check_node (first_time)
** Execute webpacker:check_node
** Invoke webpacker:check_yarn (first_time)
** Execute webpacker:check_yarn
** Invoke webpacker:check_binstubs (first_time)
** Execute webpacker:check_binstubs
** Execute webpacker:verify_install
Webpacker is installed  
Using d:/ProjectRuby/portal/config/webpacker.yml file for setting up webpack paths
** Invoke environment (first_time)
** Execute environment
** Execute webpacker:compile
[Webpacker] Compiling assets 
rails aborted!
Errno::ENOEXEC: Exec format error - ./bin/webpack
C:/RUBY23-X64/lib/ruby/2.3.0/open3.rb:199:in `spawn'
C:/RUBY23-X64/lib/ruby/2.3.0/open3.rb:199:in `popen_run'
C:/RUBY23-X64/lib/ruby/2.3.0/open3.rb:95:in `popen3'
C:/RUBY23-X64/lib/ruby/2.3.0/open3.rb:258:in `capture3'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/bundler/gems/webpacker-0792e22d5221/lib/tasks/webpacker/compile.rake:13:in `block (2 levels) in <top (required)>'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
C:/RUBY23-X64/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:152:in `invoke_task'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `each'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:108:in `block in top_level'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:117:in `run_with_threads'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:102:in `top_level'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/rake/rake_command.rb:21:in `block in perform'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rake-12.0.0/lib/rake/application.rb:178:in `standard_exception_handling'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands/rake/rake_command.rb:18:in `perform'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/command.rb:46:in `invoke'
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/railties-5.1.1/lib/rails/commands.rb:16:in `<top (required)>'
bin/rails:4:in `require'
bin/rails:4:in `<main>'
Tasks: TOP => webpacker:compile

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Grudinkin, 2017-06-08
@Hunt666

Not all gems can be made to work in Windows at all, in any case there will be problems. Either install Linux as a second system, or in a virtual machine, or once you have 10 you can try https://gorails.com/setup/windows/10 (a question on this topic Is it possible to work on Ruby on Rails in Windows 10, as it were in ubuntu ? ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question