我有一个朋友的网站代码,它在 Ruby on Rails 中。
我尝试使用gorails.com上的说明在我的 Mac 上安装 RoR
操作系统:Mac Mojave
ruby -v:ruby 2.2.3p173(2015-08-18 修订版 51636)[x86_64-darwin18]
rails -v:
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems.rb:241:in `bin_path': can't find gem railties (>= 0.a) (Gem::GemNotFoundException)
from /usr/local/bin/rails:22:in `<main>'
我尝试了什么:我安装了 ruby,然后是 rails,使用 gorails 教程,并不断收到说明版本号不匹配的错误。
请记住,创建一个新应用程序是可行的,但尝试运行此现有代码是一个问题。
因此,我卸载了所有内容并使用 更新了版本rvm,从那时起我就收到了这个错误。
当我cd进入 webapp 文件夹并运行bundle install时,出现错误,例如:
zsh: /Users/abc/.rvm/gems/ruby-2.2.3@hs/bin/bundle: bad interpreter: /Users/abc/.rbenv/versions/2.5.3/bin/ruby: no such file or directory
Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using
RVM are available at rvm.io/packages/openssl.
这个项目使用了一个我已经设置好的 PostgreSQL 数据库。如果需要,我也可以分享这个项目的 gemfile。
让这个项目工作的最佳方式是什么?
我错过了一些重要的东西吗?