Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

check for openssl during package installation.

  • Loading branch information...
commit 0085d4d3c5fdf2f71ca8f4412927c5147fa3d96f 1 parent 5b72eef
@bryanlarsen bryanlarsen authored
Showing with 10 additions and 0 deletions.
  1. +1 −0  dryml/dryml.gemspec
  2. +9 −0 dryml/ext/mkrf_conf.rb
View
1  dryml/dryml.gemspec
@@ -25,4 +25,5 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
+ s.extensions = 'ext/mkrf_conf.rb'
end
View
9 dryml/ext/mkrf_conf.rb
@@ -0,0 +1,9 @@
+require 'rubygems'
+
+# the whole reason this file exists: to return an error if openssl
+# isn't installed.
+require 'openssl'
+
+f = File.open(File.join(File.dirname(__FILE__), "Rakefile"), "w") # create dummy rakefile to indicate success
+f.write("task :default\n")
+f.close

4 comments on commit 0085d4d

@thekindofme

nice! :)

@tjhayasaka
Collaborator

Does it work on read-only file system?

@bryanlarsen
Collaborator

thekindofme: thank you very much for the pointer. I should have credited you. Sorry about that.

tjhayasaka: good question. I would expect so, but I haven't tested it.

@tjhayasaka
Collaborator

Oops, I was stupid. The commit is fine.

Gem installation is usually done on a writable filesystem, otherwise extensions won't work.

Please sign in to comment.
Something went wrong with that request. Please try again.