small medium large xlarge

30 Sep 2008, 02:48
Doug Casebolt (2 posts)

I have two of your books the “How to Program” and AWDwR and love them both.

Coming from a self taught VBA environment Ruby appears to be a dream come true.

I have installed Instant Rails on my WindowsXP 32bit platform and have been sucessfully following along in the book. That is until I tried the code listed at the top of page 77.

When I enter in ruby script/generate scaffold product > title:string description:text image_url:string

I receive the following error:

Gem::SourceIndex#search support for Regexp patterns is deprecated C:/rubyonrails/ruby/lib/ruby/gems/1.8/gems/rails-2.1.1/lib/rails_generator/looku p.rb:211:in `each’ is outdated

I ran the update methods for both rails and ruby before I started the projects in the book.

What have I done wrong or is this an error in the beta of the book? I am guessing it’s something to due with my skills.

Thanks for the help!

30 Sep 2008, 14:17
Sam Ruby (633 posts)

While I don’t see how this can produce the error you are getting, the first thing I notice is that the greater than sign is means to be the prompt on the next line, and not something you enter. Try entering the command all on one line without the greater than sign.

30 Sep 2008, 19:56
Brent Nordquist (4 posts)

Timely post. On my Mac (Leopard) I got all the way through the Depot application with no problems, but then updated some stuff with “gem”, and now I get the following (on a newly-created application). (I don’t have the “>”.)

$ ruby script/generate scaffold author name:string bio:text Gem::SourceIndex#search support for Regexp patterns is deprecated /Library/Ruby/Gems/1.8/gems/rails-2.1.1/lib/rails_generator/lookup.rb:211:in `each’ is outdated

$ ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

$ gem –version 1.3.0

$ gem list –local […] rails (2.1.1, 1.2.6, 1.2.3) rake (0.8.3, 0.7.3) sqlite3-ruby (1.2.4, 1.2.1) […]

30 Sep 2008, 23:37
Sam Ruby (633 posts)

Looks like a “change in gem 1.3.0”:

I’ve verified that this is not fixed on Rails edge.

“Others are reporting this too”:

01 Oct 2008, 02:25
Doug Casebolt (2 posts)

Thank you, I was speeding through to fast and missed the explanation of the command in the text of your book. I deleted the depot directory and started over without the > and this time all I received was the “deprecated” warning. Albeit by accident but glad to have it not be all my doing.

Thank you again for repsonding!

07 Oct 2008, 17:16
jlvall (1 post)

Hi there! I’m hitting the same issue… but I don’t know how to:

“deleted the depot directory and started over without the > “

Here you have my configuration:

$ ruby -v ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

$ gem—version 1.3.0

$ gem list—local rake (0.8.3, 0.7.3) ruby-openid (1.1.4) ruby-yadis (0.3.4) rubygems-update (1.3.0) rubynode (0.1.3) sqlite3-ruby (1.2.1)

Thanks a million!

08 Oct 2008, 13:14
James West (104 posts)

I would just delete the folder and it’s contents then start again. create a new app then scaffold the products

You must be logged in to comment