small medium large xlarge

04 Sep 2011, 16:31
Alex Hartley (3 posts)


I’ve just noticed that the link on p71, footer 3, links to a different version of the seeds.rb file whereby all the image links have /image/ infront of them (the link above the code snippet is the correct one). Now that I’ve sussed that out, I’ve tried to update the seed file but every-time I use the rake db:seed command it gives an error of:

rake aborted! /Users/alex/Dropbox/Code/depotnew/db/seeds.rb:15: invalid multibyte char (US-ASCII) /Users/alex/Dropbox/Code/depotnew/db/seeds.rb:14: invalid multibyte char (US-ASCII) /Users/alex/Dropbox/Code/depotnew/db/seeds.rb:14: syntax error, unexpected $end, expecting ‘)’ …It provides all of JavaScript’s … ^

Tasks: TOP => db:seed

Anybody any ideas as to what’s wrong?


04 Sep 2011, 17:05
Alex Hartley (3 posts)

Ok, I took all the comments at the top of the seeds file (but left # encoding: uft-8 in) and it now seeds. Problem I have is still with the images.

Leaving the image folder path off still doesn’t seem to be working for me. Looking at inspector, the images without it have the path of localhost:3000/assests/filename.jpg and the ones with it have the path of localhost:3000/images/filename.jpg. Neither of which seem to show the images.

04 Sep 2011, 17:16
Alex Hartley (3 posts)

It works now. I’d just dragged the images out of chrome into the local folder and it’d changed all the names from .jpg to .jpeg. Doh!

So just ‘filename.jpg’ works.

06 Sep 2011, 20:30
Joao Alberto Vortmann (2 posts)

I had the same problem: db/seeds.rb:13: syntax error, unexpected $end, expecting ‘)’ I fixed changing the quote in Javascript’s to a single quote, just like the one you put around strings.

to ` ‘ `

You must be logged in to comment