User controller crashes with Ruby 1.8.7
Reported by Brian Michalski | June 1st, 2011 @ 01:41 AM | in Basic Functional Workflow [Concerto2]
The render json:
syntax causes problems in Ruby
1.8.7. Assuming Ruby 1.8.7 is suppose to work with Rails 3.1, we
should probably fix this. See the below log:
var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:10:
syntax error, unexpected ':', expecting '}' (SyntaxError)
format.json { render json: @users }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:21: syntax error, unexpected ':', expecting '}'
format.json { render json: @user }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:32: syntax error, unexpected ':', expecting '}'
format.json { render json: @user }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:48: syntax error, unexpected ':', expecting '}' ...l { redirect_to @user, notice: 'User was successfully create...
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:49: syntax error, unexpected ':', expecting '}' ... format.json { render json: @user, status: :created, loca...
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:49: syntax error, unexpected ':', expecting '=' ... { render json: @user, status: :created, location: @user }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:51: syntax error, unexpected ':', expecting '}'
format.html { render action: "new" }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:52: syntax error, unexpected ':', expecting '}' ... format.json { render json: @user.errors, status: :unproc...
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:52: syntax error, unexpected ':', expecting '=' ...er json: @user.errors, status: :unprocessable_entity }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:64: syntax error, unexpected ':', expecting '}' ...l { redirect_to @user, notice: 'User was successfully update...
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:67: syntax error, unexpected ':', expecting '}'
format.html { render action: "edit" }
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:68: syntax error, unexpected ':', expecting '}' ... format.json { render json: @user.errors, status: :unproc...
^
/var/rails/c2_auto/bigtuna/builds/concerto/build_20_20110601024035/app/controllers/users_controller.rb:68: syntax error, unexpected ':', expecting '=' ...er json: @user.errors, status: :unprocessable_entity }
^
Comments and changes to this ticket
-
August June 1st, 2011 @ 11:02 AM
Could this be related to the fact that in Rails 3.1, JSON is the new default output for ActiveResource?
-
August June 1st, 2011 @ 11:07 AM
While I can't reproduce the old 1.8.7 environment anymore, you may want to try different syntax. format.json { render :json => @users } instead of format.json { render json: @users }.
-
Brian Michalski June 1st, 2011 @ 12:54 PM
Zach - I believe senatedev is still running Ruby 1.8.7, any chance you can
take a look at this? Running any action from the users controller should
throw one of these errors.---------- Forwarded message ---------- From: Lighthouse <no-reply@lighthouseapp.com>
Date: Wed, Jun 1, 2011 at 8:08 AM
Subject: [Concerto #153] User controller crashes with Ruby 1.8.7
To: "michab3@rpi.edu" <michab3@rpi.edu> -
August June 1st, 2011 @ 03:02 PM
Haris reported a problem with senatedev and Rails 3.1 last evening. Apparently senatedev interprets /assets URLs as being /var/www/assets, probably as a result of the way directories are setup on senatedev. This seems to prevent a Rails 3.1 app from fully working on senatedev, absent some workaround...
-
Zach Rowe June 1st, 2011 @ 05:30 PM
Same here
/var/rails/rowez/concerto/app/controllers/users_controller.rb:10: syntax error, unexpected ':', expecting '}'
format.json { render json: @users } ^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:21: syntax error, unexpected ':', expecting '}'
format.json { render json: @user } ^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:32: syntax error, unexpected ':', expecting '}'
format.json { render json: @user } ^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:48: syntax error, unexpected ':', expecting '}' ...l { redirect_to @user, notice: 'User was successfully create...
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:49: syntax error, unexpected ':', expecting '}' ... format.json { render json: @user, status: :created, loca...
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:49: syntax error, unexpected ':', expecting '=' ... { render json: @user, status: :created, location: @user }
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:51: syntax error, unexpected ':', expecting '}'
format.html { render action: "new" } ^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:52: syntax error, unexpected ':', expecting '}' ... format.json { render json: @user.errors, status: :unproc...
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:52: syntax error, unexpected ':', expecting '=' ...er json: @user.errors, status: :unprocessable_entity }
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:64: syntax error, unexpected ':', expecting '}' ...l { redirect_to @user, notice: 'User was successfully update...
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:67: syntax error, unexpected ':', expecting '}'
format.html { render action: "edit" } ^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:68: syntax error, unexpected ':', expecting '}' ... format.json { render json: @user.errors, status: :unproc...
^
/var/rails/rowez/concerto/app/controllers/users_controller.rb:68: syntax error, unexpected ':', expecting '=' ...er json: @user.errors, status: :unprocessable_entity }
^
Yeah, I found stylesheet_link_tag pointing to var/www/assets. Hmm...
-
August June 1st, 2011 @ 06:14 PM
- State changed from new to resolved
- Assigned user set to Zach Rowe
-
Brian Michalski June 1st, 2011 @ 06:39 PM
(from [adc439b9f8ef8a3dbda6744d6f21f319c33c5218]) fixed render json: syntax [#153] https://github.com/concerto/concerto/commit/adc439b9f8ef8a3dbda6744...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Concerto is an open source digital signage system that makes it easy to engage a large community of people with graphical and text-based announcements, bulletins, and other messages... but enough about us, you came here to get involved.
<br />
If you think you've <b>found a bug in Concerto</b>, please click 'Create new ticket' and let us know about it.
<br />
Looking to peek at our source code? Head to <a href="https://github.com/concerto/concerto_v1">https://github.com/concerto/concerto_v1</a> (Concerto version 1) or <a href="https://github.com/concerto/concerto">https://github.com/concerto/concerto</a> (Concerto version 2).
<br />
Our getting started guide is available here: <a href="https://github.com/concerto/concerto/wiki/Getting-Involved">https://github.com/concerto/concerto/wiki/Getting-Involved</a>.
People watching this ticket
Referenced by
- 153 User controller crashes with Ruby 1.8.7 ---------- Forwarded message ---------- From: Lighthouse ...
- 153 User controller crashes with Ruby 1.8.7 (from [adc439b9f8ef8a3dbda6744d6f21f319c33c5218]) fixed r...