2011-03-14 88 views
0

我試圖從Rails的升級我的應用程序2.3.4 2.3.8 ..提升的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服務器版本:我不使用捆綁

我運行在OS 5.1.47

X 10.6.6

這裏是我的database.yml,這符合我的工作應用程序我在2.3.8創建(而不是升級)

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

當我做到這一點,任何頁面加載我給..同樣的錯誤可以通過試圖建立能夠得到同樣的錯誤/從數據庫中檢索模型,錯誤是th是:

>> 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' 
+0

這是類似的:http://stackoverflow.com/questions/2892977/updating-rails-to-2-3-6 - 你可以發佈你的寶石在你的application.rb? –

+0

這很可能是問題所在。寶石通常在environment.rb中指定,發佈它的內容。 – jonnii

+0

更新了我的問題 – Rabbott

回答

0

寶石列表此wasnt一個創業板,它實際上是一個插件。 ACL9現在有一個GEM,當我開始使用它時,我只能以插件的形式找到它。因此,對於沒有人來通過..

我ACL9插件版本0.11,Rails的2.3.4

升級到Rails 2.3.8,不得不安裝ACL9寶石,這是目前在V 0.12