gpt4 book ai didi

ruby-on-rails - 安装 Oh My ZSH 后 Rails 不见了?

转载 作者:行者123 更新时间:2023-12-04 05:46:01 26 4
gpt4 key购买 nike

我最近将我的终端更改为使用 Oh My ZSH,但由于某种原因,当我尝试运行 rails 命令时,出现以下错误:

/Users/david/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find rails (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
from /Users/david/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/david/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/david/.rvm/gems/ruby-1.9.3-p0@railstest/bin/rails:18:in `<main>'

有人能帮我解决这个问题吗?

最佳答案

我遇到了完全相同的问题,结果是我没有将基本行从 ~/.bashrc 移动到 ~/.zshrc。把它放在最后并重新打开终端解决了这个问题:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"

关于ruby-on-rails - 安装 Oh My ZSH 后 Rails 不见了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9320556/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com