I'm attempting to learn Ruby on Rails, but these errors aren't helping. I'm currently trying to follow the lessons available on www.learningrails.com. I received this error after trying to visit a page generated by using the scaffold command. Actually, this is all I did up until the error:
rails sample2 -d mysql mysqladmin -u root -p create sample2_development ruby script/generate controller pages home resources about contact ruby script/generate scaffold page name:string title:string body:text rake db:migrate
Then after visiting localhost:3000/pages/new, this error occurred...
Showing app/views/pages/new.html.erb where line #3 raised: undefined method `^' for "e":String
Extracted source (around line #3): 1: <h1>New page</h1> 2: 3: <% form_for(@page) do |f| %> 4: <%= f.error_messages %> 5: 6: <p>
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:46:in `block in secure_compare' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:45:in `each' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:45:in `secure_compare' /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:28:in `verify' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:156:in `unmarshal' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:145:in `load_session' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:62:in `block in load!' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:70:in `stale_session_check!' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:61:in `load!' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:28:in `' /usr/local/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/request_forgery_protection.rb:102:in `form_authenticity_token' (eval):2:in `form_authenticity_token' /Users/username/Sites/Ruby/sample2/app/views/pages/new.html.erb:3:in `_run_erb_app47views47pages47new46html46erb' /Users/username/Sites/Ruby/sample2/app/controllers/pages_controller.rb:29:in `new'
I read another post on here that reported an error similar to this and it lead to this patch: https://rails.lighthouseapp.com/projects/8994/tickets/3144/
However, this patch is apparently specifying message_verifier.rb, which I do not see in my error, and I do not know how to apply patches to Rails.
If anyone could be of assistance I would greatly appreciate it.
I'm using: Ruby 1.9.1p243 (2009-07-16 revision 24175) Rails 2.3.4 RubyGems 1.3.5 MySQLAdmin Ver 8.42 Distrib 5.1.40