I am trying to build a new application or check the version of rails. I get the following error:
Traceback (most recent call last):
2: from /usr/local/bin/rails:22:in `<main>'
1: from /Users/vivanksharma/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:263:in `bin_path'
/Users/vivanksharma/.rbenv/versions/2.5.1/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem railties (>= 0.a) with executable rails (Gem::GemNotFoundException)
I searched many different solutions, but none of them worked for me.
Any help would be great.
ruby -v ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
rbenv -v rbenv 1.1.1
Even executing bundle install gives an error Could not locate Gemfile.