Hi im just new in studying rails, my prob is that i've installed the latest rails 2.01. My problem is that most of the Books available which i've bought uses lower version of rails. which at the start i cant pass the chapter 1 of the book lol...so i need to downgrade my rails version. thx more power
specify the version you want to install sudo gem install rails -v 1.2.3 1.2.3 being the version you want
Just follow the screencasts at rubyplus.org I cover rails 2.0
Actually the latest 1.2.x version is 1.2.6 which would probably work as well.
The above gets you halfway there. Let's say you did want 1.2.3
sudo gem install rails -v 1.2.3
will ensure that you have that version installed, however you still have 2.0.x installed as well.
There are two options, one is to uninstall the 2.0.x version, the other is to specify the version when you generate your rails app
rails _1.2.3_ myapp
This is a standard feature of gem binaries, using a gem version number bracketed with underscores will cause the binary to look for and load that version of the gem.
Rick Denatale wrote:
Ceros Ceros wrote:
i need an opinion on you guys.. do you think i should learn ver 1.2.x 1st b4 i learning ver 2.0.x?? if you guys are in my position which dont have any background in ruby and rails?what would you do?thx
Since all the books I have are for versions below 2.0.x, I'm going to study what I can, then learn the changes as needed with new projects. It's all MVC anyway, so it has to follow. Some may say it's wrong, but there's likely production code out there that can't just update overnight, so having a better understanding will (hopefully) make me more useful.
any pitfalls to this please comment!
thx
No real pitfalls, but I cannot think of any 'show stoppers' that would prevent you from using texts based on 1.2.x with Rails 2.x The only standout would be that the "scaffold" command no longer works (you *can* script/generate scaffold, just not use scaffold in a controller). That's not really a big deal, though, because you were never meant to use that in production and the point of the tutorials would be to move you out of scaffolding and into customized views.
Not really really the same thing though. in Rails 2.0.x script/generate scaffold will generate a restful controller, model, etc.
The pre 2.0 tutorial examples I'm aware of don't use restful design so the generated code wlll confuse someone trying to learn Rails.
For someone who wants to learn from a book, say AWDWR, I'd still recommend using Rails 1.2.3 rather than 2.0, and then move to 2.0 after getting some basic Rails knowledge, at which time I'd recommend "The Rails Way."
I agree that there is a difference but it's not a "show stopper" as I said.