Rails 5.2 ActiveStorage Whitelist Params - ruby-on-rails

I am updating to activestorage in rails 5.2 and am getting a "
undefined method `[]=' for nil:NilClass" in my create action.
I think the problem has to do with my whitelisted params. I tried to follow the guides but still cannot figure out what I am missing.
My model has has_many_attached :images
My controller has
def create
#product = Product.new(product_params)
#product.images.attach(params[:product][:images])
if #product.save
redirect_to #product, notice: 'Product was successfully created.'
else
render :new
end
end
private
def product_params
params.require(:product).permit(:name, :description, :category_id, :tag_list, :partialone, :partialtwo, :partialthree, :shape, :earrings, :metalweight, :sizeone, :sizetwo, :metal, :totalweightone, :totalweighttwo, :meleequant, review_attributes: [:id, :rating, :text, :author, :name], images: [] )
end
Here is the full trace:
acts-as-taggable-on (5.0.0) lib/acts_as_taggable_on/taggable/core.rb:206:in process_dirty_object'
acts-as-taggable-on (5.0.0) lib/acts_as_taggable_on/taggable/core.rb:184:inset_tag_list_on'
acts-as-taggable-on (5.0.0) lib/acts_as_taggable_on/taggable/core.rb:45:in tag_list='
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:51:inpublic_send'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:51:in _assign_attribute'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:44:inblock in _assign_attributes'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:43:in each'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:43:in_assign_attributes'
activerecord (5.2.1) lib/active_record/attribute_assignment.rb:23:in _assign_attributes'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:35:inassign_attributes'
activerecord (5.2.1) lib/active_record/core.rb:314:in initialize'
activerecord (5.2.1) lib/active_record/inheritance.rb:66:innew'
activerecord (5.2.1) lib/active_record/inheritance.rb:66:in new'
activerecord (5.2.1) lib/active_record/persistence.rb:52:increate!'
app/controllers/products_controller.rb:65:in create'
actionpack (5.2.1) lib/action_controller/metal/basic_implicit_render.rb:6:insend_action'
actionpack (5.2.1) lib/abstract_controller/base.rb:194:in process_action'
actionpack (5.2.1) lib/action_controller/metal/rendering.rb:30:inprocess_action'
actionpack (5.2.1) lib/abstract_controller/callbacks.rb:42:in block in process_action'
activesupport (5.2.1) lib/active_support/callbacks.rb:132:inrun_callbacks'
actionpack (5.2.1) lib/abstract_controller/callbacks.rb:41:in process_action'
actionpack (5.2.1) lib/action_controller/metal/rescue.rb:22:inprocess_action'
actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:34:in block in process_action'
activesupport (5.2.1) lib/active_support/notifications.rb:168:inblock in instrument'
activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in instrument'
activesupport (5.2.1) lib/active_support/notifications.rb:168:ininstrument'
actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:32:in process_action'
actionpack (5.2.1) lib/action_controller/metal/params_wrapper.rb:256:inprocess_action'
activerecord (5.2.1) lib/active_record/railties/controller_runtime.rb:24:in process_action'
actionpack (5.2.1) lib/abstract_controller/base.rb:134:inprocess'
actionview (5.2.1) lib/action_view/rendering.rb:32:in process'
actionpack (5.2.1) lib/action_controller/metal.rb:191:indispatch'
actionpack (5.2.1) lib/action_controller/metal.rb:252:in dispatch'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:52:indispatch'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:34:in serve'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:inblock in serve'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in each'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:inserve'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in call'
warden (1.2.7) lib/warden/manager.rb:36:inblock in call'
warden (1.2.7) lib/warden/manager.rb:35:in catch'
warden (1.2.7) lib/warden/manager.rb:35:incall'
rack (2.0.5) lib/rack/tempfile_reaper.rb:15:in call'
rack (2.0.5) lib/rack/etag.rb:25:incall'
rack (2.0.5) lib/rack/conditional_get.rb:38:in call'
rack (2.0.5) lib/rack/head.rb:12:incall'
actionpack (5.2.1) lib/action_dispatch/http/content_security_policy.rb:18:in call'
rack (2.0.5) lib/rack/session/abstract/id.rb:232:incontext'
rack (2.0.5) lib/rack/session/abstract/id.rb:226:in call'
actionpack (5.2.1) lib/action_dispatch/middleware/cookies.rb:670:incall'
activerecord (5.2.1) lib/active_record/migration.rb:559:in call'
actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:28:inblock in call'
activesupport (5.2.1) lib/active_support/callbacks.rb:98:in run_callbacks'
actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:26:incall'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in call'
actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:incall'
web-console (3.5.1) lib/web_console/middleware.rb:135:in call_app'
web-console (3.5.1) lib/web_console/middleware.rb:28:inblock in call'
web-console (3.5.1) lib/web_console/middleware.rb:18:in catch'
web-console (3.5.1) lib/web_console/middleware.rb:18:incall'
actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in call'
railties (5.2.1) lib/rails/rack/logger.rb:38:incall_app'
railties (5.2.1) lib/rails/rack/logger.rb:26:in block in call'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:inblock in tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:intagged'
railties (5.2.1) lib/rails/rack/logger.rb:26:in call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:incall'
actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in call'
request_store (1.4.1) lib/request_store/middleware.rb:19:incall'
actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in call'
rack (2.0.5) lib/rack/method_override.rb:22:incall'
rack (2.0.5) lib/rack/runtime.rb:22:in call'
activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:incall'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in call'
actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:incall'
rack (2.0.5) lib/rack/sendfile.rb:111:in call'
webpacker (3.5.5) lib/webpacker/dev_server_proxy.rb:22:inperform_request'
rack-proxy (0.6.4) lib/rack/proxy.rb:57:in call'
railties (5.2.1) lib/rails/engine.rb:524:incall'
rack (2.0.5) lib/rack/handler/webrick.rb:86:in service'
/Users/Joseph/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:140:inservice'
/Users/Joseph/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/webrick/httpserver.rb:96:in run'
/Users/Joseph/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/webrick/server.rb:290:inblock in start_thread'
For some reason, I think the problem is with "images: []" in the whitelisted params but am not sure. Any ideas? Thank you.

Related

Issue Passing parameters from erb template to controller in Rails

I am trying to call a method in view template from its respective controller which is acting weirdly based on different conditions.
PLease note I have tried this after getting failure on this
Triply nested model's form in rails showing error
First of all the controller method is defined as ->
helper_method :find_feature
def find_feature(fid)
#project.features.find(fid)
end
And the view file code where this method is called ->
<% #project.features.each do |fet| %>
<%= "#{fet.name} #{fet.id} " %> #It does work!!
<%= render partial: "taskform",locals: { fetr: find_feature(fet.id) } %>
<% end %>
This throws error as Couldn't find Feature without an ID
in the screenshot islt is shown params[:id] is used that is not right sorry for that I have used the method which is written above as find_feature(fid) very sorry I will update the screenshot once I get to my mqchine
**
the error shows Couldn't find a feature without an id when called by find_feature(fet.id)
**
BUt when I explicitly test with an id, manually, like->
<%= render partial: "taskform", locals: { fetr: find_feature(7) } %>
This works !
Full stack trace-
activerecord (5.2.3) lib/active_record/relation/finder_methods.rb:433:in `find_with_ids'
activerecord (5.2.3) lib/active_record/relation/finder_methods.rb:69:in `find'
activerecord (5.2.3) lib/active_record/associations/collection_association.rb:100:in `find'
activerecord (5.2.3) lib/active_record/associations/collection_proxy.rb:140:in `find'
app/controllers/projects_controller.rb:7:in `find_feature'
actionpack (5.2.3) lib/abstract_controller/helpers.rb:67:in `find_feature'
app/views/projects/show.html.erb:66:in `block in _app_views_projects_show_html_erb__3383934460746758134_70317115637280'
activerecord (5.2.3) lib/active_record/relation/delegation.rb:71:in `each'
activerecord (5.2.3) lib/active_record/relation/delegation.rb:71:in `each'
app/views/projects/show.html.erb:56:in `_app_views_projects_show_html_erb__3383934460746758134_70317115637280'
actionview (5.2.3) lib/action_view/template.rb:159:in `block in render'
activesupport (5.2.3) lib/active_support/notifications.rb:170:in `instrument'
actionview (5.2.3) lib/action_view/template.rb:354:in `instrument_render_template'
actionview (5.2.3) lib/action_view/template.rb:157:in `render'
actionview (5.2.3) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
actionview (5.2.3) lib/action_view/renderer/abstract_renderer.rb:44:in `block in instrument'
activesupport (5.2.3) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.3) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activesupport (5.2.3) lib/active_support/notifications.rb:168:in `instrument'
actionview (5.2.3) lib/action_view/renderer/abstract_renderer.rb:43:in `instrument'
actionview (5.2.3) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
actionview (5.2.3) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
actionview (5.2.3) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
actionview (5.2.3) lib/action_view/renderer/template_renderer.rb:16:in `render'
actionview (5.2.3) lib/action_view/renderer/renderer.rb:44:in `render_template'
actionview (5.2.3) lib/action_view/renderer/renderer.rb:25:in `render'
actionview (5.2.3) lib/action_view/rendering.rb:103:in `_render_template'
actionpack (5.2.3) lib/action_controller/metal/streaming.rb:219:in `_render_template'
actionview (5.2.3) lib/action_view/rendering.rb:84:in `render_to_body'
actionpack (5.2.3) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
actionpack (5.2.3) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
actionpack (5.2.3) lib/abstract_controller/rendering.rb:25:in `render'
actionpack (5.2.3) lib/action_controller/metal/rendering.rb:36:in `render'
actionpack (5.2.3) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
activesupport (5.2.3) lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
/home/ayan/.rvm/rubies/ruby-2.6.3/lib/ruby/2.6.0/benchmark.rb:308:in `realtime'
activesupport (5.2.3) lib/active_support/core_ext/benchmark.rb:14:in `ms'
actionpack (5.2.3) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
actionpack (5.2.3) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
activerecord (5.2.3) lib/active_record/railties/controller_runtime.rb:31:in `cleanup_view_runtime'
actionpack (5.2.3) lib/action_controller/metal/instrumentation.rb:45:in `render'
actionpack (5.2.3) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
actionpack (5.2.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
actionpack (5.2.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
actionpack (5.2.3) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (5.2.3) lib/abstract_controller/base.rb:194:in `process_action'
actionpack (5.2.3) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.2.3) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (5.2.3) lib/active_support/callbacks.rb:132:in `run_callbacks'
actionpack (5.2.3) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (5.2.3) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (5.2.3) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (5.2.3) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.3) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activesupport (5.2.3) lib/active_support/notifications.rb:168:in `instrument'
actionpack (5.2.3) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (5.2.3) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
activerecord (5.2.3) lib/active_record/railties/controller_runtime.rb:24:in `process_action'
actionpack (5.2.3) lib/abstract_controller/base.rb:134:in `process'
actionview (5.2.3) lib/action_view/rendering.rb:32:in `process'
actionpack (5.2.3) lib/action_controller/metal.rb:191:in `dispatch'
actionpack (5.2.3) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (5.2.3) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
actionpack (5.2.3) lib/action_dispatch/routing/route_set.rb:34:in `serve'
actionpack (5.2.3) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.3) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.3) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.3) lib/action_dispatch/routing/route_set.rb:840:in `call'
omniauth (1.9.0) lib/omniauth/strategy.rb:192:in `call!'
omniauth (1.9.0) lib/omniauth/strategy.rb:169:in `call'
omniauth (1.9.0) lib/omniauth/builder.rb:64:in `call'
rack (2.0.7) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.0.7) lib/rack/etag.rb:25:in `call'
rack (2.0.7) lib/rack/conditional_get.rb:25:in `call'
rack (2.0.7) lib/rack/head.rb:12:in `call'
actionpack (5.2.3) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.0.7) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.7) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/cookies.rb:670:in `call'
activerecord (5.2.3) lib/active_record/migration.rb:559:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (5.2.3) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (5.2.3) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:30:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.3) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.3) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.3) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.7) lib/rack/method_override.rb:22:in `call'
rack (2.0.7) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.3) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.7) lib/rack/sendfile.rb:111:in `call'
railties (5.2.3) lib/rails/engine.rb:524:in `call'
puma (3.12.1) lib/puma/configuration.rb:227:in `call'
puma (3.12.1) lib/puma/server.rb:660:in `handle_request'
puma (3.12.1) lib/puma/server.rb:474:in `process_client'
puma (3.12.1) lib/puma/server.rb:334:in `block in run'
puma (3.12.1) lib/puma/thread_pool.rb:135:in `block in spawn_thread'
Request
Parameters:
{"id"=>"4"}
Can anyone suggests what is the reason of this behaviour ?
You are calling the find_feature with this code find_feature(fet.id), so you want to pass the id as a parameter.
Define the helper_method this way then:
def find_feature(fid)
#project.features.find(fid)
end
params[:fid] will look for a request parameter with the key fid in the request's params hash, you are passing a specific value to the method when you call it.
EDIT: Anyway, I'm not sure why are you doing that, you already have the feature object on the fet variable inside the loop, just do this:
<%= render partial: "taskform",locals: { fetr: fet } %>
error shows method calling with parmas[:fid], but you defined method as find_feature(fid) for finding feature , so there must be other method which is overriding , try it by giving different name like find_project_features it will work

Rails 5 fields_for namespaced classes

I'm having some trouble with nested attributes when the defined classes are inside a module:
# file bar.rb
module Abc
class Bar << ActiveRecord::Base
has_many :foos
accepts_nested_attributes_for :foos
end
end
# file foo.rb
module Abc
class Foo << ActiveRecord::Base
belongs_to :bar
# let's consider an attribute: qux
end
end
# inside the controller
def new
#bar = Abc::Bar.new
end
# inside a view
<%= form_for #bar .... do |f| %>
....
<%= f.fields_for :abc_foos, #bar.foos do |ff| %>
<%= ff.hidden_field :qux, value: true %>
<% end %>
<% end %>
Now we got the prefix "abc" in the names attributes>
# the rendered html
<input type="hidden" name="abc_bar[abc_foos][qux]" ... />
The params now comes with the abc_foos included:
# the params hash
"abc_bar" => {
....
"abc_foos" => {"qux" => "some value"}
}
The problem: the accepts_nested_attributes_for method creates something like "abc_foos_attributes=" in order to receive the attributes, but the default param key name is different. So, this will not work:
# in the controller, again
def create
#bar = Abc::Bar.new(params.require(:abc_bar).permit(:a, :b, abc_foos: [:qux]))
end
I get the error:
unknown attribute 'abc_foos' for Abc::Bar.
I would expect something like "foos_attributes" as the appropriate key. What am I missing?
Thanks!
The full bactrace:
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:53:in `_assign_attribute'
activerecord (5.2.1) lib/active_record/attribute_assignment.rb:31:in `block in assign_nested_parameter_attributes'
activerecord (5.2.1) lib/active_record/attribute_assignment.rb:31:in `each'
activerecord (5.2.1) lib/active_record/attribute_assignment.rb:31:in `assign_nested_parameter_attributes'
activerecord (5.2.1) lib/active_record/attribute_assignment.rb:25:in `_assign_attributes'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
activerecord (5.2.1) lib/active_record/core.rb:314:in `initialize'
activerecord (5.2.1) lib/active_record/inheritance.rb:66:in `new'
activerecord (5.2.1) lib/active_record/inheritance.rb:66:in `new'
app/controllers/bar_controller.rb:33:in `create'
actionpack (5.2.1) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
actionpack (5.2.1) lib/abstract_controller/base.rb:194:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/rendering.rb:30:in `process_action'
actionpack (5.2.1) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
activesupport (5.2.1) lib/active_support/callbacks.rb:132:in `run_callbacks'
actionpack (5.2.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (5.2.1) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activesupport (5.2.1) lib/active_support/notifications.rb:168:in `instrument'
actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
activerecord (5.2.1) lib/active_record/railties/controller_runtime.rb:24:in `process_action'
actionpack (5.2.1) lib/abstract_controller/base.rb:134:in `process'
actionview (5.2.1) lib/action_view/rendering.rb:32:in `process'
actionpack (5.2.1) lib/action_controller/metal.rb:191:in `dispatch'
actionpack (5.2.1) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:34:in `serve'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
rack (2.0.6) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.0.6) lib/rack/etag.rb:25:in `call'
rack (2.0.6) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.6) lib/rack/head.rb:12:in `call'
actionpack (5.2.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.0.6) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.6) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/cookies.rb:670:in `call'
activerecord (5.2.1) lib/active_record/migration.rb:559:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (5.2.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
web-console (3.7.0) lib/web_console/middleware.rb:135:in `call_app'
web-console (3.7.0) lib/web_console/middleware.rb:22:in `block in call'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `catch'
web-console (3.7.0) lib/web_console/middleware.rb:20:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.6) lib/rack/method_override.rb:22:in `call'
rack (2.0.6) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.6) lib/rack/sendfile.rb:111:in `call'
railties (5.2.1) lib/rails/engine.rb:524:in `call'
puma (3.12.0) lib/puma/configuration.rb:225:in `call'
puma (3.12.0) lib/puma/server.rb:658:in `handle_request'
puma (3.12.0) lib/puma/server.rb:472:in `process_client'
puma (3.12.0) lib/puma/server.rb:332:in `block in run'
puma (3.12.0) lib/puma/thread_pool.rb:133:in `block in spawn_thread'
Can you post full backtrace errors? But in the meantime if you try
<%= f.fields_for :foos, #bar.foos do |foo| %>
<%= foo.hidden_field :qux, value: true %>
<% end %>
you probably also need to do
#bar = Abc::Bar.new(params.require(:abc_bar).permit(:a, :b, foos: [:qux]))

Rails Active Storage ActiveStorage::IntegrityError (ActiveStorage::IntegrityError): when trying to upload

I hope you can help me, I've been following this rails guide: https://edgeguides.rubyonrails.org/active_storage_overview.html step by step to implement active storage with Azure but I'm having trouble uploading the file.
It keeps throwing this error: ActiveStorage::IntegrityError (ActiveStorage::IntegrityError)
The log displays this:
Processing by SliderController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"nx5HaniUlhwMBjtJPXW9safsafw6oT7PDog4aDg0XPC8Yasfas+T57ZYP0NJ7xWMI6halogBy0VO3Sg==", "slider"=>{"key"=>"home", "image"=>#<ActionDispatch::Http::UploadedFile:0xd5151f8 #tempfile=#<Tempfile:C:/Users/user/AppData/Local/Temp/RackMultipart20180827-34920-1ulxtdy.jpg>, #original_filename="30714520_1071308403021677_2686322307856596992_n.jpg", #content_type="image/jpeg", #headers="Content-Disposition: form-data; name=\"slider[image]\"; filename=\"30714520_1071308403021677_2686322307856596992_n.jpg\"\r\nContent-Type: image/jpeg\r\n">, "content"=>"asxa", "text2"=>"asxs", "link"=>"", "button"=>"More..."}, "commit"=>"Crete Slider"}
AzureStorage Storage (559.5ms) Uploaded file to key: yx4Qm4HA4wD9Ux7P3VhPqEFv (checksum: LO4ccLCw2J1w5TKgyxGG1g==)
Completed 500 Internal Server Error in 573ms (ActiveRecord: 0.0ms)
ActiveStorage::IntegrityError (ActiveStorage::IntegrityError)
activestorage (5.2.1) lib/active_storage/service/azure_storage_service.rb:25:in `rescue in block in upload'
activestorage (5.2.1) lib/active_storage/service/azure_storage_service.rb:22:in `block in upload'
activesupport (5.2.1) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activesupport (5.2.1) lib/active_support/notifications.rb:168:in `instrument'
activestorage (5.2.1) lib/active_storage/service.rb:118:in `instrument'
activestorage (5.2.1) lib/active_storage/service/azure_storage_service.rb:21:in `upload'
activestorage (5.2.1) app/models/active_storage/blob.rb:155:in `upload'
activestorage (5.2.1) app/models/active_storage/blob.rb:53:in `block in build_after_upload'
activestorage (5.2.1) app/models/active_storage/blob.rb:48:in `tap'
activestorage (5.2.1) app/models/active_storage/blob.rb:48:in `build_after_upload'
activestorage (5.2.1) app/models/active_storage/blob.rb:61:in `create_after_upload!'
activestorage (5.2.1) lib/active_storage/attached.rb:23:in `create_blob_from'
activestorage (5.2.1) lib/active_storage/attached/one.rb:24:in `attach'
activestorage (5.2.1) lib/active_storage/attached/macros.rb:37:in `imagen='
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:51:in `public_send'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:44:in `block in _assign_attributes'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:43:in `each'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:43:in `_assign_attributes'
activerecord (5.2.1) lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
activemodel (5.2.1) lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
activerecord (5.2.1) lib/active_record/core.rb:314:in `initialize'
activerecord (5.2.1) lib/active_record/inheritance.rb:66:in `new'
activerecord (5.2.1) lib/active_record/inheritance.rb:66:in `new'
cancancan (2.2.0) lib/cancan/controller_resource_builder.rb:6:in `build_resource'
cancancan (2.2.0) lib/cancan/controller_resource_loader.rb:104:in `load_resource_instance'
cancancan (2.2.0) lib/cancan/controller_resource_loader.rb:15:in `load_resource'
cancancan (2.2.0) lib/cancan/controller_resource.rb:31:in `load_and_authorize_resource'
cancancan (2.2.0) lib/cancan/controller_resource.rb:15:in `block in add_before_action'
activesupport (5.2.1) lib/active_support/callbacks.rb:426:in `instance_exec'
activesupport (5.2.1) lib/active_support/callbacks.rb:426:in `block in make_lambda'
activesupport (5.2.1) lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
actionpack (5.2.1) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
activesupport (5.2.1) lib/active_support/callbacks.rb:199:in `block in halting'
activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `block in invoke_before'
activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `each'
activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `invoke_before'
activesupport (5.2.1) lib/active_support/callbacks.rb:131:in `run_callbacks'
actionpack (5.2.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
activesupport (5.2.1) lib/active_support/notifications.rb:168:in `block in instrument'
activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activesupport (5.2.1) lib/active_support/notifications.rb:168:in `instrument'
actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
actionpack (5.2.1) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
activerecord (5.2.1) lib/active_record/railties/controller_runtime.rb:24:in `process_action'
actionpack (5.2.1) lib/abstract_controller/base.rb:134:in `process'
actionview (5.2.1) lib/action_view/rendering.rb:32:in `process'
actionpack (5.2.1) lib/action_controller/metal.rb:191:in `dispatch'
actionpack (5.2.1) lib/action_controller/metal.rb:252:in `dispatch'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:34:in `serve'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
rack (2.0.5) lib/rack/tempfile_reaper.rb:15:in `call'
rack (2.0.5) lib/rack/etag.rb:25:in `call'
rack (2.0.5) lib/rack/conditional_get.rb:38:in `call'
rack (2.0.5) lib/rack/head.rb:12:in `call'
actionpack (5.2.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
rack (2.0.5) lib/rack/session/abstract/id.rb:232:in `context'
rack (2.0.5) lib/rack/session/abstract/id.rb:226:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/cookies.rb:670:in `call'
activerecord (5.2.1) lib/active_record/migration.rb:559:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
activesupport (5.2.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
web-console (2.3.0) lib/web_console/middleware.rb:28:in `block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `catch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
railties (5.2.1) lib/rails/rack/logger.rb:38:in `call_app'
railties (5.2.1) lib/rails/rack/logger.rb:26:in `block in call'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
railties (5.2.1) lib/rails/rack/logger.rb:26:in `call'
sprockets-rails (3.2.1) lib/sprockets/rails/quiet_assets.rb:13:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
request_store (1.4.1) lib/request_store/middleware.rb:19:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
rack (2.0.5) lib/rack/method_override.rb:22:in `call'
rack (2.0.5) lib/rack/runtime.rb:22:in `call'
activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
rack (2.0.5) lib/rack/sendfile.rb:111:in `call'
railties (5.2.1) lib/rails/engine.rb:524:in `call'
rack (2.0.5) lib/rack/handler/webrick.rb:86:in `service'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/webrick/httpserver.rb:140:in `service'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/webrick/httpserver.rb:96:in `run'
C:/RailsInstaller/Ruby2.3.3/lib/ruby/2.3.0/webrick/server.rb:296:in `block in start_thread'
I followed the guide step by step but still the same error, Anyone can help me and explain me what I'm missing? Thanks

API hit error in ror gives - Completed 500 Internal Server Error , TypeError (no implicit conversion of nil into String)

My routes.rb -
Rails.application.routes.draw do
root 'welcome#index'
namespace :api, defaults: { format: :json } do
namespace :v1 do
get "/users/:cv_id" => "engine#users_get"
post "/users" => "engine#users_add"
end
end
and my main controller is --
class Api::V1::MainController < ApplicationController
http_basic_authenticate_with name: ENV["API_USERNAME"], password: ENV["API_PASSWORD"]
API_CMDS_LIST = {
"Engine" => [:users_add, :users_update],
}
include Api::V1::ErrorMessage
skip_before_filter :verify_authenticity_token
protect_from_forgery with: :null_session
def resulting_json(resp)
if resp[:result] == "error" && !resp[:code]
resp[:code] = Api::V1::ErrorMessage::CODES[resp[:message]] || Api::V1::ErrorMessage::DEFAULT_CODE
end
render json: resp
end
def authenticate
#authenticate_or_request_with_http_basic do |user, password|
#File.write('test.txt', "USER: #{user}. PASS: #{password}")
##user && password == #user.secret_token #&& #user.belongs_to_active_brand?
true
#end
end
def validate_request
action = params[:action]
klass = API_CMDS_LIST.select{ |klass, methods| methods.include?(action.to_sym) }.keys[0]
#req = "Api::V1::#{klass}".constantize.new(send("# {action}_params").merge( {user: #user} ), request)
if !#req.valid?
err_msg = #req.errors.full_messages.first
code = Api::V1::ErrorMessage::CODES[err_msg] || Api::V1::ErrorMessage::DEFAULT_CODE
render json: { result: "error", msg: err_msg, code: code } and return
end
end
end
and engine controller code is -
class Api::V1::EngineController < Api::V1::MainController
include Api::V1::ErrorMessage
before_filter :validate_request
API_CMDS_LIST["Engine"].each do |method|
define_method(method) do
response = #req.send(method)
resulting_json(response)
end
end
def users_add_params
params.permit(:first_name, :last_name)
end
end
but when i try to hit the endpoint "/users" with params {first_name : "satyam",last_name:"agrawal"} it gives me this error ---
Processing by Api::V1::EngineController#users_add as JSON
Parameters: {"first_name"=>"satyam", "last_name"=>"agrawal"}
Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)
TypeError (no implicit conversion of nil into String):
activesupport (5.0.1) lib/active_support/security_utils.rb:23:in digest'
activesupport (5.0.1) lib/active_support/security_utils.rb:23:inhexdigest'
activesupport (5.0.1) lib/active_support/security_utils.rb:23:in variable_size_secure_compare'
actionpack (5.0.1) lib/action_controller/metal/http_authentication.rb:75:inblock (2 levels) in http_basic_authenticate_with'
actionpack (5.0.1) lib/action_controller/metal/http_authentication.rb:97:in call'
actionpack (5.0.1) lib/action_controller/metal/http_authentication.rb:97:inauthenticate'
actionpack (5.0.1) lib/action_controller/metal/http_authentication.rb:87:in authenticate_with_http_basic'
actionpack (5.0.1) lib/action_controller/metal/http_authentication.rb:83:inauthenticate_or_request_with_http_basic'
actionpack (5.0.1) lib/action_controller/metal/http_authentication.rb:71:in block in http_basic_authenticate_with'
activesupport (5.0.1) lib/active_support/callbacks.rb:396:ininstance_exec'
activesupport (5.0.1) lib/active_support/callbacks.rb:396:in block in make_lambda'
activesupport (5.0.1) lib/active_support/callbacks.rb:169:incall'
activesupport (5.0.1) lib/active_support/callbacks.rb:169:in block (2 levels) in halting'
actionpack (5.0.1) lib/abstract_controller/callbacks.rb:12:incall'
actionpack (5.0.1) lib/abstract_controller/callbacks.rb:12:in block (2 levels) in <module:Callbacks>'
activesupport (5.0.1) lib/active_support/callbacks.rb:170:incall'
activesupport (5.0.1) lib/active_support/callbacks.rb:170:in block in halting'
activesupport (5.0.1) lib/active_support/callbacks.rb:454:incall'
activesupport (5.0.1) lib/active_support/callbacks.rb:454:in block in call'
activesupport (5.0.1) lib/active_support/callbacks.rb:454:ineach'
activesupport (5.0.1) lib/active_support/callbacks.rb:454:in call'
activesupport (5.0.1) lib/active_support/callbacks.rb:101:inrun_callbacks'
activesupport (5.0.1) lib/active_support/callbacks.rb:750:in _run_process_action_callbacks'
activesupport (5.0.1) lib/active_support/callbacks.rb:90:inrun_callbacks'
actionpack (5.0.1) lib/abstract_controller/callbacks.rb:19:in process_action'
actionpack (5.0.1) lib/action_controller/metal/rescue.rb:20:inprocess_action'
actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:32:in block in process_action'
activesupport (5.0.1) lib/active_support/notifications.rb:164:inblock in instrument'
activesupport (5.0.1) lib/active_support/notifications/instrumenter.rb:21:in instrument'
activesupport (5.0.1) lib/active_support/notifications.rb:164:ininstrument'
actionpack (5.0.1) lib/action_controller/metal/instrumentation.rb:30:in process_action'
actionpack (5.0.1) lib/action_controller/metal/params_wrapper.rb:248:inprocess_action'
activerecord (5.0.1) lib/active_record/railties/controller_runtime.rb:18:in process_action'
actionpack (5.0.1) lib/abstract_controller/base.rb:126:inprocess'
actionview (5.0.1) lib/action_view/rendering.rb:30:in process'
actionpack (5.0.1) lib/action_controller/metal.rb:190:indispatch'
actionpack (5.0.1) lib/action_controller/metal.rb:262:in dispatch'
actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:50:indispatch'
actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:32:in serve'
actionpack (5.0.1) lib/action_dispatch/journey/router.rb:39:inblock in serve'
actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:in each'
actionpack (5.0.1) lib/action_dispatch/journey/router.rb:26:inserve'
actionpack (5.0.1) lib/action_dispatch/routing/route_set.rb:725:in call'
rack (2.0.1) lib/rack/etag.rb:25:incall'
rack (2.0.1) lib/rack/conditional_get.rb:38:in call'
rack (2.0.1) lib/rack/head.rb:12:incall'
rack (2.0.1) lib/rack/session/abstract/id.rb:222:in context'
rack (2.0.1) lib/rack/session/abstract/id.rb:216:incall'
actionpack (5.0.1) lib/action_dispatch/middleware/cookies.rb:613:in call'
activerecord (5.0.1) lib/active_record/migration.rb:553:incall'
actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:38:in block in call'
activesupport (5.0.1) lib/active_support/callbacks.rb:97:inrun_callbacks'
activesupport (5.0.1) lib/active_support/callbacks.rb:750:in _run_call_callbacks'
activesupport (5.0.1) lib/active_support/callbacks.rb:90:inrun_callbacks'
actionpack (5.0.1) lib/action_dispatch/middleware/callbacks.rb:36:in call'
actionpack (5.0.1) lib/action_dispatch/middleware/executor.rb:12:incall'
actionpack (5.0.1) lib/action_dispatch/middleware/remote_ip.rb:79:in call'
actionpack (5.0.1) lib/action_dispatch/middleware/debug_exceptions.rb:49:incall'
web-console (3.4.0) lib/web_console/middleware.rb:135:in call_app'
web-console (3.4.0) lib/web_console/middleware.rb:28:inblock in call'
web-console (3.4.0) lib/web_console/middleware.rb:18:in catch'
web-console (3.4.0) lib/web_console/middleware.rb:18:incall'
actionpack (5.0.1) lib/action_dispatch/middleware/show_exceptions.rb:31:in call'
railties (5.0.1) lib/rails/rack/logger.rb:36:incall_app'
railties (5.0.1) lib/rails/rack/logger.rb:24:in block in call'
activesupport (5.0.1) lib/active_support/tagged_logging.rb:69:inblock in tagged'
activesupport (5.0.1) lib/active_support/tagged_logging.rb:26:in tagged'
activesupport (5.0.1) lib/active_support/tagged_logging.rb:69:intagged'
railties (5.0.1) lib/rails/rack/logger.rb:24:in call'
sprockets-rails (3.2.0) lib/sprockets/rails/quiet_assets.rb:13:incall'
actionpack (5.0.1) lib/action_dispatch/middleware/request_id.rb:24:in call'
rack (2.0.1) lib/rack/method_override.rb:22:incall'
rack (2.0.1) lib/rack/runtime.rb:22:in call'
activesupport (5.0.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall'
actionpack (5.0.1) lib/action_dispatch/middleware/executor.rb:12:in call'
actionpack (5.0.1) lib/action_dispatch/middleware/static.rb:136:incall'
rack (2.0.1) lib/rack/sendfile.rb:111:in call'
railties (5.0.1) lib/rails/engine.rb:522:incall'
puma (3.7.1) lib/puma/configuration.rb:232:in call'
puma (3.7.1) lib/puma/server.rb:578:inhandle_request'
puma (3.7.1) lib/puma/server.rb:415:in process_client'
puma (3.7.1) lib/puma/server.rb:275:inblock in run'
puma (3.7.1) lib/puma/thread_pool.rb:120:in call'
puma (3.7.1) lib/puma/thread_pool.rb:120:inblock in spawn_thread'
please help me to sort it out
With the logs you have given it looks like it's failing on main_controller.rb
http_basic_authenticate_with name: ENV["API_USERNAME"], password: ENV["API_PASSWORD"]
One way to debug this is going into your rails console and check if your environment variables are set.
rails console
ENV['API_USERNAME']
=> 'api_username'
ENV['API_PASSWORD']
=> 'hash1234090909'

Linkedin Rails (403): Access to posting shares denied

When using the Linkedin gems for ruby on rails and using the Share api call encountered an error.
(403): Access to posting shares denied
I followed the tutorial in the github omniauth-linkedin.
this is my function for the linkedin.
def self.post_status(token,secret)
client = LinkedIn::Client.new('xxxx', 'xxxx')
client.authorize_from_access(token,secret)
client.add_share({:comment => "blah"})
end
this is the full stacktrace
linkedin (1.1.0) lib/linked_in/helpers/request.rb:52:in raise_errors'
linkedin (1.1.0) lib/linked_in/helpers/request.rb:22:inpost'
linkedin (1.1.0) lib/linked_in/api/share_and_social_stream.rb:95:in add_share'
app/models/linkedin_linked.rb:21:inpost_status'
app/controllers/post_social_controller.rb:5:in post'
actionpack (4.2.6) lib/action_controller/metal/implicit_render.rb:4:insend_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:198:in process_action'
actionpack (4.2.6) lib/action_controller/metal/rendering.rb:10:inprocess_action'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:20:in block in process_action'
activesupport (4.2.6) lib/active_support/callbacks.rb:117:incall'
activesupport (4.2.6) lib/active_support/callbacks.rb:117:in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:555:inblock (2 levels) in compile'
activesupport (4.2.6) lib/active_support/callbacks.rb:505:in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:505:incall'
activesupport (4.2.6) lib/active_support/callbacks.rb:92:in __run_callbacks__'
activesupport (4.2.6) lib/active_support/callbacks.rb:778:in_run_process_action_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:in run_callbacks'
actionpack (4.2.6) lib/abstract_controller/callbacks.rb:19:inprocess_action'
actionpack (4.2.6) lib/action_controller/metal/rescue.rb:29:in process_action'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action'
activesupport (4.2.6) lib/active_support/notifications.rb:164:in block in instrument'
activesupport (4.2.6) lib/active_support/notifications/instrumenter.rb:20:ininstrument'
activesupport (4.2.6) lib/active_support/notifications.rb:164:in instrument'
actionpack (4.2.6) lib/action_controller/metal/instrumentation.rb:30:inprocess_action'
actionpack (4.2.6) lib/action_controller/metal/params_wrapper.rb:250:in process_action'
activerecord (4.2.6) lib/active_record/railties/controller_runtime.rb:18:inprocess_action'
actionpack (4.2.6) lib/abstract_controller/base.rb:137:in process'
actionview (4.2.6) lib/action_view/rendering.rb:30:inprocess'
actionpack (4.2.6) lib/action_controller/metal.rb:196:in dispatch'
actionpack (4.2.6) lib/action_controller/metal/rack_delegation.rb:13:indispatch'
actionpack (4.2.6) lib/action_controller/metal.rb:237:in block in action'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:74:incall'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:74:in dispatch'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:43:inserve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:43:in block in serve'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:ineach'
actionpack (4.2.6) lib/action_dispatch/journey/router.rb:30:in serve'
actionpack (4.2.6) lib/action_dispatch/routing/route_set.rb:817:incall'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:incall'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:incall'
omniauth (1.3.1) lib/omniauth/strategy.rb:186:in call!'
omniauth (1.3.1) lib/omniauth/strategy.rb:164:incall'
omniauth (1.3.1) lib/omniauth/builder.rb:63:in call'
rack (1.6.4) lib/rack/etag.rb:24:incall'
rack (1.6.4) lib/rack/conditionalget.rb:38:in call'
rack (1.6.4) lib/rack/head.rb:13:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/params_parser.rb:27:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/flash.rb:260:incall'
rack (1.6.4) lib/rack/session/abstract/id.rb:225:in context'
rack (1.6.4) lib/rack/session/abstract/id.rb:220:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/cookies.rb:560:in call'
activerecord (4.2.6) lib/active_record/query_cache.rb:36:incall'
activerecord (4.2.6) lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in call'
activerecord (4.2.6) lib/active_record/migration.rb:377:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:29:in block in call'
activesupport (4.2.6) lib/active_support/callbacks.rb:88:inrun_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:778:in _run_call_callbacks'
activesupport (4.2.6) lib/active_support/callbacks.rb:81:inrun_callbacks'
actionpack (4.2.6) lib/action_dispatch/middleware/callbacks.rb:27:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/reloader.rb:73:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/remote_ip.rb:78:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/debug_exceptions.rb:17:incall'
web-console (2.3.0) lib/web_console/middleware.rb:28:in block in call'
web-console (2.3.0) lib/web_console/middleware.rb:18:incatch'
web-console (2.3.0) lib/web_console/middleware.rb:18:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/show_exceptions.rb:30:incall'
railties (4.2.6) lib/rails/rack/logger.rb:38:in call_app'
railties (4.2.6) lib/rails/rack/logger.rb:20:inblock in call'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in block in tagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:26:intagged'
activesupport (4.2.6) lib/active_support/tagged_logging.rb:68:in tagged'
railties (4.2.6) lib/rails/rack/logger.rb:20:incall'
actionpack (4.2.6) lib/action_dispatch/middleware/request_id.rb:21:in call'
rack (1.6.4) lib/rack/methodoverride.rb:22:incall'
rack (1.6.4) lib/rack/runtime.rb:18:in call'
activesupport (4.2.6) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall'
rack (1.6.4) lib/rack/lock.rb:17:in call'
actionpack (4.2.6) lib/action_dispatch/middleware/static.rb:120:incall'
rack (1.6.4) lib/rack/sendfile.rb:113:in call'
railties (4.2.6) lib/rails/engine.rb:518:incall'
railties (4.2.6) lib/rails/application.rb:165:in call'
rack (1.6.4) lib/rack/lock.rb:17:incall'
rack (1.6.4) lib/rack/content_length.rb:15:in call'
rack (1.6.4) lib/rack/handler/webrick.rb:88:inservice'
/home/jgeliberte/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138:in service'
/home/jgeliberte/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:94:inrun'
/home/jgeliberte/.rbenv/versions/2.2.3/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
Hope you can help me regarding my problem.

Resources