Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/Fixing the error: could not locate gemfile or .bundle/ directory
Next
In Process
Adam Le Roux
  • 29
Adam Le Roux
Asked: May 18, 20222022-05-18T14:48:57+00:00 2022-05-18T14:48:57+00:00In: Programs

Fixing the error: could not locate gemfile or .bundle/ directory

  • 29

. Advertisement .

..3..

. Advertisement .

..4..

I get the “could not locate gemfile or .bundle/ directory” error as the title says. How can I fix it so the error goes away?
Here is my detail:

source 'https://rubygems.org'
 
 gem 'rails', '3.2.3'
 
 group :development do
  gem 'sqlite3', '1.3.5'
 end
 
 
 # Gems used only for assets and not required
 # in production environments by default.
 
 group :assets do
  gem 'sass-rails', '3.2.4'
  gem 'coffee-rails', '3.2.2'
  gem 'uglifier', '1.2.3'
 end
 
 gem 'jquery-rails', '2.0.0'
 
 group :production do
  gem 'pg', '0.12.2'
 end
$ bundle install --without production

When I operated it, I received the error text:

could not locate gemfile or .bundle/ directory

I appreciate any help from you.

♦ Suggestions of ITtutoria Team

Simply change the directories in your app and then run bundle install:

could not locate gemfile
  • 6 6 Answers
  • 133 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

6 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Jules Mas
    2022-05-18T14:49:11+00:00Added an answer on May 18, 2022 at 2:49 pm

    You must be listed in the same Gemfile directory

    • 19
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Mohamed Bouvier
    2022-05-18T14:49:08+00:00Added an answer on May 18, 2022 at 2:49 pm

    This worked in my case:

    • cd /usr/bin
    • touch Gemfile
    • You can now run bundle install.
    • 14
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  3. Maël Hardy
    2022-05-18T14:49:14+00:00Added an answer on May 18, 2022 at 2:49 pm

    This problem occurred on Ubuntu 18.04. I updated the gem

    sudo gem install rails
    sudo gem install jekyll
    sudo gem install jekyll bundler
    cd ~/desiredFolder
    jekyll new <foldername>
    cd <foldername> OR 
    bundle init
    bundle install
    bundle add jekyll
    bundle exec jekyll serve

    All worked and goto your browser just go to http://127.0.0.1:4000/ and it really should be running

    • 10
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  4. Louise Millot
    2022-05-18T14:49:01+00:00Added an answer on May 18, 2022 at 2:49 pm

    gem update --system was helpful to me when I faced a similar problem. This should be run before you use bundle install

    • 9
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  5. Gabriel Huet
    2022-05-18T14:49:04+00:00Added an answer on May 18, 2022 at 2:49 pm


    This problem was also experienced on an OSX system. Rails wasn’t installed on my OSX machine, which was surprising as Rails is always included with OSX. To install rails

    • sudo gem install rails

    • To install jekyll, I also needed sudo

    • sudo gem install jekyll bundler
    • cd ~/Sites
    • jekyll new <foldername>
    • cd <foldername> or cd !$ – that is magic 😉
    • bundle install
    • bundle exec jekyll serve
    • Then in your browser just go to http://127.0.0.1:4000/ and it really should be running
    • 9
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  6. Liam Millot
    2022-05-18T14:49:18+00:00Added an answer on May 18, 2022 at 2:49 pm

    In the same command, you can also indicate the path of the gemfile.

    BUNDLE_GEMFILE="MyProject/Gemfile.ios" bundle install
    • 8
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.