[英]Can't install gems because "undefined method `invoke_with_build_args' for nil:NilClass"
[英]Trying to install rails. Error1. no such file to load -- openssl Error 2. undefined method `invoke_with_build_args' for nil:NilClass
我正在嘗試將 Rails 下載到我的機器上。 我很確定這是一個較舊的設置,我不確定有什么問題。 我一直在這幾個小時。 每當我輸入rails c
我得到...
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
然后我輸入它所說的輸入並得到:
ERROR: Loading command: install (LoadError)
no such file to load -- openssl
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
我探索了一段時間,認為我沒有安裝 openssl 所以我下載了它,現在當我輸入openssl
我得到一個看起來像“OpenSSL>”的提示,當我輸入whereis openssl
,我得到usr/bin/openssl
. 這兩件事讓我相信我的筆記本電腦上安裝了 openssl,但由於某種原因,當我去gem install rails
我仍然遇到錯誤。
我的紅寶石版本是 1.8.7。 這是我嘗試訪問的應用程序的內置版本。我使用的是 MacOS Mojave 10.14.16。 如果有人有任何提示或可以指出我正確的方向,我將非常感激。
謝謝
您必須先安裝 OpenSSL 並再次重新編譯 ruby:
RVM:
rvm pkg install openssl
rvm reinstall ruby-1.8.7 --with-gcc=gcc-4.7 --with-openssl-dir=$rvm_path/usr
請寫出ruby-1.8.7的全名版本
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.