Vighnesh Pai
Vighnesh Pai

Reputation: 1843

RVM: Could not locate Gemfile or .bundle/ directory when running $bundle install command

I'm trying to setup RVM on my mac. When I run bundle install in an empty folder (a dummy project folder) I get the following error:

Could not locate Gemfile or .bundle/ directory

Questions:

  1. Do I need to copy any gem files to the dummy project folder? If so, what gems, and where from?

  2. Do I need to install anything else?

Upvotes: 2

Views: 4589

Answers (2)

FAntony
FAntony

Reputation: 574

Error in red text

You Just need to check whether you are currently in the rails app folder (In most cases) or double check whether you have created the rails app properly.

Here I am trying to execute the command for starting the rails server,

bundle exec rails server

As you can see since I'm not in that folder it cant locate the required gem to start up the service.

And an Error pops up like below

Could not locate Gemfile or .bundle/ directory

To remove just cd into the app folder

cd YourAPPfolder

And run the required rails command again.

You are done. Voila !!

Upvotes: 2

Abhilash Reddy
Abhilash Reddy

Reputation: 1549

Make sure you are in the project directory before running bundle install. For example, after running rails new myapp, you will want to cd myapp before running bundle install

Upvotes: 0

Related Questions