新手问题 rails 框架装不上

xuelance · May 25, 2020 · Last by xuelance replied at May 26, 2020 · 3116 hits

ruby 已经装好了,装 rails 时 我输入

gem install rails -v 5.0.0

就出现

RROR:  Loading command: install (LoadError)
    cannot load such file -- openssl
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

请教该如何解决? ruby 安装版本是 2.3.1 我的电脑是 macOs 10.15.4

10.15 自带 Ruby 2.6,你用 RVM 或者 RBENV 装 2.6.6 吧

Reply to jasl

抱歉,與主題無關。macos 10.15 不耗電嗎?

不耗电啊

没说 Ruby 是怎么装的无法指出解决方案。

系统 Ruby 作为系统组件最好不要动,用 homebrew 安装 Ruby 作为开发用,可以同时处理一些依赖问题。

Reply to jasl

可能,我是 macbook pro 2015 所以感覺會耗電。

如果没装烂七八糟常驻的程序的话,很可能是电池老化,这个很正常,可以自己搜一下怎么看电池健康度,如果过低花钱换(在保的话,低于 85% 是免费更换的)

谢啦各位,这个问题已经解决了。我从新装了一遍 rvm 解决了

xuelance closed this topic. 26 May 10:30
You need to Sign in before reply, if you don't have an account, please Sign up first.