将xcodeproj和ruby 2.7.0放入路径

yr9zkbsy  于 2022-10-15  发布在  Ruby
关注(0)|答案(2)|浏览(119)

我想使用Ruby 2.7.0和xcodeproj在MacOS(大苏尔11.2.3版)上获得Nativescript工作。
我按照以下链接的说明在我的MacBook Air 13“2014”上进行了明确安装:https://github.com/NativeScript/docs-new/blob/develop/environment-setup.md
在所有这些步骤之后,NativeScrip错过了xcodeproj。如果我在终端中键入xcodeproj --version,它将打印command not found
这也是我的gem env转储:

RUBYGEMS VERSION: 3.2.15
  - RUBY VERSION: 2.7.3 (2021-04-05 patchlevel 183) [x86_64-darwin20]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.7.0
  - USER INSTALLATION DIRECTORY: /Users/myusr/.local/share/gem/ruby/2.7.0
  - RUBY EXECUTABLE: /usr/local/opt/ruby@2.7/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.7.0/bin
  - SPEC CACHE DIRECTORY: /Users/myusr/.local/share/gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby@2.7/2.7.3/etc
  - RUBYGEMS PLATFORMS:
     - ruby
     - x86_64-darwin-20
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/2.7.0
     - /Users/myusr/.local/share/gem/ruby/2.7.0
     - /usr/local/Cellar/ruby@2.7/2.7.3/lib/ruby/gems/2.7.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Library/Apple/usr/bin

如果我导航到我的xcodeproj安装:

/usr/local/lib/ruby/gems/2.7.0/bin

然后我跑了

./xcodeproj --version

它会打印出xcodeproj安装的正确版本。
还有一些人建议检查Pod的安装,它工作正常--版本打印它的版本。
如果我运行gem list,我的列表中还有xcodeproj (1.19.0)
我如何修复这个问题才能将xcodeproj二进制文件放入路径?

ar7v8xwq

ar7v8xwq1#

我设法通过重新安装xcodeproj修复了它,并添加了

export PATH=/opt/homebrew/lib/ruby/gems/2.7.0/bin:$PATH

致我的~/.bash_profile
然后我开了一个新的航站楼

l0oc07j2

l0oc07j22#

安装Home Brew,然后运行brew link ruby@2.7

相关问题