gpt4 book ai didi

ruby-on-rails - Rails 一直告诉我它当前未安装

转载 作者:数据小太阳 更新时间:2023-10-29 06:19:16 26 4
gpt4 key购买 nike

我使用 rvm 来管理不同的 ruby 及其 gemsets。我的 shell 是 zsh,oh-my-zsh 配置了基本设置。启用的 oh-my-zsh 插件是 ruby​​、rails、osx 和 git。这是我用来安装 ruby​​-1.8.7 和 rails-3.0.7 的命令。

rvm install 1.8.7
rvm use 1.8.7
gem install rails -v=3.0.7

然后我输入 rails 并得到:

Rails is not currently installed on this system. To get the latest version, simply type:

$ sudo gem install rails

You can then rerun your "rails" command.

我也尝试过更彻底的安装,比如在切换到 ruby​​-1.8.7 后重新安装 rubygems,或者创建一个全新的 gemset,但没有成功。

这是 rvm 信息:

ruby-1.8.7-p352@rails:

system:
uname: "Darwin yicai.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"

rvm:
version: "rvm 1.8.6 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

ruby:
interpreter: "ruby"
version: "1.8.7"
date: "2011-06-30"
platform: "i686-darwin10.8.0"
patchlevel: "2011-06-30 patchlevel 352"
full_version: "ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-darwin10.8.0]"

homes:
gem: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails"
ruby: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352"

binaries:
ruby: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin/ruby"
irb: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin/irb"
gem: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin/gem"
rake: "/Users/nil/.rvm/bin/rake"

environment:
PATH: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails/bin:/Users/nil/.rvm/gems/ruby-1.8.7-p352@global/bin:/Users/nil/.rvm/rubies/ruby-1.8.7-p352/bin:/Users/nil/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/sbin"
GEM_HOME: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails"
GEM_PATH: "/Users/nil/.rvm/gems/ruby-1.8.7-p352@rails:/Users/nil/.rvm/gems/ruby-1.8.7-p352@global"
MY_RUBY_HOME: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352"
IRBRC: "/Users/nil/.rvm/rubies/ruby-1.8.7-p352/.irbrc"
RUBYOPT: ""
gemset: "rails"

gem版本为1.8.10,最新。

最佳答案

如果您在安装 rails 后立即运行 rails 命令,您需要重新启动终端才能识别您的命令。

关于ruby-on-rails - Rails 一直告诉我它当前未安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7788946/

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