I am trying to test to see if a simple run of a rail application with a database will work and I am running in to an issue.
Here are the steps I am taking:
> mkdir MyApp
> cd MyApp
> rails myapp
...
> rake db:create
...
> ruby script/generate scaffold user first_name:string last_name:string active:boolean
...
> rake db:migrate
...
> ruby script/server
...
From here, the first time I open http://localhost:3000/users the page will open and then I click "New User". Then I get this error:
NoMethodError in Users#index
Showing app/views/layouts/users.html.erb where line #12 raised:
undefined method `^' for "7":String
RAILS_ROOT: /Users/lillq/MyApp
/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/actionpack-2.3.4/lib/action_view/base.rb:197:in `flash'
/Users/lillq/MyApp/app/views/layouts/users.html.erb:12:in `_run_erb_app47views47layouts47users46html46erb'
/Users/lillq/MyApp/app/controllers/users_controller.rb:7:in `index'
So, first I thought that the versions might not be compatible, but there are several questions that say that 1.9.1 and rails are compatible.
Both say that Rail and Ruby 1.9 should work.
So here are the versions that I am running:
lillq:~/MyApp > ruby --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-darwin10.0.0]
lillq:~/MyApp > gem --version
1.3.5
lillq:~/MyApp > gem list
*** LOCAL GEMS ***
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
mysql (2.8.1)
rack (1.0.0)
rails (2.3.4)
rake (0.8.7)
sqlite3-ruby (1.2.5)
So from what I can find online, all things are telling me that this should run. What am I missing?