small medium large xlarge

Generic-user-small
12 Aug 2008, 16:13
Randy Carr (2 posts)

I’m using InstantRails 2.0 on Windows XP. I’m using defaults for database (SQLite3, I’m assuming).

  1. On p. 75, when I run the command

depot>ruby script/generate scaffold product title:string description:text image_url:string

I get a file “001_create_products.rb”. The book indicates this file will have a UTC-based timestamp prefix. Is what I’m getting ok?

  1. p.75, the “rake db:migrate” command seems to work, but when I run the command on p. 76:

sqlite3 db/development.sqlite3 “select version from schema_migrations”

I get an error that there is no schema_migrations table. Poking around, there is a schema_info table with a version of “1”.

So, have I missed something? I’d kinda like to make sure things are good before I go much further.

Thanks!

Samr_small_pragsmall
12 Aug 2008, 17:45
Sam Ruby (634 posts)

InstantRails 2.0 comes with Rails 2.0.2. This book is based on 2.1. The schema_migrations table was introduced in Rails 2.1.

You can verify the rails version with the following command:

rails -v

Type the following commands to upgrade your installation of Rails:

gem update --system
gem update rails -y

Even after installing a new version of Rails, your existing depot application will continue to use the old version. As I sense that you haven’t gotten very far just yet and would prefer to stay with a predictable tried-and-true path, I would suggest simply deleting the current depot directory and starting over. Note: that’s not necessary, one could simply chose to update the RAILS_GEM_VERSION line in the config/environment.rb file and proceed on.

Generic-user-small
12 Aug 2008, 19:05
Randy Carr (2 posts)

Thank you very much.

I did have to poke around and find the “-p proxyinfo” command line option for the gem command since I’m behind a firewall, but I got those commands to work. I now have Rails 2.1.0.

You do sense my progress correctly - I’ll just restart the depot app.

Vh_avator_pragsmall
28 Aug 2008, 22:22
Igor (2 posts)

I have the same problem ( But when I write

gem update rails -y

I have updated version of rails (rails -v = rails 2.1)… But if try any command I get an error

D:\rails\rails_apps>rails D:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:578:in report_activate_error': RubyGem version error: activesupport(2.0.2 not = 2.1.0) (Gem::LoadError) from D:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:134:in activate’ from D:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:158:in activate' from D:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:157:in each’ from D:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:157:in activate' from D:/rails/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:49:in gem’ from D:/rails/ruby/bin/rails:18

D:\rails\rails_apps>

What could be the problem?

P.S. Sorry for bad english

Dscn5781_pragsmall
29 Aug 2008, 14:07
Michael Mattingly (14 posts)
depot>ruby script/generate scaffold product title:string description:text image_url:string

</code> Also make sure that you don’t use this slash that separates the lines if you’re on Windows. I overlooked this message in the book and spent about 30 minutes trying to figure out what I did wrong, lol.

Vh_avator_pragsmall
29 Aug 2008, 14:50
Igor (2 posts)

ha ha )

You must be logged in to comment