similar to: OffRailed, and stuck in the book : (

Displaying 20 results from an estimated 2000 matches similar to: "OffRailed, and stuck in the book : ("

2006 Apr 16
9
''depot'' app, where''s session?
Many of you probably know the ''depot'' app from the ''Agile Rails development'' book. I have constructed the ''products'' model, the Store-controller, and the ''Cart'' and ''Line Item'' classes. I have told Application-controller about :cart and :line_item: model :cart model :line_item Here''s part of
2006 Sep 03
2
Undefined method "xxx" of a model when calling a helper
Hi all I''m creating a shop page. I have a cart model that looks like the following: class Cart attr_reader :line_items def get_line_item id @line_items.each do |l| return l if l.id == id end end def initialize @line_items = [] end def empty! initialize end def empty? return true if @line_items.empty? false end end And I have some
2006 Jan 24
3
Unitialized constant
In Agile Web Development with Rails, I get this error when adding a product to my cart: uninitialized constant Cart ... Application Trace: /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:200:in `const_missing'' ./public/../config/../app/controllers/store_controller.rb:21:in `find_cart''
2008 Jul 10
5
Uninitialized constant (controller/model)
NameError in StoreController#add_to_cart uninitialized constant StoreController::Cart This is the controller: class StoreController < ApplicationController def index @products = Product.find_products_for_sale end def add_to_cart @cart = find_cart product = Product.find(params[:id]) @cart.add_product(product) end private def find_cart session[:cart] ||=
2009 Dec 13
20
Need help...NameError in InteractController#add_to_cart
Hi,I am developing a web app and am following the text-Agile web development.....Each time I click my "add to cart" button" i always get the  page below:I have double checked to see if i have errors in my code,there was none,please what do i need to do to proceed? NameError in InteractController#add_to_cartundefined local variable or method `find_cart'' for
2006 Aug 04
6
Errors ... errors and errors.
I bought the second edition of the ruby on rails, it seems to work fine now, did some adjustments to the code. But now I get a second error and I want to learn to understand to fix them myself. So here is the error. ArgumentError in StoreController#add_to_cart wrong number of arguments (1 for 0) #{RAILS_ROOT}/app/models/cart.rb:15:in `initialize'' #{RAILS_ROOT}/app/models/cart.rb:15:in
2006 Jun 23
3
Yet another problem with NoMethodError in Store#display_cart
Hi everybody, I''ve search a lot on google to help me with this one without success. I know that some people had the same problem as I have, but there solutions doesn''t seems to work for me. I''m trying to do the depot example in the AWDwR book. But now I''m stock with a problem that I can''t solve. I get this error: <--- begin error here --->
2009 Apr 24
11
We're sorry, but something went wrong.
Great. I''m in the development environment and that is the error message I get?! What good does that do me? I''m trying to follow along with the examples in AWDWR(3rd.), and I have this method in a store controller: private def find_cart Cart.new end That works fine, except that every request(initiated by clicking on an ''add to cart'' button) will
2006 Feb 28
19
Session magic question
Greetings! I could really use some help understanding what Rails puts into the session store related to the objects it creates. I''ve found documentation on how _I_ can put / get info into it, but can''t find the docs on what _Rails_ puts into it. I''ve got a simple app that collects some data from the user, stores it in a db record, allows the user to edit it, display
2007 Oct 19
14
Agile Web Development Book, need a bit of help
I''m working my way through the book Agile Web Development with Rails, and I am in the section where the book has me creating a display_cart method and the associated view. When I copied the code from the book into the view, it threw this error. If anyone could give me some hints where I should be looking I''d appreciate it. NoMethodError in Store#display_cart Showing
2007 Feb 07
1
The Depot "Add to Cart" sessions question (2.ed agile book)
Hello, Im in the process of working my way through the 2.ed of the agile book. As many of you already know, the book goes through the regular development cycle of the Depot application. I have hit a wall when they started talking about the sessions and the exact mechanics of how an item is added to the session. The code looks like this: depot/app/controllers/store_controller: def add_to_cart
2006 Apr 18
4
''depot'' tutorial failing on adding to cart
Hi I''m very keen to learn RoR and have been following the Agile Web Development with Rails book (first edition). However, I''ve come across a problem which has had me stumped for days now. After following the instructions up to page 85 I have tried testing the code thus far, as suggested, by adding an item to the cart. But I am getting the following error: --
2005 Dec 25
2
[repost] newbie questions
Hi all, I''m following the shop example in ''Agile Web Development with Rails''. I would like to extend the checkout screen, in such a way people can change the number of items they have selected in there cart. In my controller I have: def checkout @cart = find_cart @items = @cart.items if @items.empty?
2007 Oct 15
4
ArgumentError in StoreController#add_to_cart: wrong number of arguments (1 for 0)
I am really new to Ruby and Rails but as you probably see I am trying to get the shopping card working from the book. I am getting this error but I really don''t know what to do. I have looked up several of topics that stated the same problem but as far as I am, nothing has helped me out yet. Is there something wrong with the Product model? This is in the StoreController and I believe it
2006 Jan 11
6
Help -- NoMethodError in
Hi, I am just learing Rails and I am going through the Agile Web Development with Rails book. I am receiving: NoMethodError in Store#add_to_cart undefined method `add_product'' for #<StoreController:0x3764d80> RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace #{RAILS_ROOT}/app/controllers/store_controller.rb:12:in `add_to_cart''
2007 Aug 23
2
need help trying to debug - included screenshot
I have attached a screen shot of the error I am running into. I am on page 138 of the Agile Web Development with Rails book by Pragmatic Programmers. I am developing the depot store, and I ran into an error, with hidden_div_if. When I remove that block of code, things to work fine, besides the fact the cart does not display on the site, but everything else functions correctly, so it is
2006 Jul 24
1
Newbie error: undefined local variable or method
When I add an item to the shopping cart, I get an error: undefined local variable or method `cart_item'' for #<#<Class:0x3715a78>:0x3715a48> Session info says the cart being updated properly. I''m just not able to output two variables: <%= cart_item.quantity %> &times; <%= h(cart_item.title) %> I did some research, and I can grasp that local
2009 Nov 01
5
Headache with sessions being shared.
I have a really horrendous problem with sessions. before_filter :find_cart_from_session private def find_cart_from_session if session[:cart] # if there''s is a cart in the session begin @cart = Cart.find(session[:cart]) # return existing or new cart rescue ActiveRecord::RecordNotFound @cart = Cart.create @cart.save session[:cart] = @cart.id
2007 May 30
2
Depot - empty_cart with ajax
First of all id like to say hi to everyone from Argentina, im yet another Depot first-timer. Going through the example, i got to the point where my cart finally runs Ajax-based. And there is a line where Dave says, after all the job is done "You should see the cart in the sidebar update. And you shouldn''t see your browser show any indication of reloading the page. You''ve
2016 May 04
5
Windows 10 compatibility?
So any Samba server version will work with Windows 10? What versions have been tested with Windows 10? We have a server at a site in Israel running 3.5.14, and Windows 10 systems are not able to access it. They get an error message when trying to connect to a share: "The specified network name is no longer available." Regards, Steve -----Original Message----- From: samba