Skip to content

Instantly share code, notes, and snippets.

@cowboyd
Forked from luislavena/gist:251663
Created February 11, 2010 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cowboyd/302029 to your computer and use it in GitHub Desktop.
Save cowboyd/302029 to your computer and use it in GitHub Desktop.
# 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
#jeweler uses the 'build' task to package the gem file,
#rake-compiler chains the native GemPackageTask onto the "gem" task.
#so chain the :gem task onto :build
task :gem => :build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment