Rails 2.2.1创建时的错误:SecureRandom

安装了ruby 1.9.1后,把Rails也更新到了 2.2.1,
但创建项目时失败,报错:uninitialized constant ActiveSupport::SecureRandom
后跟踪源码,发现加载: Active_Support.rb文件中:
require 'active_support/gzip'
require 'active_support/cache'

require 'active_support/dependencies'

require 'active_support/deprecation'

require 'active_support/ordered_hash'
require 'active_support/ordered_options'
require 'active_support/option_merger'

require 'active_support/memoizable'

行require 'active_support/deprecation' 失败,进入该文件,在225行:
require 'test/unit/error'

哦,查看ruby 1.9.1的lib发现没有了test-unit,test-unit被做成了gem,于是:
gem install test-unit
修改deprecation.rb文件中行225为test-unit中error.rb文件相应的路径,保存
....
重新:rails railsApp...
OK.....

你可能感兴趣的:(java,cache,Ruby,Rails)