简体   繁体   中英

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.

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...

With homebrew, just use gem install rails or any gem name. Dont use sudo . That works for me.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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