ruby 1.8.7与1.8.6不兼容

ruby1.8.7删除了String类的一些方法,致使attachment_fu 一些方法出错
Hello, I had the same problem after upgrading ruby. In ruby 1.8.7 some
methods of the String class were removed, so you have to modify the
attachment_fu.rb file. Navigate to line 70 of the file vendor/plugins/
attachment_fu/lib/technoweenie/attachment_fu.rb and change the the
line

attachment_options[:path_prefix]   = attachment_options[:path_prefix]
[1..-1] if options[:path_prefix].first == '/'


to


attachment_options[:path_prefix]   = attachment_options[:path_prefix]
[1..-1] if options[:path_prefix].starts_with?('/')


Now, my application works after this simple modification. Hope this
helps you too.

你可能感兴趣的:(Ruby)