tags:

views:

834

answers:

2

I'm certainly no Ruby developer but I have an application on my server using Ruby, Gems, and Bundler. I am trying to install another Ruby on under a different user account but on the same VPS. When I go to run

bundle install

I get the following error:

Could not locate Gemfile

I could remove the contents of the ./bundle directory so that all Gems are re-fetched to clear the error but will this have an impact on my other application using the same Gems and Bundler? I don't want to risk taking the other app down.

+2  A: 

You do not have Gemfile in a directory where you run that command.

Gemfile is a file containing your gem settings for a current program.

Joni
Thanks. It was something this simple. I just had a problem because I had to be logged in as an admin user to run the command but the gemfile was in a directory under a different user. I managed to get it sorted. Thanks!
Ian
+1  A: 

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

bluesman333
Yes, this was indeed the problem and I managed to get it sorted out in the end. Thanks for your help.
Ian