public
Created

Workaround issue with Jeweler and rake-compiler

  • Download Gist
gistfile1.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# Hack to avoid "allocator undefined for Proc" issue when unpacking Gems:
# gemspec provided by Jeweler uses Rake::FileList for files, test_files and
# extra_rdoc_files, and procs cannot be marshalled.
 
# Jeweler Issue GH-73
# Workaround by Alex Coles (myabc)
def gemspec
@clean_gemspec ||= eval("#{Rake.application.jeweler.gemspec.to_ruby}") # $SAFE = 3\n
end
 
# Define your extension normally, using the +gemspec+ defined above
Rake::ExtensionTask.new('my_extension', gemspec) do |ext|
# ...
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.