RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: CarlosEspejo
I just found a issue in version 0.2.0 where it only permits attributes that belong to your model any additional fields are ignored. If any body else is facing this issue you can downgrade the gem by doing
gem 'strong_parameters', '0.1.6'
and then running bundle
I ran into this issue after 5 deployments where the new master process would report a Gemfile not found (Bundler::GemfileNotFound) error and quit. It turn's out that the new master process was using a environment variable setting BUNDLE_GEMFILE which referred to a older release that has been cleaned up and no longer exists.
Gemfile not found (Bundler::GemfileNotFound)
The only way to fix this at the time was to stop and start the unicorn process which defeat's the purpose of zero downtime deployment. To prevent this from happening in your unicorn config template add this block
before_exec do |server|
ENV['BUNDLE_GEMFILE'] = "<%= current_path %>/Gemfile"
you do have to run unicorn:setup and maybe stop and start the service to make sure the new config setting is picked up.