You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助解决phraseapp: command not found错误——使用fastlane拉取Phraseapp最新变更失败

Fixing phraseapp: command not found in fastlane's phraseapp_all

Hey there, that error code 127 tells us fastlane can't locate the phraseapp command in its runtime environment—even if you can run it in your regular terminal. Let's walk through some practical fixes:

1. Use the absolute path to the phraseapp CLI

First, find exactly where phraseapp is installed on your system by running this in your terminal:

which phraseapp

You’ll get a path like /usr/local/bin/phraseapp (Intel Mac) or /opt/homebrew/bin/phraseapp (Apple Silicon). Then update your phraseapp_all lane to use this full path instead of just phraseapp:

lane :pull_phrases do
  sh "cd ../Project/Resources && /usr/local/bin/phraseapp pull"
end

2. Verify fastlane's PATH environment

Fastlane might run in a different shell context than your terminal, so its PATH might not include the directory where phraseapp lives. Add a line to your lane to print the PATH and check:

lane :pull_phrases do
  sh "echo $PATH" # This shows you which paths fastlane can access
  sh "cd ../Project/Resources && phraseapp pull"
end

If the directory from which phraseapp isn’t in that output, add it directly to fastlane’s PATH in the lane:

lane :pull_phrases do
  ENV['PATH'] = "/opt/homebrew/bin:#{ENV['PATH']}" # Replace with your phraseapp directory
  sh "cd ../Project/Resources && phraseapp pull"
end

3. Use Bundler to manage the phraseapp gem

If you installed phraseapp via Ruby gem, make sure it’s listed in your project’s Gemfile:

gem 'phraseapp'

Run bundle install to sync dependencies, then update your lane to use bundle exec—this ensures fastlane uses the gem from your project’s bundle:

lane :pull_phrases do
  sh "cd ../Project/Resources && bundle exec phraseapp pull"
end

4. Check your shell configuration and installation method

  • If you installed phraseapp via Homebrew, confirm Homebrew’s bin directory is in your PATH. Add this line to your .zshrc or .bashrc if missing:
    export PATH="/opt/homebrew/bin:$PATH" # Adjust path for your Mac type
    
    Restart your terminal or run source ~/.zshrc to apply changes.
  • Avoid running fastlane with sudo—this switches the user context and can break access to user-installed tools like phraseapp.

5. Reinstall phraseapp cleanly

If you’re using the Ruby gem, uninstall and reinstall it to fix any linking issues:

gem uninstall phraseapp
gem install phraseapp

If you’re using the standalone CLI (not the gem), download the latest version and place it in a directory that’s already in your PATH.

内容的提问来源于stack exchange,提问作者Jongers

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 15:49:10