Rails从2.3.4升级到2.3.8

时间:2011-03-14 19:41:07

标签: ruby-on-rails

我正在尝试将我的应用从Rails 2.3.4升级到2.3.8 ..

我进入了environment.rb文件,并更改了

RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION

RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION

我还需要做点什么吗?

我正在使用 MySQL服务器版本:5.1.47

我没有使用捆绑包

我在OS X 10.6.6上运行

这是我的database.yml,它匹配我在2.3.8中创建的WORKING应用程序(而非升级)

development:
  adapter: mysql
  encoding: utf8
  reconnect: false
  database: _development
  pool: 5
  username: root
  password:
  socket: /tmp/mysql.sock

当我这样做时,我加载的任何页面都会产生相同的错误..通过尝试从数据库构建/检索模型可以实现同样的错误,错误是这样的:

>> Company.new
NoMethodError: undefined method `retrieve_connection' for nil:NilClass
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.8/lib/active_support/whiny_nil.rb:52:in `method_missing'
    from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
    from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
    from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:1301:in `columns'
    from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:3055:in `attributes_from_column_definition_without_lock'
    from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/locking/optimistic.rb:66:in `attributes_from_column_definition'
    from /Library/Ruby/Gems/1.8/gems/activerecord-2.3.8/lib/active_record/base.rb:2469:in `initialize'
    from (irb):1:in `new'
    from (irb):1

编辑:来自environment.rb的宝石列表

  config.gem "authlogic"
  config.gem "hpricot"
  config.gem "BlueCloth", :lib => 'bluecloth'
  config.gem "daemons"
  config.gem "gravtastic", :version => '2.2.0'
  config.gem "json"
  config.gem "ruby-rapleaf"
  config.gem "ar-extensions"
  config.gem "url_shortener"
  config.gem 'aws-s3', :version => '>= 0.6.2', :lib => 'aws/s3'
  config.gem 'paperclip', :version => '>= 2.3.1.1'
  config.gem 'omniauth'

1 个答案:

答案 0 :(得分:0)

这不是创业板,它实际上是一个插件。 ACL9现在有一个GEM,当我最初开始使用它时,我只能以插件形式找到它。所以,对于任何人来说......

我有ACL9插件v .11,Rails 2.3.4

升级到Rails 2.3.8并且必须安装ACL9 gem,目前版本为v.12