|
27 May 2009, 03:05
Robert Goddard
(5 posts)
|
Hi: I tried to fix some errors on section 8.3 (sessions), and I was trying to fix the no method error that comes up in the book and now the session won’t startt…
here’s the command line errors:
=> Rails 2.3.2 application starting on http://0.0.0.0:3000 /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant’: uninitialized constant ActionController::Session::ActiveRecordResource (NameError)
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing’
from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session_management.rb:19:in `const_get’
from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session_management.rb:19:in `session_store=’
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:580:in `send’
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:580:in `initialize_framework_settings’
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:579:in `each’
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb-bash: =: command not found hapa:/sites/depot hapa$ => Rails 2.3.2 application starting on http://0.0.0.0:3000 -bash: =: command not found hapa:/sites/depot hapa$ /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in `load_missing_constant’: uninitialized constant ActionController::Session::ActiveRecordResource (NameError) > from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:80:in `const_missing’ > from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session_management.rb:19:in `const_get’ -bash: command substitution: line 1: unexpected EOF while looking for matching `’‘ -bash: command substitution: line 3: syntax error: unexpected end of file -bash: /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:440:in: No such file or directory hapa:/sites/depot hapa$ from /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session_management.rb:19:in `session_store=’ > from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:580:in `send’ > from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:580:in `initialize_framework_settings’ -bash: command substitution: line 1: unexpected EOF while looking for matching `’‘ -bash: command substitution: line 3: syntax error: unexpected end of file from: can’t read /var/mail//usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session_management.rb:19:in hapa:/sites/depot hapa$ from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:579:in `each’ > from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:579:in `initialize_framework_settings’ > from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:576:in `each’ -bash: command substitution: line 1: unexpected EOF while looking for matching `’‘ -bash: command substitution: line 3: syntax error: unexpected end of file from: can’t read /var/mail//usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:579:in hapa:/sites/depot hapa$ ... 10 levels… -bash: ...: command not found hapa:/sites/depot hapa$ from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 from: can’t read /var/mail//usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/server.rb:84 hapa:/sites/depot hapa$ from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’ > from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require’ > from script/server:3 > hapa:/sites/depot hapa$ >
Any suggestions and help.
Thank You, Scott
|
|
28 May 2009, 03:53
Robert Goddard
(5 posts)
|
Well, I just recopied all the code from this site and the server is working now. However, I’m still having an issue with the code from add_to_cart.html.erb (page 113) and I’m getting the error:
NoMethodError in Store#add_to_cart
Showing app/views/store/add_to_cart.html.erb where line #5 raised:
undefined method `quantity' for #<Product:0x326ad9c>
Extracted source (around line #5):
2:
3: <ul>
4: <% for cart_item in @cart.items %>
5: <li><%= cart_item.quantity %> × <%= h(cart_item.title) %></li>
6: <% end %>
7: </ul>
|
|
23 Jun 2009, 20:36
David Spindle
(9 posts)
|
It looks like it still thinks stuff in your cart are Products. I think I recall the book saying you need to clear your session data in the db.
|
| |
You must be logged in to comment
|