Bug 1054793 - Bundler cannot load native extensions
Summary: Bundler cannot load native extensions
Alias: None
Product: Fedora
Classification: Fedora
Component: rubygem-bundler
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Vít Ondruch
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-17 13:44 UTC by Vít Ondruch
Modified: 2014-05-02 12:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-05-02 12:06:29 UTC

Attachments (Terms of Use)
rebase of Vit's patch for bundler 1.3.5 (772 bytes, patch)
2014-04-07 05:55 UTC, Allen Hewes
no flags Details | Diff

Description Vít Ondruch 2014-01-17 13:44:53 UTC
Bundler cannot load native extensions, since the patch which adds this support was dropped from the package:

# rails s
/usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
	from /usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3.rb:6:in `rescue in <top (required)>'
	from /usr/share/gems/gems/sqlite3-1.3.7/lib/sqlite3.rb:2:in `<top (required)>'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `require'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `each'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler/runtime.rb:72:in `block in require'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `each'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler/runtime.rb:61:in `require'
	from /usr/share/gems/gems/bundler-1.5.2/lib/bundler.rb:131:in `require'
	from /builddir/ta/config/application.rb:7:in `<top (required)>'
	from /usr/share/gems/gems/railties-4.0.2/lib/rails/commands.rb:74:in `require'
	from /usr/share/gems/gems/railties-4.0.2/lib/rails/commands.rb:74:in `block in <top (required)>'
	from /usr/share/gems/gems/railties-4.0.2/lib/rails/commands.rb:71:in `tap'
	from /usr/share/gems/gems/railties-4.0.2/lib/rails/commands.rb:71:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'

Comment 1 Allen Hewes 2014-04-07 05:54:43 UTC

Here's a rebased patch for bundler 1.5.3 when used with RubyGems < 2.2.0 (rawhide has RubyGems 2.1.11), but if RubyGems was updated to 2.2.0+ in rawhide, then I think bundler 1.5.3+ would work without your/this patch. The bundler folks added support for your changes to Rubygems:

bundler 1.5.3 lib/bundler/rubygems_ext.rb
 36     def load_paths
 37       return full_require_paths if respond_to?(:full_require_paths)
 39       require_paths.map do |require_path|
 40         if require_path.include?(full_gem_path)
 41           require_path
 42         else
 43           File.join(full_gem_path, require_path)
 44         end
 45       end
 46     end

Isn't full_require_paths in RubyGems 2.2.0+ only?

Comment 2 Allen Hewes 2014-04-07 05:55:39 UTC
Created attachment 883473 [details]
rebase of Vit's patch for bundler 1.3.5

Comment 3 Vít Ondruch 2014-04-07 08:38:25 UTC
Hi Allen,

Thanks for the patch. If it is not blocking you, I would wait for RubyGems 2.2 landing in Rawhide. Actually, I already requested side tag for Ruby 2.1, which ships with RubyGems 2.2, so hopefully, it should not take too long.

Comment 4 Allen Hewes 2014-04-07 15:54:51 UTC

No blocker for me. I've gone ahead and made my changes in my repository. I remember seeing your e-mail on the ruby-sig list. I thought I could help by providing something that at least gets bundler back to working state.

I thought Mo was trying to get an upgraded bundler in RHEL 6?

I looked at some other versions of bundler for my needs and I did two packages: one for bundler 1.3.6 and one for bundler 1.5.3.

The 1.3.6 edition seems to be the latest version where it's use is meant for Ruby(ies) prior to 2.1.X and RubyGems prior to 2.2.0.

Bundler 1.5.3 requires new stuff like RubyGems 2.2.0+ and rpsec 3.0.0.beta2 (to run test suite).

Maybe just doing a bundler 1.3.6 would be sufficient where you aren't using Ruby 2.1.0+/RubyGems 2.2.0+?

Comment 5 Josef Stribny 2014-05-02 11:39:53 UTC
I did some testing of the new Rails 4.1 together with Bundler regarding the new RubyGems and everything works so far. Even updating to bundler 1.6.2 using `gem update` doesn't seem to break anything for me. So hopefully this is solved by the update.

Comment 6 Vít Ondruch 2014-05-02 12:06:29 UTC
Josef, thanks for testing. Closing this now.

Note You need to log in before you can comment on or make changes to this bug.