views:

80

answers:

2

Hello I am new to Rails. I am learning rails 2.3.5 and checked Rails 3. I found some features added in Rails 3. That's perfectly fine. But I found something different. in 2.3.5 we use

  ruby script/server

to start the server and in Rails 3 we use

  rails server

and there are some other changes like this. What's the improvement by doing this?

What's the basic difference between this? Can anybody give me a list of these changes and explanations for doing this?

+2  A: 

It's cleaner. To use a single executable for the Rails framework is much more DRY than using tons of scripts in the script folder that are always the exact same thing.

Also, it's fewer keystrokes. Who can complain about that? :)

As far as a list goes, anything you once used script for is now under the rails binary. You can run rails help in a Rails 3 project to see a list of possible arguments.

Matchu
Does `ruby script/server` still work? If so then this is a good thing. If not then breaking changes for the lose.
Earlz
@Earlz: `ruby script/server` no longer works. It's not "for the lose". This is a new platform, not an extension of Rails 1.x, and as such, they are creating new conventions.
Mike Trpcic
@Earlz - Rails 3 is a brand new system with brand new syntax. It is well-known that it is not compatible with Rails 2, and, though certain things have just been deprecated instead of removed entirely, backwards-compatibility is not the goal here - especially since, generally, only a human being ever calls `script/server`, or anything else in `script/`, anyway.
Matchu
A: 

Well, for starters, if you're new to Rails, by all means stick to 2.3 for a while. Rails 3.0 is still in beta, and the documentation and articles you'll find mostly cover 2.3.

That said, the release notes cover all the changes briefly, and links to articles explaining the gory details. Don't be surprised if some it overwhelms you though, you'll need a good understanding of all the Rails concepts to follow along.

Shtééf