I'm trying to install Gitorious on Debian Wheezy. gitorious uses bundler for automated installation.

When I run "bundle install" (not only when installing gitorious, also redmine for example) I sometimes get errors like:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

~/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling houdini_js_e.c
compiling houdini_xml_e.c
compiling houdini_html_u.c
compiling houdini_html_e.c
compiling houdini_uri_u.c
compiling escape_utils.c
escape_utils.c: In function ‘rb_eu_escape_html_as_html_safe’:
escape_utils.c:126:2: error: assignment of read-only member ‘klass’
make: *** [escape_utils.o] Error 1

make failed, exit code 2

Gem files will remain installed in ~/.rvm/gems/ruby-2.1.0/gems/escape_utils-0.3.2 for inspection.
Results logged to ~/.rvm/gems/ruby-2.1.0/extensions/x86_64-linux/2.1.0/escape_utils-0.3.2/gem_make.out
An error occurred while installing escape_utils (0.3.2), and Bundler cannot continue.
Make sure that `gem install escape_utils -v '0.3.2'` succeeds before bundling.

In this specific example I was able to fix the build error by changing the sources in the given directory. (I copied the up-to-date source from github, which fixes the issue https://github.com/brianmario/escape_utils/issues/42 ).

I then executed "make && make install && ~/.rvm/rubies/ruby-2.1.0/bin/ruby extconf.rb" successfully.

How can I continue my "bundle install" after fixing the gem? When I re-execute "bundle install" the gem is simply refetched and recompiled, with the same error of course, discarding my changes completely.

What I tried so far:

  • Generating cache with "bundle package" and execute "bundle install --local"
  • Copy the compiled the gem over to the gitorious directory.
  • Executing "gem install" on the fixed sources.

What is the right way of continuing a "bundle install" after such errors?


Note: For a more specific answer, you should post the error message. You just mentioned

In this specific example I was able to fix the build error by changing the sources in the given directory.

Without specifying what was the error and how you temporary fixed it.

Check the error log. The gem extension compilation may fail because of some incompatibilities.

If the gem is already installed in your environment, then bundler will not try to reinstall it. However I saw you use RMV thus the problem will happen again if you change the gemset or Ruby version.

The best think you can do is to inspect the error. If you think that the error is a bug, the file a report and provide the steps you followed to fix it.

If the error depends on your environment, then you need to fix it or the issue will represent again as I explained.

  • Ok, I added the detailed error message. Only because I can fix the error in the sources (home directory) doesn't necessarily means that bundler will detect the gem as installed. How can I do that? – Dreamcooled Jan 18 '14 at 12:42
  • it was the environment. thx. – Dreamcooled Jan 20 '14 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.