Mar 8, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / Depot with Rails 2.0.2

@ Steven Richard Price
It’s not poor effort to say roll back to 1.2.3. When you write a book about a programing language, you can only refer to the version at that time. You can’t foretell any changes ahead.

So, to help you out, what version of rails are you running?

 
Feb 5, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / The Depot Application

@ Wiley
Check my post (scroll down) in this topic:
http://forums.pragprog.com/forums/22/topics/184

 
Feb 2, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / Add Data with add_test_data

I figured it out thanks to a friend. The issue was the migrate version of the program. If RonR thinks, that you’re up to date, it does nothing.
So I just have to downgrade the migration version by one and migrate again.
bulletproof version:


rake db:mirgrate VERSION=0
rake db:migrate

 
Jan 18, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / Add Data with add_test_data

I have a huge problem loading data in the database. I downloaded the file
add_test_data.rb from the code section, and created the file in my depot folder using

ruby script/generate migration add_test_data

After that I copied the content of the downloaded add_test_data into my newly created one.
Everything is mentioned as in the book.
After pasting everyting into 003_add_test_data I type

rake db:migrate

to load the data in the database. Nothing happens. I just get a normal
(in /Users/Simon/work/depot)

following by the prompt.
I have no problem writing data via the browser to my database. So, what am I doing wrong here?

P.S. I am using rails 1.2.6

 
Jan 18, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / I am new

Try to mess up first :) best way to get started.

 
Jan 18, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / error msg in depot lab create

You’re in the same boat as me. I wouldn’t use rails 2.0.2. Try reroll your rails version to 1.2.6 or 1.2.5

To do so, type:

sudo gem uninstall --version=2.0.2 rails

After that, check your railsversion with
rails -v

After downgrading your rails, delete your depot folder and start fresh from scratch.

 
Jan 18, 2008
Thm_0888_small Simon Krollp... 7 posts

Topic: Agile Web Development with Rails / Depot with Rails 2.0.2

I would strongly recommend to downgrade the rails version to 1.2.6.

To check the current version(as mentioned above) use
$ rails -v
to downgrade/deinstall rails 2.0.2 use
$ sudo gem uninstall—version=2.0.2 rails

check with rails -v if your current verion is 1.2.6 and not 2.0.2

Nevertheless, I have a small problem with the display of the price. Following the book, my /views/store/index.html looks like:


<% for product in @products -%>
    <div class="entry">
        <%= image_tag(product.image_url) %>
        <h3><%= h(product.title) %></h3>
        <%= product.description %>
        <span class="price"><%= product.price %></span>
    </div>
<% end %>

The Problem here is, that the price is in the same line as the description. Okay, besides fixing that with an ugly
, is there any other way?

7 posts