<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in Agile Web Development with Rails | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/22/posts</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Images for depot app posted by Roy Stannard @ Thu, 04 Dec 2008 08:03:30 -0000</title>
      <description>&lt;p&gt;OK not to worry, found them&lt;/p&gt;</description>
      <pubDate>Thu, 04 Dec 2008 08:03:30 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1514:6579</guid>
      <author>Roy Stannard</author>
      <link>http://forums.pragprog.com/forums/22/topics/1514</link>
    </item>
    <item>
      <title>Images for depot app posted by Roy Stannard @ Thu, 04 Dec 2008 06:51:22 -0000</title>
      <description>&lt;p&gt;Hi,&lt;/p&gt;


	&lt;p&gt;Where are the product images downloaded from?&lt;/p&gt;</description>
      <pubDate>Thu, 04 Dec 2008 06:51:22 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1514:6577</guid>
      <author>Roy Stannard</author>
      <link>http://forums.pragprog.com/forums/22/topics/1514</link>
    </item>
    <item>
      <title>The Depot Application posted by choonsiong @ Sun, 30 Nov 2008 06:18:15 -0000</title>
      <description>&lt;p&gt;I have the same problem as Andreas&amp;#8230; any helps appreciate. :-)&lt;/p&gt;</description>
      <pubDate>Sun, 30 Nov 2008 06:18:15 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:10:6459</guid>
      <author>choonsiong</author>
      <link>http://forums.pragprog.com/forums/22/topics/10</link>
    </item>
    <item>
      <title>Possible  bug on find method with :select attribute and aggregate functions... posted by Alfredo Rico Moros @ Sun, 23 Nov 2008 19:06:20 -0000</title>
      <description>&lt;p&gt;Apologize, a mistake of copy and paste..&lt;/p&gt;


	&lt;p&gt;This is the output..&lt;/p&gt;


&lt;blockquote&gt;
	&lt;blockquote&gt;
	&lt;p&gt;Specification.find(:all, :select =&amp;gt; &amp;#8216;tolerancia, sum(umbral) as total&amp;#8217;, :group =&amp;gt; &amp;#8216;tolerancia&amp;#8217;)&lt;br /&gt;=&amp;gt; [#&amp;lt;specification tolerancia:&gt;, #&amp;lt;specification tolerancia:&gt;]&lt;/p&gt;

	&lt;/blockquote&gt;



&lt;/blockquote&gt;




	&lt;p&gt;Where is my total field??&lt;/p&gt;</description>
      <pubDate>Sun, 23 Nov 2008 19:06:20 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1441:6315</guid>
      <author>Alfredo Rico Moros</author>
      <link>http://forums.pragprog.com/forums/22/topics/1441</link>
    </item>
    <item>
      <title>Possible  bug on find method with :select attribute and aggregate functions... posted by Alfredo Rico Moros @ Sun, 23 Nov 2008 19:02:54 -0000</title>
      <description>&lt;p&gt;Hi to everyboy.. I need your help in order to know if I get wrong..&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m using rails 2.2.2 with MySQL 5.0&lt;/p&gt;


	&lt;p&gt;I have this migration file:&lt;/p&gt;


	&lt;p&gt;class CreateSpecifications &amp;lt; ActiveRecord::Migration
  def self.up
    create_table :specifications do |t|
      t.string :tolerancia
      t.integer :umbral&lt;/p&gt;
	&lt;pre&gt;&lt;code&gt;t.timestamps
  end
end&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;def self.down
  drop_table :specifications
end&lt;br /&gt;end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;I put some data by mean of script/console&lt;br /&gt;Specification.create(:umbral =&amp;gt; 33, :tolerancia =&amp;gt; &amp;#8216;alta&amp;#8217;)&lt;br /&gt;Specification.create(:umbral =&amp;gt; 23, :tolerancia =&amp;gt; &amp;#8216;alta&amp;#8217;)&lt;br /&gt;Specification.create(:umbral =&amp;gt; 12, :tolerancia =&amp;gt; &amp;#8216;baja&amp;#8217;)&lt;br /&gt;Specification.create(:umbral =&amp;gt; 33, :tolerancia =&amp;gt; &amp;#8216;baja&amp;#8217;)&lt;/p&gt;


	&lt;p&gt;Then when I run the following statement&lt;br /&gt;Specification.find(:all, :select =&amp;gt; &amp;#8216;tolerancia, sum(umbral) as total&amp;#8217;, :group =&amp;gt; &amp;#8216;tolerancia&amp;#8217;)&lt;/p&gt;


	&lt;p&gt;I get the following:&lt;br /&gt;[#&amp;lt;specification tolerancia:&gt;, #&amp;lt;specification tolerancia:&gt;]&lt;/p&gt;


	&lt;p&gt;Where is my total field??? How could I get it???&lt;/p&gt;


	&lt;p&gt;Besides, whit the following statement:&lt;br /&gt;&amp;gt;&amp;gt; Specification.find(:first, :select =&amp;gt; &amp;#8216;now() as ahora&amp;#8217;)&lt;br /&gt;=&amp;gt; #&amp;lt;specification&gt;&lt;/p&gt;


	&lt;p&gt;Where is my field &amp;#8216;ahora&amp;#8217;?&lt;/p&gt;


	&lt;p&gt;I have ran this situation on Heroku.com with the same sadly results..&lt;/p&gt;


	&lt;p&gt;Thanks in advanced by your help&amp;#8230;&lt;/p&gt;</description>
      <pubDate>Sun, 23 Nov 2008 19:02:54 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1441:6314</guid>
      <author>Alfredo Rico Moros</author>
      <link>http://forums.pragprog.com/forums/22/topics/1441</link>
    </item>
    <item>
      <title>web development company posted by Alena Smith @ Wed, 19 Nov 2008 07:55:30 -0000</title>
      <description>&lt;p&gt;Here is an opportunity to succeed your wants and needs by visiting the url &lt;a href="http://www.tiwebdevelopment.com"&gt;http://www.tiwebdevelopment.com&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Wed, 19 Nov 2008 07:55:30 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1397:6144</guid>
      <author>Alena Smith</author>
      <link>http://forums.pragprog.com/forums/22/topics/1397</link>
    </item>
    <item>
      <title>Problem with Server posted by Gordon Burkell @ Tue, 18 Nov 2008 19:55:11 -0000</title>
      <description>&lt;p&gt;Me Again Never mind figured it out.&lt;/p&gt;


	&lt;p&gt;I read a little further and found that after ruby script/server if I placed webrick it worked.  It was trying to open Mongrel.&lt;/p&gt;


	&lt;p&gt;GB&lt;/p&gt;</description>
      <pubDate>Tue, 18 Nov 2008 19:55:11 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1390:6130</guid>
      <author>Gordon Burkell</author>
      <link>http://forums.pragprog.com/forums/22/topics/1390</link>
    </item>
    <item>
      <title>Problem with Server posted by Gordon Burkell @ Tue, 18 Nov 2008 19:49:27 -0000</title>
      <description>&lt;p&gt;Hey I&amp;#8217;m just a beginner so I am sorry if this is a simple question.  I am on the first application in the new Rails book (Via &lt;span class="caps"&gt;PDF&lt;/span&gt;) and I ran the ruby script/server command and got this warning&lt;/p&gt;


	&lt;p&gt;path to log file not valid: log/mongrel.log&lt;/p&gt;


	&lt;p&gt;How do I fix this problem???? Again I am quite new so any help is great!&lt;br /&gt;&lt;span class="caps"&gt;THANKS&lt;/span&gt;&lt;br /&gt;GB&lt;/p&gt;</description>
      <pubDate>Tue, 18 Nov 2008 19:49:27 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1390:6129</guid>
      <author>Gordon Burkell</author>
      <link>http://forums.pragprog.com/forums/22/topics/1390</link>
    </item>
    <item>
      <title>The Depot Application posted by Andreas Boman @ Thu, 13 Nov 2008 16:13:49 -0000</title>
      <description>&lt;p&gt;I have v2 of the book; doing depot in rails 1.2.6 and I&amp;#8217;m stuck at iteration D3: Highlighting Changes.&lt;/p&gt;


	&lt;p&gt;The javascript cart update added in D2 works fine. When I add the D3 stuff the cart stops updating until a page reload (and no effect is visible).&lt;/p&gt;


	&lt;p&gt;As you may notice, I moved on and tried D4, also with no luck (similar error). I have spent a day googling and reading various threads on lists and forums to no avail. If I comment the visual_effect lines out in add_to_cart.rjs the app up to iteration D2 works as expected.&lt;br /&gt;Any help would be very welcome.&lt;/p&gt;


	&lt;p&gt;These should be the relevant log and code snippets:&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;log&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;Processing StoreController#add_to_cart (for 127.0.0.1 at 2008-11-13 10:48:12) [POST]
  Session ID: d9989c77d2d4dbe5a15a970c0e8de41b
  Parameters: {"commit"=&amp;gt;"Add to Cart", "action"=&amp;gt;"add_to_cart", "id"=&amp;gt;"6", "controller"=&amp;gt;"store"}
  Product Columns (0.003199)   SHOW FIELDS FROM products
  Product Load (0.001346)   SELECT * FROM products WHERE (products.`id` = 6) 
Rendering store/add_to_cart
Rendered store/_cart_item (0.00187)
Rendered store/_cart_item (0.00040)
Rendered store/_cart_item (0.00037)
Rendered store/_cart (0.00730)

ActionView::TemplateError (undefined method `[]' for #&amp;lt;Enumerable::Enumerator:0x7f61e8a06008&amp;gt;) on line #5 of app/views/store/add_to_cart.rjs:
2: 
3: #page[:cart].visual_effect :blind_down if @cart.total_items == 1
4: 
5: page[:current_item].visual_effect :highlight

    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/string/access.rb:43:in `first'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/inflector.rb:144:in `camelize'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/core_ext/string/inflections.rb:49:in `camelize'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/helpers/prototype_helper.rb:719:in `method_missing'
    $HOME/src/rails/depot/app/views/store/add_to_cart.rjs:5:in `_run_rjs_47app47views47store47add_to_cart46rjs'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/helpers/prototype_helper.rb:329:in `instance_exec'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/helpers/prototype_helper.rb:329:in `initialize'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/helpers/prototype_helper.rb:641:in `new'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/helpers/prototype_helper.rb:641:in `update_page'
    $HOME/src/rails/depot/app/views/store/add_to_cart.rjs:0:in `_run_rjs_47app47views47store47add_to_cart46rjs'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/base.rb:325:in `send'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/base.rb:325:in `compile_and_render_template'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/base.rb:301:in `render_template'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_view/base.rb:260:in `render_file'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:812:in `render_file'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:717:in `render_with_no_layout'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/layout.rb:256:in `render_without_benchmark'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:50:in `render'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:50:in `render'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:1102:in `perform_action_without_filters'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:696:in `call_filters'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:688:in `perform_action_without_benchmark'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
    /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/benchmarking.rb:66:in `perform_action_without_rescue'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/rescue.rb:83:in `perform_action'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:435:in `send'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:435:in `process_without_filters'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/filters.rb:684:in `process_without_session_management_support'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/session_management.rb:114:in `process'
    $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb:334:in `process'
    $HOME/.gem/ruby/1.8/gems/rails-1.2.6/lib/dispatcher.rb:41:in `dispatch'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run'
    /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:488:in `load'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:488:in `load'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in `new_constants_in'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:488:in `load'
    $HOME/.gem/ruby/1.8/gems/rails-1.2.6/lib/commands/servers/mongrel.rb:60
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:342:in `new_constants_in'
    $HOME/.gem/ruby/1.8/gems/activesupport-1.4.4/lib/active_support/dependencies.rb:495:in `require'
    $HOME/.gem/ruby/1.8/gems/rails-1.2.6/lib/commands/server.rb:39
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
    /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' 
script/server:3

Rendering $HOME/.gem/ruby/1.8/gems/actionpack-1.13.6/lib/action_controller/templates/rescues/layout.rhtml (500 Internal Error)

&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;


	&lt;p&gt;&lt;code&gt;cart.rb&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;  def add_product(product)
    current_item = @items.find {|item| item.product == product}
    if current_item
      current_item.increment_quantity
    else
      current_item = CartItem.new(product)
      @items &amp;lt;&amp;lt; current_item
    end
    current_item
  end
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;store_controller.rb&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;
  def add_to_cart
    begin
      product = Product.find(params[:id])
    rescue ActiveRecord::RecordNotFound
      logger.error("Attempt to access invalid product #{params[:id]}")
      redirect_to_index("Invalid product")
    else
      @cart = find_cart
      @current_item = @cart.add_product(product)
    end
  end
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;_cart_item.rhtml&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;
&amp;lt;% if cart_item == @current_item %&amp;gt;
  &amp;lt;tr id="current_item"&amp;gt;
&amp;lt;% else %&amp;gt;
  &amp;lt;tr&amp;gt;
&amp;lt;% end %&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;%= cart_item.quantity %&amp;gt;&amp;amp;times;&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;%=h cart_item.title %&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;td class="item-price"&amp;gt;&amp;lt;%= number_to_currency(cart_item.price) %&amp;gt;&amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;code&gt;add_to_cart.rjs&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;
page.replace_html("cart", :partial =&amp;gt; "cart", :object =&amp;gt; @cart)

#page[:cart].visual_effect :blind_down if @cart.total_items == 1

page[:current_item].visual_effect :highlight
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Nov 2008 16:13:49 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:10:6034</guid>
      <author>Andreas Boman</author>
      <link>http://forums.pragprog.com/forums/22/topics/10</link>
    </item>
    <item>
      <title>The Depot Application posted by Joe Sak @ Thu, 06 Nov 2008 06:56:44 -0000</title>
      <description>&lt;p&gt;Just found out:&lt;br /&gt;&lt;pre&gt;
def add_to_cart
      begin
          product = Product.find(params[:id])
      rescue ActiveRecord::RecordNotFound
          logger.error("Attempt to access invalid product #{params[:id]}")
          redirect_to_index("Invalid product")
      else
          @cart = find_cart
            @cart.add_product(product)
            @current_item = @cart.add_product(product)

      end
  end
&lt;/pre&gt;&lt;br /&gt;I had the add_product method running twice. &lt;strong&gt;smack forehead&lt;/strong&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 06 Nov 2008 06:56:44 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:10:5884</guid>
      <author>Joe Sak</author>
      <link>http://forums.pragprog.com/forums/22/topics/10</link>
    </item>
    <item>
      <title>The Depot Application posted by Joe Sak @ Thu, 06 Nov 2008 06:36:08 -0000</title>
      <description>&lt;p&gt;I just got to p 124 in the 2nd Edition.&lt;/p&gt;


	&lt;p&gt;I got the highlighting of the current item working. Now, for no reason, when I click add to cart, it adds double. It used to increment properly but now it&amp;#8217;s incrementing double.&lt;/p&gt;


	&lt;p&gt;So I click Add to Cart and it says 2x Book Title Price&lt;br /&gt;I click Add to Cart again and it says 4x Book Title Price&lt;/p&gt;


	&lt;p&gt;Can anyone help me figure out why this is happening?&lt;/p&gt;</description>
      <pubDate>Thu, 06 Nov 2008 06:36:08 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:10:5883</guid>
      <author>Joe Sak</author>
      <link>http://forums.pragprog.com/forums/22/topics/10</link>
    </item>
    <item>
      <title>The Depot Application posted by Hayden Hancock @ Sat, 01 Nov 2008 06:44:25 -0000</title>
      <description>&lt;p&gt;I am only on page 77 of the Beta book and have run into an error on rake db:migrate.&lt;/p&gt;


	&lt;p&gt;Ruby version: 1.8.6&lt;br /&gt;Rails version: 2.1.2&lt;br /&gt;Gem version: 1.3.1&lt;/p&gt;


&lt;code&gt;rake aborted!
no such file to load -- sqlite3&lt;/code&gt;

	&lt;p&gt;I&amp;#8217;ve installed rake using the command: gem install rake&lt;br /&gt;I&amp;#8217;ve also tried deleting the &amp;#8220;Depot&amp;#8221; application and restarting but continue to get the same error.&lt;/p&gt;</description>
      <pubDate>Sat, 01 Nov 2008 06:44:25 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:10:5784</guid>
      <author>Hayden Hancock</author>
      <link>http://forums.pragprog.com/forums/22/topics/10</link>
    </item>
    <item>
      <title>Help! Stuck @ Chapter 8 posted by Sammy @ Wed, 29 Oct 2008 02:27:13 -0000</title>
      <description>&lt;p&gt;Hi there,&lt;/p&gt;


	&lt;p&gt;I am stuck in chapter 8, more specifically in 8.3.&lt;br /&gt;I have followed all the steps and double checked them and I get this error&lt;br /&gt;&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;
 NoMethodError in StoreController#add_to_cart&lt;/p&gt;


	&lt;p&gt;You have a nil object when you didn&amp;#8217;t expect it!&lt;br /&gt;You might have expected an instance of Array.&lt;br /&gt;The error occurred while evaluating nil.find&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;RAILS&lt;/span&gt;_ROOT: /home/sammy/Projects/depot&lt;br /&gt;Application Trace | Framework Trace | Full Trace&lt;/p&gt;


	&lt;p&gt;app/controllers/store_controller.rb:8:in `add_to_cart&amp;#8217;&lt;br /&gt;&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;-&lt;/del&gt;&lt;/p&gt;


	&lt;p&gt;I assume it complains about the &amp;#8221;@items.find&amp;#8221; in store_controller&amp;#8230;but cant figure out why&amp;#8230;&lt;/p&gt;


	&lt;p&gt;Anyone experienced the same? What am I doing wrong?&lt;/p&gt;</description>
      <pubDate>Wed, 29 Oct 2008 02:27:13 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1266:5701</guid>
      <author>Sammy</author>
      <link>http://forums.pragprog.com/forums/22/topics/1266</link>
    </item>
    <item>
      <title>A problem in crearting a &amp;quot;rails&amp;quot; application in &amp;quot;InstantRails&amp;quot; posted by Abder-Rahman Hasan Ali @ Wed, 22 Oct 2008 17:22:00 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;m using &amp;#8220;InstantRails&amp;#8221;.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m trying to create a new &amp;#8220;Rails&amp;#8221; application using the following command:&lt;/p&gt;


	&lt;p&gt;rails demo&lt;/p&gt;


	&lt;p&gt;And, this is what I get:&lt;/p&gt;


	&lt;p&gt;C:/InstantRails/ruby/bin/rails:9:in `require&amp;#8217;: no such file to load&amp;#8212;rubygems&lt;br /&gt;(LoadError)
        from C:/InstantRails/ruby/bin/rails:9&lt;/p&gt;


	&lt;p&gt;Why is that? and, what should I do?&lt;/p&gt;


	&lt;p&gt;Thanks.&lt;/p&gt;


	&lt;p&gt;Online&lt;/p&gt;</description>
      <pubDate>Wed, 22 Oct 2008 17:22:00 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:1221:5529</guid>
      <author>Abder-Rahman Hasan Ali</author>
      <link>http://forums.pragprog.com/forums/22/topics/1221</link>
    </item>
    <item>
      <title>Slighlty Confused posted by Jason Franklin-Stokes @ Thu, 09 Oct 2008 22:06:42 -0000</title>
      <description>&lt;p&gt;In routes.rb, you need to add&lt;/p&gt;


	&lt;p&gt;map.game &amp;#8216;game&amp;#8217;, :controller =&amp;gt; &amp;#8216;game&amp;#8217;, :action =&amp;gt; &amp;#8216;index&amp;#8217;&lt;/p&gt;


	&lt;p&gt;or better&lt;/p&gt;


	&lt;p&gt;map.resources :games&lt;/p&gt;</description>
      <pubDate>Thu, 09 Oct 2008 22:06:42 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:740:5067</guid>
      <author>Jason Franklin-Stokes</author>
      <link>http://forums.pragprog.com/forums/22/topics/740</link>
    </item>
    <item>
      <title>Foreign Key constraints posted by Jason Franklin-Stokes @ Thu, 09 Oct 2008 21:56:27 -0000</title>
      <description>&lt;p&gt;The general consensus is that the data in your database should outlive the software that you use to read, write and update the data in it.&lt;/p&gt;


	&lt;p&gt;Therefore if you include foreign key constraints on a database level any old piece o software can use the data &#8211; You make your data rails independent.&lt;/p&gt;


	&lt;p&gt;The other advantage is that you can produce diagrams showing the relations of your tables to one another (which is in fact helpful when things get larger).&lt;/p&gt;


	&lt;p&gt;Also adding these constrains gives you a safety net when deleting dependent fields across different tables. i.e. if your miss a declaration your code, the database won&#8217;t. &#8211; thus decreasing the risk of table rows floating around in the table with no parents.&lt;/p&gt;


	&lt;p&gt;Sqlite3 does not support foreign key restrains &amp;#8211; however, you should no be using it in production mode. Use Postgress or &lt;span class="caps"&gt;MYSQL&lt;/span&gt; etc &amp;#8211; which support this feature anyway.&lt;/p&gt;</description>
      <pubDate>Thu, 09 Oct 2008 21:56:27 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:877:5065</guid>
      <author>Jason Franklin-Stokes</author>
      <link>http://forums.pragprog.com/forums/22/topics/877</link>
    </item>
    <item>
      <title>Routing Errors posted by Jason Franklin-Stokes @ Thu, 09 Oct 2008 21:46:11 -0000</title>
      <description>&lt;p&gt;just an after note: when ever you make any changes to routes.rb always resart the server.&lt;/p&gt;</description>
      <pubDate>Thu, 09 Oct 2008 21:46:11 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:905:5064</guid>
      <author>Jason Franklin-Stokes</author>
      <link>http://forums.pragprog.com/forums/22/topics/905</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Roy Stannard @ Mon, 29 Sep 2008 11:25:58 -0000</title>
      <description>&lt;p&gt;Success! I managed to solve the mysq db creaate problem.&lt;/p&gt;


	&lt;p&gt;Following the &amp;#8216;last resort&amp;#8217; method at the end of&lt;/p&gt;


	&lt;p&gt;&lt;a href="https://help.ubuntu.com/community/MysqlPasswordReset"&gt;https://help.ubuntu.com/community/MysqlPasswordReset&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;From the console:&lt;br /&gt;sudo apt-get&amp;#8212;purge remove mysql-server mysql-common mysql-client&lt;br /&gt;and&lt;br /&gt;sudo apt-get install mysql-server mysql-common mysql-client&lt;/p&gt;


	&lt;p&gt;this put up an input screen which allowed me to set user and password. Synaptic did not do this&lt;/p&gt;


	&lt;p&gt;Since I had no data to worry about, this method was a no-brainer.&lt;/p&gt;


	&lt;p&gt;Mysql is now working with rails 2,&lt;/p&gt;


	&lt;p&gt;Thanks for your help.&lt;/p&gt;</description>
      <pubDate>Mon, 29 Sep 2008 11:25:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4689</guid>
      <author>Roy Stannard</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
    <item>
      <title>I tried downloading SQLite posted by Aron Grinshtein @ Thu, 25 Sep 2008 14:00:24 -0000</title>
      <description>&lt;p&gt;I am using a &lt;span class="caps"&gt;MAC OS X 10&lt;/span&gt;.3.9.  Dave says that I have to download SQLite.  I tried downloading it with no success. I downloaded the zip file, unzipped it, and it doesnt work.&lt;/p&gt;


	&lt;p&gt;Any suggestions?&lt;/p&gt;


	&lt;p&gt;Thanks&lt;/p&gt;</description>
      <pubDate>Thu, 25 Sep 2008 14:00:24 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:982:4661</guid>
      <author>Aron Grinshtein</author>
      <link>http://forums.pragprog.com/forums/22/topics/982</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Sam Ruby @ Mon, 22 Sep 2008 17:06:00 -0000</title>
      <description>&lt;p&gt;Your mysql status indicates that your username is &lt;code&gt;roy&lt;/code&gt;, but your database.yml tells rails to use &lt;code&gt;root&lt;/code&gt; instead.&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 17:06:00 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4629</guid>
      <author>Sam Ruby</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Roy Stannard @ Mon, 22 Sep 2008 16:49:15 -0000</title>
      <description>&lt;p&gt;Sorry about the messed up database.yml details. I&amp;#8217;m not sure why this happened&lt;/p&gt;


	&lt;p&gt;Here they are again &lt;br /&gt;development:&lt;br /&gt;adapter: mysql&lt;br /&gt;encoding: utf8&lt;br /&gt;database: depot_development&lt;br /&gt;username: root&lt;br /&gt;password: random
#socket: /var/run/mysqld/mysqld.sock&lt;br /&gt;host: localhost&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 16:49:15 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4628</guid>
      <author>Roy Stannard</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Roy Stannard @ Mon, 22 Sep 2008 16:45:44 -0000</title>
      <description>&lt;p&gt;Actually I meant to post mysql status info before&lt;br /&gt;mysql&amp;gt; status;&lt;br /&gt;&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;-&lt;del&gt;&amp;#8212;&lt;/del&gt;&lt;br /&gt;mysql  Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2&lt;/p&gt;


	&lt;p&gt;Connection id:        45&lt;br /&gt;Current database:    &lt;br /&gt;Current user:        roy@localhost&lt;br /&gt;&lt;span class="caps"&gt;SSL&lt;/span&gt;:            Not in use&lt;br /&gt;Current pager:        stdout&lt;br /&gt;Using outfile:        &amp;#8217;&amp;#8217;&lt;br /&gt;Using delimiter:    ;&lt;br /&gt;Server version:        5.0.51a-3ubuntu5.1 (Ubuntu)&lt;br /&gt;Protocol version:    10&lt;br /&gt;Connection:        Localhost via &lt;span class="caps"&gt;UNIX&lt;/span&gt; socket&lt;br /&gt;Server characterset:    latin1&lt;br /&gt;Db     characterset:    latin1&lt;br /&gt;Client characterset:    latin1&lt;br /&gt;Conn.  characterset:    latin1&lt;br /&gt;&lt;span class="caps"&gt;UNIX&lt;/span&gt; socket:        /var/run/mysqld/mysqld.sock&lt;br /&gt;Uptime:            8 hours 8 min 15 sec&lt;/p&gt;


	&lt;p&gt;and the relevant section in database.yml&lt;/p&gt;


development:
  adapter: mysql
  encoding: utf8
  database: depot_development
  username: root
  password: random
	&lt;ol&gt;
	&lt;li&gt; socket: /var/run/mysqld/mysqld.sock
  host: localhost&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;I&amp;#8217;ve looked at 72-73 and I&amp;#8217;m really not sure where to go from here.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m still getting this error&lt;/p&gt;


	&lt;p&gt;roy@prospero:~/programming/rails_apps/agile_rails/depot$ mysqladmin -u root -p create depot_development&lt;br /&gt;Enter password: &lt;br /&gt;mysqladmin: connect to server at &amp;#8216;localhost&amp;#8217; failed&lt;br /&gt;error: &amp;#8216;Access denied for user &amp;#8216;root&amp;#8217;@&amp;#8217;localhost&amp;#8217; (using password: &lt;span class="caps"&gt;YES&lt;/span&gt;)&amp;#8217;&lt;/p&gt;


	&lt;p&gt;Thanks for your help, I do appreciate it.&lt;/p&gt;


	&lt;p&gt;Roy&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 16:45:44 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4627</guid>
      <author>Roy Stannard</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Sam Ruby @ Mon, 22 Sep 2008 15:35:54 -0000</title>
      <description>&lt;p&gt;Looks like you got a connection, but didn&amp;#8217;t provide the right user and password.  Check your config/database.yml.  You can find more information on pages 72-73 in the B1.5 printing of the &lt;span class="caps"&gt;PDF&lt;/span&gt;.&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 15:35:54 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4626</guid>
      <author>Sam Ruby</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Roy Stannard @ Mon, 22 Sep 2008 14:58:19 -0000</title>
      <description>&lt;p&gt;Duh!   thanks Sam. It works.&lt;/p&gt;


	&lt;p&gt;Actually, since my first post, I&amp;#8217;ve been looking at using mysql rather than sqlite. My reasons are that I worked thru most of &lt;span class="caps"&gt;AWDWR2&lt;/span&gt; and have some (little) familiarity with mysql and also I have some data in an mysql database that I will be using later.&lt;/p&gt;


	&lt;p&gt;So I set up a depot app with rails configured for mysql using 
 rails&amp;#8212;database=mysql depot    that runs OK&lt;/p&gt;


	&lt;p&gt;But when I try to create a db I get an error message&lt;/p&gt;


	&lt;p&gt;roy@prospero:&lt;sub&gt;/programming/rails_apps/agile_rails$ mysqladmin -u root create depot_development&lt;br /&gt;mysqladmin: connect to server at &amp;#8216;localhost&amp;#8217; failed&lt;br /&gt;error: &amp;#8216;Access denied for user &amp;#8216;root&amp;#8217;@&amp;#8217;localhost&amp;#8217; (using password: NO)&amp;#8217;&lt;/p&gt;


	&lt;p&gt;I have installed mysql and it seems to be working&lt;/p&gt;


	&lt;p&gt;roy@prospero:&lt;/sub&gt;/programming/rails_apps/agile_rails/depot$ mysqladmin version&lt;br /&gt;mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486&lt;br /&gt;Copyright&amp;#169; 2000-2006 MySQL AB&lt;br /&gt;This software comes with &lt;span class="caps"&gt;ABSOLUTELY NO WARRANTY&lt;/span&gt;. This is free software,&lt;br /&gt;and you are welcome to modify and redistribute it under the &lt;span class="caps"&gt;GPL&lt;/span&gt; license&lt;/p&gt;


	&lt;p&gt;Server version        5.0.51a-3ubuntu5.1&lt;br /&gt;Protocol version    10&lt;br /&gt;Connection        Localhost via &lt;span class="caps"&gt;UNIX&lt;/span&gt; socket&lt;br /&gt;&lt;span class="caps"&gt;UNIX&lt;/span&gt; socket        /var/run/mysqld/mysqld.sock&lt;br /&gt;Uptime:            6 hours 28 min 1 sec&lt;/p&gt;


	&lt;p&gt;and&lt;/p&gt;


	&lt;p&gt;roy@prospero:~/programming/rails_apps/agile_rails/depot$ mysqladmin version&lt;br /&gt;mysqladmin  Ver 8.41 Distrib 5.0.51a, for debian-linux-gnu on i486&lt;br /&gt;Copyright&amp;#169; 2000-2006 MySQL AB&lt;br /&gt;This software comes with &lt;span class="caps"&gt;ABSOLUTELY NO WARRANTY&lt;/span&gt;. This is free software,&lt;br /&gt;and you are welcome to modify and redistribute it under the &lt;span class="caps"&gt;GPL&lt;/span&gt; license&lt;/p&gt;


	&lt;p&gt;Server version        5.0.51a-3ubuntu5.1&lt;br /&gt;Protocol version    10&lt;br /&gt;Connection        Localhost via &lt;span class="caps"&gt;UNIX&lt;/span&gt; socket&lt;br /&gt;&lt;span class="caps"&gt;UNIX&lt;/span&gt; socket        /var/run/mysqld/mysqld.sock&lt;br /&gt;Uptime:            6 hours 28 min 1 sec&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;ve also added   host: localhost to database.yml&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m not sure where to go from here. Maybe I ought to install the mysql gem.&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 14:58:19 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4625</guid>
      <author>Roy Stannard</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
    <item>
      <title>generate/scaffold command problem posted by Sam Ruby @ Mon, 22 Sep 2008 13:07:17 -0000</title>
      <description>&lt;p&gt;The greater than sign is the prompt.  If you enter all this on one line, drop both the backslash and the greater than sign.&lt;/p&gt;</description>
      <pubDate>Mon, 22 Sep 2008 13:07:17 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:22:973:4624</guid>
      <author>Sam Ruby</author>
      <link>http://forums.pragprog.com/forums/22/topics/973</link>
    </item>
  </channel>
</rss>
