-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent error when current_user
is called without refetch: true
#190
Comments
Hi! |
I tried starting faye in production mode. Now I do see in the log a call being made to the partial but it is followed by an error call as shown below and it does not update my page which is open in another tab. Rendered sync/projects/_project_row.html.erb (3.7ms) |
Looks like everything works fine when I use pusher but not when I use faye. When I start faye in production mode, do I have to start Rails app in production mode also? I have tried Rails app in both dev and production mode but neither seems to update data although I do see a call being made to render the partial. Does that mean the updated state of model is not being passed to partial. I am trying to test update action. |
I did some more digging and looks like my partial has a call to current user which causes undefined method `env' for nil:NilClass error on line 135 in Just to be clear when there is no call to current_user in view, the update works with Pusher but not with Faye. |
Hey @navjeetc, sorry for the delay in response. If you need to call |
current_user
is called without refetch: true
So adding refetch: true to partial call, did render the partial with updated value but the partial was rendered twice hence listing two identical rows. Not sure why. |
And faye still does not work even when rails and rack are started in production mode. |
@navjeetc How did you resolve it finally ? I am having an identical issue of getting duplicate records. |
No I did not |
Moving to #214 |
Was anyone able to resolve this issue? Ran with pusher and faye and I am still receiving the following error:
The message object is being created, so when page refreshes the new message is there. Here is a look at the controller:
calling the partials:
partial:
|
I am this error on starting in dev mode on running rackup command . I am using Rails 4.2 and ruby 2.1.5
rackup sync.ru
Thin web server (v1.6.3 codename Protein Powder)
'Maximum connections set to 1024
Listening on localhost:9292, CTRL+C to stop
Rack::Lint::LintError: Status must be >=100 seen as integer
/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/lint.rb:20:in
assert' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/lint.rb:620:in
check_status'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/lint.rb:51:in
_call' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/lint.rb:37:in
call'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/showexceptions.rb:24:in
call' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/commonlogger.rb:33:in
call'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/chunked.rb:54:in
call' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/content_length.rb:15:in
call'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/connection.rb:86:in
block in pre_process' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/connection.rb:84:in
catch'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/connection.rb:84:in
pre_process' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/connection.rb:53:in
process'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/faye-websocket-0.9.2/lib/faye/adapters/thin.rb:40:in
process' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/connection.rb:39:in
receive_data'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/faye-websocket-0.9.2/lib/faye/adapters/thin.rb:44:in
receive_data' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in
run_machine'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in
run' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/backends/base.rb:73:in
start'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/thin-1.6.3/lib/thin/server.rb:162:in
start' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/handler/thin.rb:19:in
run'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/server.rb:286:in
start' /Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/lib/rack/server.rb:147:in
start'/Users/navjeetc/.rvm/gems/ruby-2.1.5/gems/rack-1.6.1/bin/rackup:4:in
<top (required)>' /Users/navjeetc/.rvm/gems/ruby-2.1.5/bin/rackup:23:in
load'/Users/navjeetc/.rvm/gems/ruby-2.1.5/bin/rackup:23:in
<main>' /Users/navjeetc/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in
eval'/Users/navjeetc/.rvm/gems/ruby-2.1.5/bin/ruby_executable_hooks:15:in `
127.0.0.1 - - [06/Jun/2015:14:16:17 -0400] "GET /faye?message=%5B%7B%22channel%22%3A%22%2Fmeta%2Fhandshake%22%2C%22version%22%3A%221.0%22%2C%22supportedConnectionTypes%22%3A%5B%22websocket%22%2C%22eventsource%22%2C%22long-polling%22%2C%22cross-origin-long-polling%22%2C%22callback-polling%22%5D%2C%22id%22%3A%221%22%7D%5D&jsonp=jsonp364 HTTP/1.1" 500 82333 0.0314
The text was updated successfully, but these errors were encountered: