title: Rails 3.2.2 not executing rjs
body: <p>I'm following the book <em>Pragmatic Agile Web Development With Rails 4th Edition</em>, BUT I'm using Rails 3.2.2 instead of 3.0.5 as recommended in the book:</p>
  
  <pre><code>~$ ruby -v
  ruby 1.9.3p125 (2012-02-16) [i686-linux]
  ~$ rails -v
  Rails 3.2.2
  </code></pre>
  
  <p>I got stuck when including AJAX to redraw the Cart without reloading the page. Here is the create action in line_items_controller.rb:</p>
  
  <pre><code>def create
      @cart = current_cart
      product = Product.find(params[:product_id])
      @line_item = @cart.add_product(product.id)
  
      respond_to do |format|
        if @line_item.save
          format.html { redirect_to(store_url) }
          format.js 
          format.json { render json: @line_item, status: :created, location: @line_item }
        else
          format.html { render action: "new" }
          format.json { render json: @line_item.errors, status: :unprocessable_entity }
        end
      end
    end
  </code></pre>
  
  <p>And here is my RJS file create.js.rjs (under app/views/line_items):</p>
  
  <pre><code>page.alert('NO PROBLEM HERE')
  page.replace_html('cart', render(@cart))
  </code></pre>
  
  <p>However, when I click the button that starts this action:</p>
  
  <pre><code>&lt;%= button_to 'Add to Cart', line_items_path(:product_id =&gt; product), :remote =&gt; true %&gt;
  </code></pre>
  
  <p>I get the following error in the development log:</p>
  
  <pre><code>ActionView::MissingTemplate (Missing template line_items/create, application/create with {:locale=&gt;[:en], :formats=&gt;[:js, :html], :handlers=&gt;[:erb, :builder, :coffee]}. Searched in:
    * "/home/me/src_rails/depot/app/views"
  ):
    app/controllers/line_items_controller.rb:47:in `create'
  </code></pre>
  
  <p>If I change the filename of create.js.rjs to create.js.erb, the problem is corrected:</p>
  
  <pre><code>Rendered line_items/create.js.erb (0.4ms)
  </code></pre>
  
  <p>but nothing happens in the view.... not even the alert. 
  What am I missing? 
  What is the difference between file.js.erb and file.js.rjs?</p>