简体   繁体   English

在没有RVM的情况下安装Rails时无法运行rails命令

[英]Can't run rails command when installing Rails without RVM

I can't get to install rails correctly, after doing "sudo gem install rails", all goes well, but if I try doing "rails -v", I get "Rails is not currently installed on this system...", I'm not using RVM, I installied Ruby through Homebrew. 在完成“ sudo gem install rails”之后,我无法正确安装rails,一切都很好,但是如果我尝试进行“ rails -v”,则会得到“ Rails当前未安装在此系统上...”,我没有使用RVM,而是通过Homebrew安装了Ruby。

The rails executable is in "/usr/local/Cellar/ruby/1.9.3-p286/bin/rails", but even if I add that path to my $PATH it won't find it, or something else in RubyGems is going wrong... rails可执行文件位于“ /usr/local/Cellar/ruby/1.9.3-p286/bin/rails”中,但是即使我将该路径添加到$ PATH中,也找不到它,否则RubyGems中的其他内容就是出问题了...

With homebrew, just use gem install rails or any gem name. 随着自制程序,只需要使用gem install rails或者任何宝石的名称。 Dont use sudo . 不要使用sudo That works for me. 这对我行得通。

$ which rails
/usr/local/Cellar/ruby/1.9.3-p194/bin/rails

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM