small medium large xlarge

Generic-user-small
02 Nov 2011, 11:30
Dean O'Gorman (1 post)

Hi. I have the paperback version of the 4th edition and am working through the Depot example site. It looks like I have had the same problems as a lot of other people - at around page 90 it doesn’t work because of the version of Rails that I’m using (3.1). I’m going to download the 1.3 version of Railsinstaller which has the 3.07 version of Rails so hopefully it will work then.

The thing is that I’d like to see the project that I am working towards so I downloaded the source code. But, how do I get this to work? I can see loads of directories such as depot_a, depot_b, etc. which all appear to have the constructs inside them. I’ve copied some of them into my Sites directory, ran bundle install and attempetd to view them by running rails s but it dows not work.

Is there any instructions on how to do this (and what all the projects are for)? Maybe I missed it but there was no information within the rails4-code.zip archive.

Thanks :)

Generic-user-small
12 Dec 2011, 19:17
James O'Driscoll (1 post)

Hi Dean.

I seem to have the same problem as you. Did you get the downloaded source code going in the end?

James.

Generic-user-small
13 Dec 2011, 12:48
Patrick D (1 post)

Yeah I am having the exact same problem any one know whats up with the source code?

Patrick

Generic-user-small
14 Dec 2011, 15:15
Ellie @ Support (19 posts)

I asked the author, and Sam says the following:

Short answer: The customer needs to run the command ‘rake db:migrate’, followed by the command ‘rake db:seed’.

Longer answer: the database is not included in the source code. What the source code contains is the instructions on how to create the database, and what to put in it. That code needs to be run. Specifically:

http://media.pragprog.com/titles/rails4/code/rails31/depot_v/db/migrate/20110711000002_create_carts.rb http://media.pragprog.com/titles/rails4/code/rails31/depot_v/db/seeds.rb

You must be logged in to comment