I am a total newbie to Rails and Ruby. I have the Agile Web D. with Rails book and am following through the first few chapters. I got to the "Creating you own Rails API Documentation" and followed the following steps. rails dummy_app cd dummy_app Then when I run the "rake rails:freeze:gems" command I get the following error. No rails gem 3.0.5.001 is installed. Do 'gem list rails' to see what you have available. I run this and get *** LOCAL GEMS *** rails (1.2.3) Web-application framework with template engine, control flow-layer, and ORM. I have tried a manual install of ruby and rails as well as using InstantRails with the same results. I have absolutely no clue what I am doing wrong or what could be wrong with my setup. Help please! Thanks
on 2007-07-09 15:28
on 2007-07-09 16:23
So you've got rails installed (same version as me in fact, though I'm on linux). cd to your dummy_app and run rake -T to see what tasks are available. Is 'rails:freeze:gems' listed?
on 2007-07-09 16:32
Stephan D. wrote: > So you've got rails installed (same version as me in fact, though I'm on > linux). cd to your dummy_app and run rake -T to see what tasks are > available. Is 'rails:freeze:gems' listed? Sorry, ignore that, it's a stupid question to ask - of course it's available! Looks like rake thinks your version of rails is 3.0.5.001, which I believe it gets from the VERSION environment variable. - Do you recognise the 3.0.5.001 version number? - What version is returned when you run 'rails --version'?
on 2007-07-09 16:34
Yup it is listed. In the list it comes up as rake rails:freeze:gems # Lock this application to the current gems (by unpacking them into vendor/rails) Thanks for replying :)
on 2007-07-09 16:37
I don't recognise the 3.0.5.001 version at all, that is one of the things I find very confusing. Actually I just check the setting for VERSION and it is in fact 3.0.5.001. rails --version returns 1.2.3. I will change the environment variable to 1.2.3 and see how that goes. Not sure how it got set to that in the first place?
on 2007-07-09 16:42
Fantastic! I changed the VERSION variable to 1.2.3 and it worked straight away. I have no clue where 3.0.5.001 came from. Thanks for the help!
on 2007-07-09 16:54
Very Confused wrote: > Fantastic! I changed the VERSION variable to 1.2.3 and it worked > straight away. I have no clue where 3.0.5.001 came from. Thanks for the > help! Glad it worked, though I'm afraid I've no idea where it came from either! I'd guess hoe or cygwin.
on 2007-07-09 16:58
Ahhhh, yes cygwin. That would be it. That didn't even cross my mind cause I don't check versions on it very often.
on 2007-07-11 04:54
As an side I was also having some problems with db:migrate after I go this working. It would refuse to migrate past version 2 unless I specified VERSION=x. I found that if I cleared the VERSION environment variable all together it solved the problem. Is this variable meant to be set as a part of the ruby/rails installation or is it optional to control something else? Seems to me a bit non-specific in naming especially due to the clash with other apps e.g. cygwin (which also should use some other variable). Perhaps a change to RUBY_VERSION would be more suitable? Anyway just wanted to post that the solution to my original problem was the VERSION variable and it also caused the problem with db:migrate as well.
on 2007-07-11 12:34
I don't think it's anything to do with Ruby / Rails - at least I've not got VERSION set on my system and all docs I've seen mention vars with a RAILS_ or GEM_ prefix. If you do a google search for 3.0.5.001, you see it mentioned alongside products like cygwin, hoe, HP software update, DeLPSguard, etc. If you've got any of those installed, check the version number and if it matches you've got your culprit.
on 2007-07-14 00:57
Hey folks, I have a different problem with Rake I'd like to ask about. In my regular Ruby setup (on a Mac using MacPorts into the /opt/local directory), I can't run either "rake rails:freeze:gems" or "gem_server" without getting an error. It's missing a file that is nowhere on my hard drive. Here's the log: /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- sources (LoadError) from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require' from /opt/local/lib/ruby/gems/1.8/gems/rubygems-update-0.9.4/lib/rubygems/source_info_cache.rb:6 BUT when I run either of these within Locomotive, they work fine. So for the moment, Iâ€™m all right, because I can get at this documentation. But does anyone know what's going on? ---Jim Gagne---