Reputation: 946
I'm having trouble with uploading and deploying ruby app on Elastic Beanstalk
In the '/var/log/eb-activity.log' there was an error '/opt/rubies/ruby-2.4.4/lib/ruby/site_ruby/2.4.0/bundler.rb:221:in `rescue in root': Could not locate Gemfile or .bundle/ directory (Bundler::GemfileNotFound)'.
here is part of the code on line 221 from bundler.rb from the ec2 instance
def root
@root ||= begin
default_gemfile.dirname.expand_path
rescue GemfileNotFound
bundle_dir = default_bundle_dir
raise GemfileNotFound, "Could not locate Gemfile or .bundle/ directory" unless bundle_dir
Pathname.new(File.expand_path("..", bundle_dir))
end
end
This website has full code of bundler.rb that is exact similar to my bundler.rb
http://sistework.mspbs.gov.py/redmin/GEM_HOME/gems/bundler-1.10.6/lib/bundler.rb
by the way usually I run this command before i zip the app and upload it
bundle package
from this link
https://aws.amazon.com/blogs/devops/locally-packaging-gem-dependencies-for-ruby-applications-in-elastic-beanstalk/
Upvotes: 0
Views: 810
Reputation: 23
Two things usually solve this for me.
bundle exec <Your path> puma
Upvotes: 1