Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Shaun Jackson
1,270 PointsSilly End Syntax Error
I've copied this exactly as the man with the creepy smile did but I'm still getting a syntax error and I've had enough of staring at it.
Error code on test:
C:\Sites\treebook>ruby -Itest test/functional/profiles_controller_test.rb C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': C:/Sites/treebook/app/controllers/profiles_controller.rb:12: syntax error, unexpected $end, expecting keyword_end (SyntaxError)
Code from profiles controller:
class ProfilesController < ApplicationController
def show
@user = User.find_by_profile_name(params[:id])
if @user
render action: :show
else
render file: 'public/404', status: 404, formats: [:html]
end
end
2 Answers
Shaun Jackson
1,270 Pointsif's need terminating?
Wish they told me this on the video, thanks
Victor Miclovich
9,108 Pointslol... yes they do; you could do the Ruby foundations track as well (just one more time if you haven't)
Shaun Jackson
1,270 PointsThanks for the help. Most of the errors I have are forgetting to include a : or ? or %> and that is frustrating.
I'm almost completed the Ruby SImple program.
Victor Miclovich
9,108 PointsVictor Miclovich
9,108 PointsDoes your
ProfilesControllerhave a finalend?