Rails 安裝報錯

C:\>gem install rails
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions. This could take a while...
ERROR:  Error installing rails:
        ERROR: Failed to build gem native extension.

    current directory: D:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
D:/Program\ Files/Ruby26-x64/bin/ruby.exe -I D:/Program\ Files/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20191204-4508-2pkcc1.rb extconf.rb
creating Makefile

current directory: D:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
make "DESTDIR=" clean
Makefile:269: *** 多個目標匹配。 停止。

current directory: D:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1/ext/websocket-driver
make "DESTDIR="
Makefile:269: *** 多個目標匹配。 停止。

make failed, exit code 2

Gem files will remain installed in D:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/gems/websocket-driver-0.7.1 for inspection.
Results logged to D:/Program Files/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/websocket-driver-0.7.1/gem_make.out

解決辦法:選擇3安裝MSYS2和開發工具

_____       _           _____           _        _ _         ___
|  __ \     | |         |_   _|         | |      | | |       |__ \
| |__) |   _| |__  _   _  | |  _ __  ___| |_ __ _| | | ___ _ __ ) |
|  _  / | | | '_ \| | | | | | | '_ \/ __| __/ _` | | |/ _ \ '__/ /
| | \ \ |_| | |_) | |_| |_| |_| | | \__ \ || (_| | | |  __/ | / /_
|_|  \_\__,_|_.__/ \__, |_____|_| |_|___/\__\__,_|_|_|\___|_||____|
                    __/ |           _
                   |___/          _|_ _  __   | | o __  _| _     _
                                   | (_) |    |^| | | |(_|(_)\^/_>

   1 - MSYS2 base installation
   2 - MSYS2 system update (optional)
   3 - MSYS2 and MINGW development toolchain

Which components shall be installed? If unsure press ENTER [1,2,3]3

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章