Skip to content

May 28 / Rupak Ganguly

Error in Spree rake db:bootstrap issue – stack level too deep

I have been working on some Spree based ecommerce stores lately, and I ran into this issue while creating a new Spree project. I had bumped into this a while back but did not write about it then. But, now I have decided to pen it down.

The steps to creating a new Spree project is very simple. Assuming that you have Ruby and Rails both installed, you can simply do:

$ gem install spree

$ spree mystore

$ cd mystore

$ rake db:bootstrap

$ script/server

And, voila you should have a shiny Spree store.

But, I have bumped into an issue at the step $ rake db:bootstrap as shown below:

$ rake db:bootstrap
(in c:/RoRProjs/wixspree)
rake aborted!
stack level too deep
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2390:in `raw_load_rakefile'
(See full trace by running task with --trace)

After a little digging, I found out that Spree has a dependency on the ‘jeweler’ gem which in turn has some kind of dependency on Git.

So, although it seems like a weird solution but just by initializing a git repository on your Spree project folder i.e. mystore in my example, you will be happy to see that the problem is resolved.

So, to recap, in the above steps to create your new Spree project, add a new step before the rake step:

$ git init

$ rake db:bootstrap

You should be golden by now. Hope it helps.

Note: I am running Spree 0.9.4 on Windows Vista and Rails 2.3.5 and Ruby 1.8.6 (ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32])

Note: If you do not have Git installed, you might want to do that. Here are some excellent articles which show how to do it:

Leave a Comment