Ruby 1.8.6 build requirement

40 views
Skip to first unread message

Jason

unread,
Jan 29, 2008, 12:17:03 AM1/29/08
to thin-ruby
Hello,

I just found Thin this morning and was wanting to try it out on my
CentOS 5.1 test servers. However, when I went to install the gem I got
an error saying that Ruby 1.8.6 was required. I'm guessing that the
reason 1.8.6 is required is because of the fastthread fixes. Is this
true?

Also, is there anyone else running Thin on CentOS 5? TIA

- jason

macournoyer

unread,
Jan 29, 2008, 12:27:52 AM1/29/08
to thin-ruby
No, thin doesn't use any thread.
I set it to 1.8.6 to prevent requiring cgi_multipart_eof_fix, that
fixes an exploit in cgi parsing in all version prior to 1.8.6

tomfarm

unread,
Jan 29, 2008, 6:11:28 AM1/29/08
to thin-ruby
Hi,

after updating ruby from 1.8.4 to 1.8.6 thin won't compiler either.

This is a debian etch system, manually installed ruby 1.8.6 patchlevel
111

debian:~$ ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]
debian:~$ gem -v
1.0.1
debian:~$ sudo gem install thin --no-rdoc --no-ri
Select which gem to install for your platform (i486-linux)
1. thin 0.6.1 (x86-mswin32-60)
2. thin 0.6.1 (ruby)
3. thin 0.6.0 (ruby)
4. thin 0.6.0 (x86-mswin32-60)
5. thin 0.5.4 (ruby)
6. thin 0.5.4 (x86-mswin32-60)
7. thin 0.5.3 (ruby)
8. thin 0.5.3 (x86-mswin32-60)
9. thin 0.5.2 (ruby)
10. Thin 0.5.1 (ruby)
11. thin 0.5.0 (ruby)
12. thin 0.4.1 (ruby)
13. thin 0.4.0 (ruby)
14. thin 0.3.0 (ruby)
15. Cancel installation
> 2
ERROR: While executing gem ... (RuntimeError)
thin requires Ruby version >= 1.8.6

Any ideas?


-tom

macournoyer

unread,
Jan 29, 2008, 8:40:23 AM1/29/08
to thin-ruby
have you installed rubygems for that Ruby version also?
that is very weird

Jason

unread,
Jan 29, 2008, 9:43:19 AM1/29/08
to thin-ruby
Oh, ok. Well I guess I'm faced with either keeping my Ruby 1.8.5
x86_64 default packages or removing them all and going with 1.8.6 i686
packages that someone else put together.

I know this is totally not Thin related (well, I guess deployment-wise
it kinda is, esp. since I *really* want to get it running ;) but does
anyone have any thoughts/opinions on running x86_64 ruby vs. 686 ruby?

My production deployment hits on 4/1 (not a joke) and I'd like to hit
the ground running with the fastest possible apps. Hence, my interest
in Thin.

Thanks again,

- jason

tomfarm

unread,
Jan 29, 2008, 10:13:11 AM1/29/08
to thin-ruby
yes, i did install everything from scratch.
and the gem command uses ruby 1.8.6.

macournoyer

unread,
Jan 29, 2008, 2:00:47 PM1/29/08
to thin-ruby
it's weird because rubygems 1.0.1 should select the platform for you,
you should't see that menu to select the version.

You can try installing from source: http://code.macournoyer.com/thin/download/

macournoyer

unread,
Jan 29, 2008, 2:08:09 PM1/29/08
to thin-ruby
I'm running refactormycode.com on Thin on SliceHost w/:

ruby 1.8.6 (2007-09-23 patchlevel 110) [x86_64-linux]

I really think you should upgrade, lots of things have been fixed in
Ruby since 1.8.5

Jason

unread,
Jan 29, 2008, 2:45:05 PM1/29/08
to thin-ruby
Hi,

yah I'm in complete agreement with you, but I'm running into a lot of
config issues using 1.8.6. I supposed what I should really do is
install 1.8.6 from scratch, which I've done on OS X many times. So
when you mentioned the cgi multipart fix, would it be bad to try to
compile Thin w/ruby 1.8.5 and that fix? Just looking at my options and
the quickest timeframe for me.

Thx,

- jason

macournoyer

unread,
Jan 29, 2008, 3:16:56 PM1/29/08
to thin-ruby
Mongrel only requires Ruby 1.8.4 and includes the cgi fix so I guess
it's not bad.
You can download the source, hack the required Ruby version in tasks/
gem.rake and install cgi_multipart_eof_fix gem.

Good luck :)

Jason

unread,
Jan 29, 2008, 4:04:46 PM1/29/08
to thin-ruby
Yah I just did that - changed the gem spec to 1.8.5 - and it installed
fine. I'm going to run my test again now and see if there's much
difference.

thx again,

- jason

Jason

unread,
Jan 29, 2008, 4:10:34 PM1/29/08
to thin-ruby
Hmm, so now I encounter an error after Thin starts. It starts fine but
as soon as I hit the site, I get this message:

root@backup current]# thin -e production start
>> Thin web server (v0.6.2 codename Rambo)
>> Listening on 0.0.0.0:3000, CTRL+C to stop
/usr/bin/ruby: symbol lookup error: /usr/lib64/ruby/gems/1.8/gems/
thin-0.6.2/lib/thin_parser.so: undefined symbol: RSTRING_PTR

?

Guess I'll go digging..

- jason

macournoyer

unread,
Jan 29, 2008, 4:30:18 PM1/29/08
to thin-ruby
right, those macros are defined in 1.8.6 and earlier and are required
to be used in 1.9

http://www.ruby-forum.com/topic/137544

If you manage to make a patch that works in 1.8.5 and 1.8.6, I'll
happily include it.

Jason

unread,
Jan 29, 2008, 4:53:01 PM1/29/08
to thin-ruby
yah, i'd love to but unfortunately for me, this is where i call it
quits.

i look forward to re-visiting thin once centos 5 updates the ruby
1.8.6.

thanks,

- jason

Wincent Colaiuta

unread,
Feb 29, 2008, 8:56:31 AM2/29/08
to thin-ruby
On 29 ene, 22:30, macournoyer <macourno...@gmail.com> wrote:
> right, those macros are defined in1.8.6and earlier and are required
> to be used in 1.9
>
> http://www.ruby-forum.com/topic/137544
>
> If you manage to make a patch that works in 1.8.5 and1.8.6, I'll
> happily include it.

Have attached a patch to this ticket:

http://thin.lighthouseapp.com/projects/7212-thin/tickets/49-patch-compatibility-macros-for-ruby-1-8-5

Cheers,
Wincent

chuyeow

unread,
Mar 2, 2008, 10:57:07 AM3/2/08
to thin-ruby
A little late to the conversation, but just wanted to make a note that
simply installing Ruby 1.8.6 (patch level 111 in my case) works just
fine. I've a number of Ubuntu Feisty 6.06 LTS boxes and so was stuck
at 1.8.5 if I were to use apt-get, similar to Jason's (the OP)
problem.

Just:
1. Download Ruby 1.8.6-p111 source.
2. Compile it. ./configure with a --prefix (I used /usr/local/
ruby1.8.6), make, and make install.
3. Download Rubygems source.
4. Make sure ruby 1.8.6 is on the path.
5. Install Rubygems.
6. Make sure the gem binary that you just installed is on the path
(which gem).
7. gem install thin
8. You're good to go at this point, with thin installed in your new
RUBYGEMS_HOME.

I'm sure there are saner ways to go about installing multiple versions
of Ruby and their Rubygems, but this worked for me as a one-off thing
until I get more servers where I can put 1.8.6 on.

Still, I'm really interested in seeing Wincent's patch get applied (I
think you guys are working it out, so great! Can't access Lighthouse
atm)

Cheers,
Chu Yeow


On Feb 29, 9:56 pm, Wincent Colaiuta <w...@wincent.com> wrote:
> On 29 ene, 22:30, macournoyer <macourno...@gmail.com> wrote:
>
> > right, those macros are defined in1.8.6and earlier and are required
> > to be used in 1.9
>
> >http://www.ruby-forum.com/topic/137544
>
> > If you manage to make a patch that works in 1.8.5 and1.8.6, I'll
> > happily include it.
>
> Have attached a patch to this ticket:
>
> http://thin.lighthouseapp.com/projects/7212-thin/tickets/49-patch-com...
>
> Cheers,
> Wincent

Wincent Colaiuta

unread,
Mar 3, 2008, 9:58:15 AM3/3/08
to thin-ruby
On Mar 2, 4:57 pm, chuyeow <chuy...@gmail.com> wrote:
> Still, I'm really interested in seeing Wincent's patch get applied (I
> think you guys are working it out, so great! Can't access Lighthouse
> atm)

Yes, it was already applied.

Cheers,
Wincent
Reply all
Reply to author
Forward
Message has been deleted
0 new messages