small medium large xlarge

Generic-user-small
27 Aug 2010, 08:47
Ika Bar-Menachem (1 post)

Hello forum,

I have two questions.

  1. What is the simplest way to take a one of the code examples (depot_x) and start working from that code sample.

I tried to just take the entire directory but I had problems with the db migrations.

Then I tried to take everything but the db migration and just take the DB files and put them in my own files (I though that the date might in the filename might cause the problems. but still when I run test i get errors like

6) Error: test_should_get_edit(ProductsControllerTest): ActionView::Template::Error: undefined method model_name' for NilClass:Class app/views/layouts/application.html.erb:21:in app_views_layouts_application_html_erb__1058814961__617652808_0’ /test/functional/products_controller_test.rb:48:in `test_should_get_edit’

7) Error: test_should_get_index(ProductsControllerTest): ActionView::Template::Error: undefined method model_name' for NilClass:Class app/views/layouts/application.html.erb:21:in app_views_layouts_application_html_erb__1058814961__617652808_0’ app/controllers/products_controller.rb:15:in index' /test/functional/products_controller_test.rb:24:in test_should_get_index’

I saw there is a separate thread about this issue but I there is no straight answer on how to solve this except for starting the book from the begging.

  1. How do you bring rails to scratch if you do want to start from the begging? Is deleting the project enough?

Thanks,

Ika.

Samr_small_pragsmall
27 Aug 2010, 15:45
Sam Ruby (634 posts)
  1. I don’t know if that will work, but I am willing to work through the issues with you. For starters, I seriously doubt that the provided Gemfile.lock file will work for you unless you have a recent version of Rails checked out to the path /home/rubys/git/rails. There isn’t a depot_x, so let me know what version of depot you actually are trying. And then let me know what actual problem you are seeing, starting with rake db:migrate. If I remove Bundle.lock, then run bundle install I can then run rake db:migrate cleanly on my machine starting with depot_r.

  2. Yes

You must be logged in to comment