2010-02-18 52 views
0

Heroku將其所有應用升級到最新版本的捆綁軟件(0.9.4)。使用Rails將bundler升級到0.9.4的問題2.3.5

我遵循了README(包括升級說明)上的所有說明。但是,一旦我升級我的應用程序不再運行。例如我得到

NoMethodError (undefined method `acts_as_taggable_on' for #<Class:0x1b7f614>): 

我的Gemfile如下

source 'http://gemcutter.org' 
source 'http://gems.github.com' 

gem "rails", "2.3.5", :require => nil 

gem 'will_paginate', '2.3.11' 
gem 'jackdempsey-acts_as_commentable', :require => 'acts_as_commentable' 
gem 'acts-as-taggable-on' 

# Authorization 
gem 'authlogic' 
gem 'authlogic-oid', :require => 'authlogic_openid' 
gem 'ruby-openid', :require => 'openid' 

#Authentication 
gem 'cancan' 

gem 'gravtastic', '>= 2.1.0' 

# Exception Notification 
gem 'hoptoad_notifier' 

# Search (Note ties us to Postgres) 
gem 'texticle' 

gem 'pg' 

我的boot.rb,preinitializer.rb如在此gist

感謝您的幫助指導。

+0

即使使用heroku支持,也找不到它。我恢復到了.gem文件格式,並恢復了業務。我不確定bundler 0.9和pre Rails 3應用程序的兼容性 – Jonathan 2010-02-18 19:10:20

回答

2

請不要問我這是如何工作的,但我有同樣的確切問題,似乎是失敗的actionpack依賴或路徑或什麼的。

我用所有的要點被捆綁球隊簡稱:http://gist.github.com/302406

但我調整我的配置/腳本的boot.rb此:

class Rails::Boot 
    def run 
    load_initializer 
    extend_environment 
    Rails::Initializer.run(:set_load_path) 
    end 

    def extend_environment 
    Rails::Initializer.class_eval do 
     old_load = instance_method(:load_gems) 
     define_method(:load_gems) do 
     old_load.bind(self).call 
     Bundler.require :default, RAILS_ENV   
     end 
    end 
    end 
end 

我不知道爲什麼我的配置變量是不同,但由於某種原因,他們是。我確定有人理解內部結構比我做得好一些可以解釋它。

*對於heroku,您還必須安裝postgres「pg」gem。這是另一個小小的煩惱。根據你安裝postgres的方式,找到pg_config可能是另一個令人頭疼的問題。讓我知道你是否需要幫助。