. 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.
Simply change the directories in your app and then run bundle install
:
You must be listed in the same
Gemfile
directoryThis worked in my case:
cd /usr/bin
touch Gemfile
bundle install
.This problem occurred on Ubuntu 18.04. I updated the gem
All worked and goto your browser just go to http://127.0.0.1:4000/ and it really should be running
gem update --system
was helpful to me when I faced a similar problem. This should be run before you usebundle install
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>
orcd !$
– that is magic 😉bundle install
bundle exec jekyll serve
In the same command, you can also indicate the path of the gemfile.