# Rdiscount Deadlock!

**URL:** <https://www.ruby-forum.com/t/rdiscount-deadlock/171785>\
**Category:** Rails\
**Created:** [July 9, 2009, 9:04am UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785 "2009-07-09T09:04:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 9, 2009, 9:04am UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/1 "2009-07-09T09:04:00Z")

</div>

rdiscount-1.3.1.1 is uninstallable on solaris

* * *

root@dcb0:/opt/gitorious# gem install rdiscount -v 1.3.1.1  
Building native extensions. This could take a while…  
ERROR: Error installing rdiscount:  
ERROR: Failed to build gem native extension.

## /opt/ruby/bin/ruby extconf.rb checking for random()… yes checking for srandom()… yes checking for funopen()… no checking for fopencookie()… no extconf.rb:11: No funopen or fopencookie support available. (RuntimeError)

so I have installed rdiscount-1.3.4

and

rake db:migrate for gitorious wants rdiscount = 1.3.1.1

* * *

root@dcb0:/opt/gitorious# rake db:migrate  
(in /opt/gitorious)  
Missing these required gems:  
rdiscount = 1.3.1.1

## You’re running: ruby 1.8.7.72 at /opt/ruby/bin/ruby rubygems 1.3.2 at /home/marya/.gem/ruby/1.8, /opt/ruby/lib/ruby/gems/1.8

is there someway to bypass version check ?

i tried to make symlink of rdiscount-1.3.4 to rdiscount-1.3.1.1 and  
upadted rdiscount.gemspec with ver 1.3.1.1

but still rake db:migrate gives error for rdiscount-1.3.1.1

---

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 10, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/2 "2009-07-10T18:50:30Z")

</div>

> Missing these required gems:  
> rdiscount = 1.3.1.1

comment out the line that requires this gem version 🙂  
?  
=r

---

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 11, 2009, 11:31pm UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/3 "2009-07-11T23:31:04Z")

</div>

On Jul 9, 3:04 am, Manish A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ## checking for srandom()… yes rake db:migrate for gitorious wants rdiscount = 1.3.1.1 /opt/ruby/lib/ruby/gems/1.8
> 
> is there someway to bypass version check ?
> 
> i tried to make symlink of rdiscount-1.3.4 to rdiscount-1.3.1.1 and  
> upadted rdiscount.gemspec with ver 1.3.1.1

I wouldn’t recommend doing that - it’s not recommended, nor is it  
correct.

Looking over the gitorious source, the config/environment.rb file  
specifically requires that version. A quick scan of the rdiscount  
source history shows that the most notable changes made between  
1.3.1.1 and 1.3.4 were moving up the underlying Discount version and  
correcting the issue with funopen you’ve run into above. Just fix the  
line in environment.rb and things should be fine.

–Matt J.

---

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 17, 2009, 10:27am UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/4 "2009-07-17T10:27:13Z")

</div>

sorry for late reply

I rebuild rdiscount after changing “s.version = ‘1.3.1.1’” in  
rdiscount.gemspec file.

this fooled gitorious while version check 😉

Regards,  
-Manish

Matt J. wrote:

> On Jul 9, 3:04ï¿½am, Manish A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > ## checking for srandom()… yes rake db:migrate for gitorious wants ï¿½rdiscount ï¿½= 1.3.1.1 /opt/ruby/lib/ruby/gems/1.8
> > 
> > is there someway to bypass version check ?
> > 
> > i tried to make symlink of rdiscount-1.3.4 to rdiscount-1.3.1.1 and  
> > upadted rdiscount.gemspec with ver 1.3.1.1
> 
> I wouldn’t recommend doing that - it’s not recommended, nor is it  
> correct.
> 
> Looking over the gitorious source, the config/environment.rb file  
> specifically requires that version. A quick scan of the rdiscount  
> source history shows that the most notable changes made between  
> 1.3.1.1 and 1.3.4 were moving up the underlying Discount version and  
> correcting the issue with funopen you’ve run into above. Just fix the  
> line in environment.rb and things should be fine.
> 
> –Matt J.

---

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 18, 2009, 5:57pm UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/5 "2009-07-18T17:57:17Z")

</div>

Is there some reason that you can’t just fix the config.gem line in  
Gitorious’s environment.rb?

Seriously, the next developer on the project is going to be severely  
confused…

–Matt J.

On Jul 17, 4:27 am, Manish A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 20, 2009, 5:04am UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/6 "2009-07-20T05:04:42Z")

</div>

yea, because in environment.rb its clearly mentioned

config.gem “rdiscount”, :version =\> “1.3.1.1”

but at the time of installing rdiscount it wants

version = “1.3.1.1”

Matt J. wrote:

> Is there some reason that you can’t just fix the config.gem line in  
> Gitorious’s environment.rb?
> 
> Seriously, the next developer on the project is going to be severely  
> confused…
> 
> –Matt J.
> 
> On Jul 17, 4:27ï¿½am, Manish A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![mka](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mka](https://www.ruby-forum.com/u/mka)\
**Post date:** [July 20, 2009, 3:49pm UTC](https://www.ruby-forum.com/t/rdiscount-deadlock/171785/7 "2009-07-20T15:49:58Z")

</div>

On Jul 19, 11:04 pm, Manish A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> yea, because in environment.rb its clearly mentioned
> 
> config.gem “rdiscount”, :version =\> “1.3.1.1”
> 
> but at the time of installing rdiscount it wants
> 
> version = “1.3.1.1”

Were you expecting something else? That’s what the config.gem line  
means. Changing it to:

config.gem ‘rdiscount’, :version =\> ‘\>= 1.3.1.1’

will work, as will

config.gem ‘rdiscount’, :version =\> ‘1.3.4’

–Matt J.
