Bundle install - Could not locate Gemfile or .bundle/ directory

AI-generated summary

The discussion revolves around the error “Could not locate Gemfile or .bundle/ directory” when running bundle install during a Discourse installation.

The original poster, JimmyX, encountered this issue on Fedora 23 while following a tutorial for a Unix installation. fantasticfears suggested finding the Discourse files as a potential solution, but JimmyX decided to restart the installation.

After trying a different approach with a Bitnami Discourse Stack, JimmyX was able to successfully install Discourse. However, another user, hom3mad3, reported experiencing the same issue on Ubuntu 16.04 (VM Vagrant) despite having Bundler installed.

jack2 and mpalmer suggested that the issue might be related to a mismatch between the guest additions version and the VirtualBox version, which can prevent shared folders from working properly.

I am installing on Fedora 23. I downloaded VirtualBox and then followed this tutorial (but for Unix)

I can SSH into the vagrant OK. Then “cd /vagrant” works OK.

“bundle install” gives the error “Could not locate Gemfile or .bundle/ directory”.

What step(s) am I missing?

Can you find Discourse files?

find / -name discourse.rb

I wiped the installation. I’m downloading and starting again. Something was badly screwy. Will revert back here if I get the same problem.

The DL failed a couple of times today. So I am trying the discourse image from https://bitnami.com.

Be aware, development instance is totally different than installation. What do you want to do?

The bitnami.com install downloaded quickly and worked immediately. I ran their installer and discourse was up and running right away. I named the site, gave my email and password, and that was it. This is from their README

Bitnami Discourse Stack ships with the following software versions:

  • Discourse 1.4.6
  • Apache 2.4.18
  • PostgreSQL 9.4.6
  • Ruby 2.1.8
  • Rails 4.2.5.1
  • RubyGems 1.8.12

I want to look at discourse and see if I can use it for my image heavy web site. Someone said I’d need to write a plug in so I thought I’d look at doing that.

i had this problem once. reinstalled everything from scratch. it started working again. 3 days later same problem reappears.

i check for bundle -v

it confirms that Bundler is installed :
Bundler version 1.12.5

bundle install gives me the same error

i am running locally on Ubuntu 16.04 (VM Vagrant) . Am I missing something?

Same here: sometimes the shared folder is empty, hence the bundle issue.

When running vagrant up, I get this warning:

==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default:
    default: Guest Additions Version: 5.0.18
    default: VirtualBox Version: 5.1

… and as that warning says, if the guest additions version doesn’t match your VirtualBox version, you don’t necessarily get shared folders.