Skip to content

Instantly share code, notes, and snippets.

@citrus
citrus / spree_how_to.md
Created April 28, 2011 16:42
Creating a Spree Site...

Creating a Spree Site

Here's how to get up and running on version 0.70.x of Spree Commerce... For previous versions please refer to these instructions.

We'll be using Bundler and Rails 3.1, so make sure you've got those installed before moving on...

First create a new rails project:

rails new my_spree_site

@citrus
citrus / Dev Engine
Created March 11, 2011 08:04
A rails engine that reloads the lib/dev folder on each development request. Useful for developing gems.
module DevEngine
class Engine < Rails::Engine
def self.activate
Dir.glob(File.join(File.dirname(__FILE__), "dev/**/*.rb")) do |c|
print "loading #{c}... "
Rails.env.production? ? require(c) : load(c)
puts "done."
end
NameError in Admin/products#index
Showing /usr/local/lib/ruby/gems/1.9.1/gems/spree_core-0.40.2/app/views/admin/products/index.html.erb where line #37 raised:
undefined local variable or method `to_ary' for #<Product:0x0000010551d460>
Extracted source (around line #37):
34: <% end %>
35: <td class="actions">
36: <%= hook :admin_products_index_row_actions, locals do %>