Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rdiscount is broken in os x snow leopard #6

Closed
jurisgalang opened this issue Sep 23, 2009 · 4 comments
Closed

rdiscount is broken in os x snow leopard #6

jurisgalang opened this issue Sep 23, 2009 · 4 comments

Comments

@jurisgalang
Copy link

After installing via gems: gem install rdiscount
Invoking: rdiscount
Will yield:

ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle: dlopen(/.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle, 9): no suitable image found. Did find: (LoadError) /.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle: mach-o, but wrong architecture - /.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.bundle from /opt/ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
from /.gem/ruby/18/gems/rdiscount-1.3.5/lib/rdiscount.rb:72
from /opt/ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require' from /opt/ruby18/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
from /.gem/ruby/18/gems/rdiscount-1.3.5/bin/rdiscount:4
from /.gem/ruby/18/bin/rdiscount:19:in load' from /.gem/ruby/18/bin/rdiscount:19

@jurisgalang
Copy link
Author

Found a fix:

diff --git a/lib/rdiscount.rb b/lib/rdiscount.rb
index 2ce0b0d..c92da75 100644
--- a/lib/rdiscount.rb
+++ b/lib/rdiscount.rb
@@ -69,4 +69,4 @@ end

Markdown = RDiscount unless defined? Markdown

-require 'rdiscount.so'
+require 'rdiscount'
diff --git a/rdiscount.gemspec b/rdiscount.gemspec
index 61f16cd..126ffc4 100644
--- a/rdiscount.gemspec
+++ b/rdiscount.gemspec
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
s.name = 'rdiscount'
s.version = '1.3.5'
s.summary = "Fast Implementation of Gruber's Markdown in C"

@rtomayko
Copy link
Collaborator

That probably doesn't actually fix it. require 'rdiscount' brings in the ruby lib, require 'rdiscount.so' brings in the C extension. Changing it to 'rdiscount' is probably just causing the extension not to load at all.

@kamiller
Copy link

Reinstalling XCode from the Snow Leopard DVD fixed my ruby install, it was missing header files, etc...

After the reinstall I was able to successfully install rdiscount via gem.

@rtomayko
Copy link
Collaborator

Cool.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants