Firstly, I have installed rails via:
sudo gem install rails
Everything seems to install correctly, but when I type the rails command (rails s, rails -v, etc), I get this error:
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.
The result of which rails
is /usr/bin/rails
I tried many different ways that I found on the Internet.
And finally, that works for me:
gem update --system
then,type sudo gem install rails
again
Hope this helps~
网友评论