Reputation: 43
Whenever I try any rails command, even rails -v
, I keep getting the error - Could not locate Gemfile or .bundle/ directory
Things I have already tried:
gem install rails
(successfully installed)
gem update rails
gem update bundler
tried uninstalling bundler and reinstalling it.
Current ruby -v is: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
None of the above worked. Any ideas?
Upvotes: 1
Views: 875
Reputation: 14362
If you have installed rails successfully rails -v
should work fine. For running bundle
you have to be in a Gemfile
directory. Are you sure you are in the root directory of your app? If not cd to your root directory and run the commands
$ rails new my_app
$ cd my_app
$ bundle
Upvotes: 1