wycats / bundler

407 stars 30 forks source link

linecache19 can't be bundled without having ruby_core_source installed as a system gem #160

Closed myronmarston closed 14 years ago

myronmarston commented 14 years ago

My ruby and bundler versions:

~/projects/linecache19-bundler-test% ruby --version
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-darwin10.2.0]
~/projects/linecache19-bundler-test% gem list | grep bundler
bundler (0.8.0)

I've got this simple Gemfile:

gem 'linecache19', '0.5.11'

Here's what happens when I bundle:

~/projects/linecache19-bundler-test% gem bundle
Calculating dependencies...
Updating source: http://gems.rubyforge.org
Downloading archive-tar-minitar-0.5.2.gem
Downloading linecache19-0.5.11.gem
Downloading ruby_core_source-0.1.4.gem
Installing archive-tar-minitar (0.5.2)
Installing ruby_core_source (0.1.4)
Installing linecache19 (0.5.11)
Building native extensions.  This could take a while...
ERROR:  While executing gem ... (Gem::Installer::ExtensionBuildError)
    ERROR: Failed to build gem native extension.

/Users/myron/.rvm/ruby-1.9.1-p376/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/myron/.rvm/ruby-1.9.1-p376/bin/ruby
extconf.rb:2:in `require': no such file to load -- ruby_core_source (LoadError)
    from extconf.rb:2:in `<main>'

Gem files will remain installed in /Users/myron/projects/linecache19-bundler-test/vendor/gems/ruby/1.9.1/gems/linecache19-0.5.11 for inspection.
Results logged to /Users/myron/projects/linecache19-bundler-test/vendor/gems/ruby/1.9.1/gems/linecache19-0.5.11/ext/trace_nums/gem_make.out

The solution is to install ruby_core_source as a system gem:

~/projects/linecache19-bundler-test% gem install ruby_core_source
Successfully installed archive-tar-minitar-0.5.2
Successfully installed ruby_core_source-0.1.4
2 gems installed
~/projects/linecache19-bundler-test% gem bundle
Calculating dependencies...
Updating source: http://gems.rubyforge.org
Done.

This works OK, but it defeats the purpose of using bundler (i.e. being able to install all gems with gem bundle, without having to have any particular system gems installed).

kvs commented 14 years ago

http://gist.github.com/283326 seems to fix it, but I don't know if it's a good way to do it. The core issue seems to be that native extensions are built without the environment being set up, so the installed dependencies can't be found.

ccthiel commented 14 years ago

I can't even get this working when I have ruby_core_source installed as a system gem.

ghost commented 14 years ago

I can't even get this working when I have ruby_core_source installed as a system gem.

Burgestrand commented 14 years ago

This issue could be solved (for me, at least) by something along the lines of http://github.com/wycats/bundler/issues/107

myronmarston commented 14 years ago

I have no idea if this is still an issue. If you're still having this issue, you should file it on the carlhuda issue tracker.

pavelz commented 14 years ago

Has this been resolved? I am getting this problem on Ubuntu 10.04 with Native install of ruby 1.9.2 rails 3.0.0, even as I have installed ruby_core_source.

pavelz commented 14 years ago

extconf.rb:2:in require': no such file to load -- ruby_core_source (LoadError) from extconf.rb:2:in

'