Current Time: 15:26:04 PDT

What's Up?

If you are experiencing a problem that has not been reported here, check our web panel for more information.

(Please remember, posting in the comments here IS NOT an official way to contact DreamHost.)

Search

Pages

Categories

Other Stuff

5:11 pm

Ruby 1.8.7 Upgrades

Posted (January 2nd, 2009 at 5:11 pm PST) by Dallas

We have started the process of upgrading ruby from 1.8.5 to 1.8.7. This new version is required by some recent ruby software and has been requested several times. In our testing we didn’t discover any issues, but we have now heard about problems with some specific software applications such as RadiantCMS. If you are suddenly having problems with a ruby-based website it may be due to this upgrade and you should check for any updates to the software you are using.

This entry was posted on Friday, January 2nd, 2009 at 5:11 pm and is filed under System Changes. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

19 Responses to “Ruby 1.8.7 Upgrades”

For Radiant CMS to be compatible with Ruby 1.8.7, add this to the top of config/environment.rb:

unless ‘1.9′.respond_to?(:force_encoding)
String.class_eval do
begin
remove_method :chars
rescue NameError
# OK
end
end
end

You might also want to ask Dreamhost to restart the web server - I had to.

Guys, watch out if your rails application is sending emails through Gmail SMTP and therefore you use action_mailer_tls plugin to let it work. Ruby 1.8.7 introduces a small change in the Net::SMTP API and thus you have to patch the plugin:

Replace sinple check_auth_args call with this piece:

ar = method(:check_auth_args).arity
if ar==2 #for ruby 1.8.7
check_auth_args user, secret if user or secret
elsif ar==3 #valid for ruby <= 1.8.6
check_auth_args user, secret, authtype if user or secret
end

Seems that panel is offline … no chance to open ticket … what a mess :|

Also effected: http://www.dreamhost.com (not dreamhost.com), all the sign-up links.

:O :) :( :P ~:> bok bok

Perhaps an additional trouble-reporter “The Big Red Button” could be introduced which could be used in case the panel’s down, sending an email to someone.

Or a “Suspicion Meter” vote-capturing CGI that displays an averaging tally of reported issues; when the average / hour rises you know that you’re not alone in your troubles.

At 8:30pm GMT the panel is offline, also the main website. Their advice to report server outages is to use the panel, hopefully they’ll notice something soon…

I was able to access the panel about 30 minutes ago, but then it stopped working all of a sudden. I emailed support@dreamhost.com. I’m surprised to see nothing noted here or on twitter.

Big deal.
Good software should be written with version numbers in mind, especially software built with interpreted languages…

It might be a decent idea to have 1.8.5 and 1.8.7 available as distinct builds, but there is little reason that most apps couldn’t easily work around it…
Most of the time gems are the problem anyway.

# Casper Fabricius Says:
January 3rd, 2009 at 2:22 am

For Radiant CMS to be compatible with Ruby 1.8.7, add this to the top of config/environment.rb:

unless ‘1.9′.respond_to?(:force_encoding)
String.class_eval do
begin
remove_method :chars
rescue NameError
# OK
end
end
end

You might also want to ask Dreamhost to restart the web server - I had to.
#

I dont think its right that one customer can get the web server restarted and cause downtime for the rest of the server

DAVE,

I’m using Passenger for my radiant installs and a simple ‘touch tmp/restart.txt’ worked well enough.

Adam

>Good software should be written with version numbers in mind, especially software built with interpreted languages…

You mean I should write my software assuming that my language’s standard library is going to break API compatibility (by changing amount of arguments a function accepts) with incrementing third digit in version number?

DAVE said:
> I dont think its right that one customer can get the web server restarted and cause downtime for the rest of the server

Dave, perhaps I was a bit unclear. By web server I meant the Apache web server application, not the physical server. Apache can restart in at most a few seconds, and as such the downtime is almost none-existant.

I hope chalmers gets upgraded soon so I can try Merb on it.

January 9th, 2009 at 2:28 pmPier Luigi Fiorini Says:

That could be the problem I got with Redmine….
Is there a mailing list with announces about the changes you are going to do (hopefully some days before)?

Casper’s tip worked for my Radiant app, and a tmp/restart.txt for Passenger. Only question remaining is… I thought I had set up my own ruby environment:

[gravano]$ which ruby
/home/thisguy/local/bin/ruby

[gravano]$ /home/thisguy/local/bin/ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux]

[gravano]$ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [x86_64-linux]

[gravano]$ /usr/bin/ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]

This also broke the ‘Write’ admin page my other app running Typo 5.1.2, so I can’t post anything new to my blog until I have that one figured out.

Shared environments… argh!

Yes, config/environment.rb worked for Typo 5.1.2 admin section also.

Anyone care to explain? Looks like you’re opening the string class and removing a method?

I’m also guessing that ‘1.9′ is just a catchy string, because this also causes problems on a Ruby 1.9 upgrade.

Lastly, do be careful copying and pasting that snippet into your text editor - the apostrophes may not cross over correctly.

Yay! I can’t wait to see it on my webserver. I’ve got a Merb app or two that I’ve been dying to push up.

entry problem?

oh .. its ok.

 
© 1996-2009, DreamHost.com
Entries (RSS) and Comments (RSS).