gem install rails error

macos 10.12在重新嘗試安裝ror時,照著rails 101的步驟來,在gem install rails error遇到問題。

ERROR: While executing gem … (Gem::Exception)
 Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources

在卡關三天後,看到有人說如果遇到相關問題,建議到stack overflow網站去查。在花了一些時間後,在這篇看到解答 http://stackoverflow.com/questions/42251791/rvm-issue-with-macos-sierra-while-installing-ruby-2-2-6

首先是rvm remove all ruby。rails 101是裝2.3.1

rvm remove 2.3.1

rvm pkg install openssl

rvm install rails -v 5.0.0

就成功了…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.