Gem rbtrace-0.4.4 won't install

(Jens Maier) #1

So 00ab6f5f broke my development setup last night, because rbtrace-0.4.4 refuses to install properly.

One of the changes between 0.4.3 and 0.4.4 causes some confusion as to where the native extension library gets installed to; the extconf.rb queries Ruby’s libdir, but the configure script generated by my system’s autotools sticks to a traditional ${PREFIX}/lib path even on amd64. I’m fairly certain that this issue will only affect specific systems (i.e. Gentoo/amd64).

As a workaround, I’ve cloned rbtrace and applied the patch below and manually built and installed the gem.

diff --git c/ext/extconf.rb w/ext/extconf.rb
index 2bf47ce..6750b4e 100644
--- c/ext/extconf.rb
+++ w/ext/extconf.rb
@@ -38,7 +38,7 @@ unless File.exists?("#{CWD}/dst/#{libdir}/libmsgpackc.a")
       if RUBY_PLATFORM =~ /darwin/ and File.exist?("/usr/bin/gcc-4.2")
         ENV['CC'] = '/usr/bin/gcc-4.2'
-      sys("./configure --disable-dependency-tracking --disable-shared --with-pic --prefix=#{CWD}/dst/")
+      sys("./configure --disable-dependency-tracking --disable-shared --with-pic --prefix=#{CWD}/dst/ --libdir=#{CWD}/dst/#{libdir}")
       sys("make install")

So TIL why bundling Discourse into a Docker container isn’t such a bad idea afterall… :wink:

How to update to Discourse 1.0?
How to update to Discourse 1.0?
(Jens Maier) #2

Update: the patch was accepted upstream. Instead of manually patching, grab the source from GitHub - tmm1/rbtrace: like strace, but for ruby code and install the gem with:

git clone
cd rbtrace
gem build rbtrace.gemspec
gem install rbspec-0.4.4.gem

(Sebastien Rey) #3

Hi thanks for explanation,

how did you do to replace the bad gem downloaded with bundle install --without test --deployment by the gem installed manually ?

I use you command line “gem install rbspec-0.4.4.gem”, install work, but error continue with bundle cmd.

Update : Found, this is bundle install --local cmd used in the repository…

Update2 : Not work, when i try to relaunch the gem of discourse, same problem … i need probably to modify the gemfile of discourse ?

(Sam Saffron) #4

I will update rbtrace in gemfile lock today

(Jens Maier) #5

Are you gem installing as the same user that eventually runs Discourse? Normally, Bundler checks if a gem of the desired version is already installed on your system and will just use that gem if it is present…

(Sam Saffron) #6

Ahh, still waiting on version bump, as soon as that is done we can update it.

(Sam Saffron) #7


I :heart: open source.

(Sebastien Rey) #10

Thanks a lot @elberet and @sam it works now :slight_smile: