6

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

3 Answers 3

1

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.

Sign up to request clarification or add additional context in comments.

Comments

0

Add rails gem to your project. Or you can do gem install rails

Comments

0

I could fix same error by:

bundle install

After running into the same issue with:

Ruby27/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- rails/commands/server (LoadError)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.