rubygems / bundler

Manage your Ruby application's gem dependencies

Home Page:https://bundler.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Last version of bundle not load gems

NaNdaWteK opened this issue · comments

commented

I get an error from last sunday with the last version of bundle

 rake aborted!
299 LoadError: cannot load such file -- sequel
300 /opt/api/Rakefile:1:in `<top (required)>'

I change to 1.17 bundle version and all works fine

Hi @NaNdaWteK.

Can you tell me something more about your environment? Is this a docker image? Can you post the result of bundle env? What command is it being run that fails? How can I reproduce this?

With three lines cut from a log it is very hard for me to figure it out.

Thanks!

commented

At this moment I cant push it to the repo to get you the result of the bundle env command, but there are some files, I try to change the sequel gem & ruby versions, but the problem solves when change the bundle version

Api Dockerfile

FROM ruby:2.6.1

ENV MODE development
ENV HOST localhost

ENV HOME=/opt/api

RUN mkdir -p $HOME

ADD . $HOME

WORKDIR $HOME

RUN gem install bundler

RUN bundle install

CMD ["bundle", "exec", "rake"]

Gemfile

source "https://rubygems.org"

ruby '2.6.1'

gem 'sinatra', '~> 2.0', '>= 2.0.3'
gem 'sequel', '5.11'
# gem 'sequel', '~> 5.27'
gem 'pg', '~> 1.1', '>= 1.1.4'
gem 'rake', '~> 12.3', '>= 12.3.1'

group :development do
  gem 'rerun', '~> 0.13.0'
end

group :test do
  gem 'nokogiri', '~> 1.10', '>= 1.10.1'
  gem 'rack-test', '~> 1.1'
  gem 'capybara', '~> 3.7', '>= 3.7.1'
  gem 'rspec', '~> 3.8'
end

When I can I show you the result of bundle env

Thanks

commented

We are on luck, I can change it in the repo

More info of gitlab runner, the fail is still in the repo, it fails when pull the image for test stage

 ## Environment
235 ```
236 Bundler       2.1.1
237   Platforms   ruby, x86_64-linux
238 Ruby          2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
239   Full Path   /usr/local/bin/ruby
240   Config Dir  /usr/local/etc
241 RubyGems      3.0.3
242   Gem Home    /usr/local/bundle
243   Gem Path    /opt/api/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/bundle
244   User Home   /opt/api
245   User Path   /opt/api/.gem/ruby/2.6.0
246   Bin Dir     /usr/local/bundle/bin
247 Tools         
248   Git         2.11.0
249   RVM         not installed
250   rbenv       not installed
251   chruby      not installed
252 ```
253 ## Bundler Build Metadata
254 ```
255 Built At          2019-12-18
256 Git SHA           8bd21aa0f5
257 Released Version  true
258 ```
259 ## Bundler settings
260 ```
261 app_config
262   Set via BUNDLE_APP_CONFIG: "/usr/local/bundle"
263 path
264   Set via BUNDLE_PATH: "/usr/local/bundle"
265 silence_root_warning
266   Set via BUNDLE_SILENCE_ROOT_WARNING: true
267 ```
268 ## Gemfile
269 ### Gemfile
270 ```ruby
271 source "https://rubygems.org"
272 ruby '2.6.1'
273 gem 'sinatra', '~> 2.0', '>= 2.0.3'
274 gem 'sequel', '5.11'
275 # gem 'sequel', '~> 5.27'
276 gem 'pg', '~> 1.1', '>= 1.1.4'
277 gem 'rake', '~> 12.3', '>= 12.3.1'
278 group :development do
279   gem 'rerun', '~> 0.13.0'
280 end
281 group :test do
282   gem 'nokogiri', '~> 1.10', '>= 1.10.1'
283   gem 'rack-test', '~> 1.1'
284   gem 'capybara', '~> 3.7', '>= 3.7.1'
285   gem 'rspec', '~> 3.8'
286 end
287 ```
288 ### Gemfile.lock
289 ```
290 <No /opt/api/Gemfile.lock found>
291 ```
292 Removing intermediate container a4ab3dd694ce
293  ---> 2ff13469909e
294 Step 10/12 : RUN bundle --version
295  ---> Running in 9196008e530e
296 Bundler version 2.1.1
297 Removing intermediate container 9196008e530e
298  ---> 216df6f4a818
299 Step 11/12 : RUN bundle install
300  ---> Running in 2393cd1b995b
301 Fetching gem metadata from https://rubygems.org/.............
302 Fetching gem metadata from https://rubygems.org/.
303 Resolving dependencies...
304 Fetching rake 12.3.3
305 Installing rake 12.3.3
306 Fetching public_suffix 4.0.1
307 Installing public_suffix 4.0.1
308 Fetching addressable 2.7.0
309 Installing addressable 2.7.0
310 Using bundler 2.1.1
311 Fetching mini_mime 1.0.2
312 Installing mini_mime 1.0.2
313 Fetching mini_portile2 2.4.0
314 Installing mini_portile2 2.4.0
315 Fetching nokogiri 1.10.7
316 Installing nokogiri 1.10.7 with native extensions
317 Fetching rack 2.0.8
318 Installing rack 2.0.8
319 Fetching rack-test 1.1.0
320 Installing rack-test 1.1.0
321 Fetching regexp_parser 1.6.0
322 Installing regexp_parser 1.6.0
323 Fetching xpath 3.2.0
324 Installing xpath 3.2.0
325 Fetching capybara 3.29.0
326 Installing capybara 3.29.0
327 Fetching diff-lcs 1.3
328 Installing diff-lcs 1.3
329 Fetching ffi 1.11.3
330 Installing ffi 1.11.3 with native extensions
331 Fetching rb-fsevent 0.10.3
332 Installing rb-fsevent 0.10.3
333 Fetching rb-inotify 0.10.0
334 Installing rb-inotify 0.10.0
335 Fetching listen 3.2.1
336 Installing listen 3.2.1
337 Fetching mustermann 1.0.3
338 Installing mustermann 1.0.3
339 Fetching pg 1.1.4
340 Installing pg 1.1.4 with native extensions
341 Fetching rack-protection 2.0.7
342 Installing rack-protection 2.0.7
343 Fetching rerun 0.13.0
344 Installing rerun 0.13.0
345 Fetching rspec-support 3.9.0
346 Installing rspec-support 3.9.0
347 Fetching rspec-core 3.9.0
348 Installing rspec-core 3.9.0
349 Fetching rspec-expectations 3.9.0
350 Installing rspec-expectations 3.9.0
351 Fetching rspec-mocks 3.9.0
352 Installing rspec-mocks 3.9.0
353 Fetching rspec 3.9.0
354 Installing rspec 3.9.0
355 Fetching sequel 5.11.0
356 Installing sequel 5.11.0
357 Fetching tilt 2.0.10
358 Installing tilt 2.0.10
359 Fetching sinatra 2.0.7
360 Installing sinatra 2.0.7
361 Bundle complete! 9 Gemfile dependencies, 29 gems now installed.
362 Bundled gems are installed into `/usr/local/bundle`
363 Removing intermediate container 2393cd1b995b
364  ---> 1b192b6892b6
365 Step 12/12 : CMD ["bundle", "exec", "rake"]

Ok, thanks for the information. This might be a duplicate of #7494. Can you try the workarounds given there to confirm it's the same thing?

I'm not sure if we have the same problem, but reverting back to 1.17 works for us. With Bundler 2.0.2 we got following errors:

bundler: failed to load command: cap (/home/myuser/apps/project/shared/bundle/ruby/2.3.0/bin/cap)
LoadError: cannot load such file -- bundler/capistrano
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:152:in `require'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:152:in `require'
./config/deploy.rb:1:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:93:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:180:in `load_from_file'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:89:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:86:in `block in load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:86:in `each'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:86:in `load'
Capfile:7:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:93:in `instance_eval'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:93:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:180:in `load_from_file'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:89:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:86:in `block in load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:86:in `each'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/configuration/loading.rb:86:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/cli/execute.rb:65:in `block in load_recipes'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/cli/execute.rb:65:in `each'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/cli/execute.rb:65:in `load_recipes'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/cli/execute.rb:31:in `execute!'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/lib/capistrano/cli/execute.rb:14:in `execute'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/gems/capistrano-2.15.9/bin/cap:4:in `<top (required)>'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/bin/cap:22:in `load'
/home/myuser/apps/project/shared/bundle/ruby/2.3.0/bin/cap:22:in `<top (required)>'

@NaNdaWteK's problem really seemed the same problem as the linked issue. Fixed docker images have been released, so we should be alright.

Regarding your problem @h0jeZvgoxFepBQ2C, are you also under docker?

No, we just use rbenv on a dedicated ubuntu cloud server.
It really seems that some gems are not loaded with bundler 2, but it works with bundler 1 somehow. I really spent a long time to find out why this is happening, but it didn't make any sense unfortunately.

Ok, then I'm going to ahead and close this, since this one seems particular to docker and should've already been fixed.

@h0jeZvgoxFepBQ2C Could you open a new ticket with as much information as possible about the problem you're having?

commented

@NaNdaWteK's problem really seemed the same problem as the linked issue. Fixed docker images have been released, so we should be alright.

Regarding your problem @h0jeZvgoxFepBQ2C, are you also under docker?

Sorry I actually use gitlab, and I don't remember this