2016-05-22 4 views
1

4.2.6から5にアプリケーションのレールバージョンをアップグレードしようとしていますが、次のエラーが発生しました。Rails 5.0.0.rc1からレールにアップグレードした後にサーバーが終了する4.2.6

012:

[email protected]:~/workspace/converse (rails5update) $ rails server -b $IP -p $PORT 
=> Booting WEBrick 
=> Rails 5.0.0.rc1 application starting in development on http://0.0.0.0:8080 
=> Run `rails server -h` for more startup options 
Exiting 
/usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.rc1/lib/active_support/core_ext/hash/keys.rb:79:in `block in assert_valid_keys': Unknown key: :order. Valid keys are: :class_name, :anonymous_class, :foreign_key, :validate, :autosave, :table_name, :before_add, :after_add, :before_remove, :after_remove, :extend, :primary_key, :dependent, :as, :through, :source, :source_type, :inverse_of, :counter_cache, :join_table, :foreign_type, :index_errors (ArgumentError) 
     from /usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.rc1/lib/active_support/core_ext/hash/keys.rb:77:in `each_key' 
     from /usr/local/rvm/gems/ruby-2.3.1/gems/activesupport-5.0.0.rc1/lib/active_support/core_ext/hash/keys.rb:77:in `assert_valid_keys' 
     from /usr/local/rvm/gems/ruby-2.3.1/gems/activerecord-5.0.0.rc1/lib/active_record/associations/builder/association.rb:78:in `validate_options' 

#default_scope -> { order: 'created_at DESC' } 
    scope :created_at, -> { order('created_at DESC') } 

追加の宝石が

models/application_record.rb 

class ApplicationRecord < ActiveRecord::Base 
    self.abstract_class = true 
end 

を作成し

gem "responders" 

は、すべてのモデルは、例えば、この新しいクラスから継承することが確実にファイルスコープを変更しました

models/user.rb 

class User < ApplicationRecord 
    [...] 
end 

誰もが同じ問題に直面していますか?

答えて

4

あなたがmailboxerのマスターバージョンを取得するために、(githubのソースで)として追加メールボックスを使用していて、これは私

宝石「mailboxer」の問題を修正した場合は、githubの「mailboxer/mailboxer」

+1

ありがとうございます@ salma-gooma、私は[メー​​ルボックスの新しい問題](https://github.com/mailboxer/mailboxer/issues/427)を追加しました。 。 –

関連する問題