Some background info: I am an OS X user, and my MAC system is OS X 10.6.8(snow leopard).
@1st problem (regarding Ruby on Rails installation): I have installed ruby "1.9.2" with RVM. When I typed "ruby -v" command in terminal after installation, it says that the ruby version I have is "1.8.7". Strange, isn't it? So, I have tried "rvm use 1.9.2" command, but it still says my ruby version is 1.8.7. I even re- installed ruby 1.9.2 using RVM a few more times, but no luck. when I typed "rvm list", it says "ruby-1.9.2-p290". Does that mean my rvm did install ruby 1.9.2, but for some reason, i cannot get my RVM switch to ruby 1.9.2 from ruby 1.8.7? what can i do to use ruby 1.9.2??
By the way, when I typed "rvm info", and it says "ruby-1.9.2-p290" and then all the other stuff explaning. Does that mean that my rvm already has switched ruby to 1.9.2??? But, then, why "ruby -v" keeps saying ""ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]"???
It seems like OS X 10.6.8 already comes with Ruby 1.8.7, and should it be the reason behind this problem?
Without being able to solve the problem above, I have continued Ruby on Rails journey (have well installed rails 3.0.9 along with all the others: rubygem, git, etc), and landed on the second problem.
@2nd problem (regarding lesson2: demo app): With my attempt to make a demo app, I typed "rails generate scaffold User name:string email:string" command in terminal to generata resources. And, I have typed "rake db:migrate" to build Ruby. Then, I got an error stating: "/Users/taek/.rvm/rubies/ruby-1.9.2-p290/lib/ ruby/site_ruby/1.9.1/rubygems.rb:314:in `bin_path': can't find gem rake ([">= 0"]) with executable rake (Gem::GemNotFoundException) from /Users/taek/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'"
When I googled, some posts suggested to delete rake.gemspec(in "/Users/ taek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/specifications" folder). Their point was that Ruby 1.9.2 comes with a version of rake internally, so it has a problem finding it because of the rake.gemspep file in "/Users/taek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/1.9.1/ specifications" folder. However, I was not able to locate that file in my system ("/Users/taek/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/gems/ 1.9.1/specifications" folder), so I deleted "rake-0.8.7.gemspec"(which seems to be the same file as rake.gemspec) file instead. But, that did not solve the porblem. Instead, it gave me another error, which is LoadError. So, I restored "rake-0.8.7.gemspec" file in the folder(since i made a back-up copy before deleting it). What can I do to fix this problem? Would this problem related to the first problem (that Ruby 1.8.7 is not installed in my system)?
Can anyone please help me?
Thank you in advance!
Taek