From: Brian Candler Date: 2010-09-27T20:05:33+09:00 Subject: Re: eruby and/or mod_ruby on apache not working with rubygem > [Sun Sep 26 04:21:25 2010] [error] mod_ruby: error in ruby > [Sun Sep 26 04:21:25 2010] [error] mod_ruby: > /usr/local/lib/site_ruby/1.8/rubygems.rb:472:in `[]': Insecure operation > - [] (SecurityError) My guess would be that mod_ruby is running with $SAFE > 0, but rubygems and/or twitterland doesn't work in those conditions. Try showing SAFE=<%= $SAFE %> to see if that theory is right. Also try running your standalone ruby script with ruby -T1 (or add $SAFE=1 to the top) to see if it barfs in the same way. Aside: I'm afraid you'll find not many people use mod_ruby these days. As far as I can see, most people write Rack-based web apps. To run them with Apache you'd either proxy to a standalone ruby webserver (mongrel/thin/unicorn/rainbows!), or inside Apache using Phusion Passenger, a.k.a. mod_rails. That's not to say that you can't make it work, it's just that you might not find many other people using mod_ruby to help you if you have problems. Equally, if a particular app or library doesn't work with $SAFE=1, perhaps it should be modified so that it does. Regards, Brian. -- Posted via http://www.ruby-forum.com/.