Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

`require': cannot load such file -- rails/commands

I'm new to Rails I just installed rails on MacOS Sierra from scratch using the following commands:

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby
$ rvm -v
rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
$ gem install rails bundler
$ bundler -v
Bundler version 1.14.5

But rails throws this error:

$ rails -v
bin/rails:9:in `require': cannot load such file -- rails/commands (LoadError)
    from bin/rails:9:in `<main>'

This is my PATH:

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin
like image 848
mitchkman Avatar asked Mar 01 '17 08:03

mitchkman


1 Answers

I have gotten the same issue when i putted some gems to project folder to local connect and this gems was with git repos too. So i just removed .git folders from this gems and put theirs to project folder again. It was origin of same issue for me.

like image 158
stopanko Avatar answered Nov 06 '22 23:11

stopanko