开发者

Why rails platform developers are changing the syntax?

开发者 https://www.devze.com 2023-01-02 09:18 出处:网络
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.

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?

W开发者_开发技巧hat's the basic difference between this? Can anybody give me a list of these changes and explanations for doing this?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号