コード内のすべての attr_accessible を強力なパラメーターに変更したので、Rails 4.0 で動作します。私のアプリはローカルでは正常に動作しますが、Heroku にプッシュすると、コードに attr_accessible があると不平を言います。これは私が得るエラーです:
Running: rake assets:precompile
rake aborted!
`attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one.
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activemodel-4.0.0/lib/active_model/deprecated_mass_assignment_security.rb:14:in `attr_accessible'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/lib/redactor-rails/orm/active_record.rb:20:in `block in extended'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/lib/redactor-rails/orm/active_record.rb:14:in `class_eval'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/lib/redactor-rails/orm/active_record.rb:14:in `extended'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/lib/redactor-rails/orm/active_record.rb:9:in `extend'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/lib/redactor-rails/orm/active_record.rb:9:in `included'
/tmp/build_12jc2ej0437ky/app/models/redactor_rails/asset.rb:20:in `include'
/tmp/build_12jc2ej0437ky/app/models/redactor_rails/asset.rb:20:in `<class:Asset>'
/tmp/build_12jc2ej0437ky/app/models/redactor_rails/asset.rb:19:in `<top (required)>'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:329:in `require_or_load'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in `load_missing_constant'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
/tmp/build_12jc2ej0437ky/app/models/redactor_rails/document.rb:1:in `<top (required)>'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:329:in `require_or_load'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:462:in `load_missing_constant'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:183:in `const_missing'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/lib/redactor-rails.rb:31:in `document_model'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/app/controller/redactor_rails/documents_controller.rb:2:in `<class:DocumentsController>'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/redactor-rails-0.3.5/app/controller/redactor_rails/documents_controller.rb:1:in `<top (required)>'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:329:in `require_or_load'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:288:in `depend_on'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:206:in `require_dependency'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:465:in `block (2 levels) in eager_load!'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `each'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:464:in `block in eager_load!'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `each'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:462:in `eager_load!'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:347:in `eager_load!'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `each'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application/finisher.rb:56:in `block in <module:Finisher>'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
/tmp/build_12jc2ej0437ky/config/environment.rb:5:in `<top (required)>'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'
/tmp/build_12jc2ej0437ky/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.0/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'
Tasks: TOP => environment
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby/Rails app
To git@heroku.com:scratch-cms.git
! [remote rejected] master -> master (pre-receive hook declined)
何が起こっているかについてのアイデアはありますか?宝石かも?工夫かも?