简体   繁体   中英

Rails 2 vs. Rails 3

DHH recently stated that Rails3 is about to be in RC mode.

This announcement ironically coincides with me and a friend of mine starting a Rails application. At this point in the game, we were going to just go ahead and be early adopters of 3. However, as we're both fairly inexperienced in creating large web apps with Rails, 2 seems like the more frugal choice. More third party applications support 2 and I have no clue how long it will take for the community to fully catch up.

That being said, we also plan to convert the app to Rails 3 in the future. How much of a pain will this be? I've heard that the Rails team has tried to make it as painless as possible, but that doesn't give any specifics. Also, would we be at risk of learning anything the wrong way?

Given our experience and concerns, could someone out there please give us some advice?

If you are starting a new project, Rails 3 is definitely the way to go - there is no point incurring the overhead of conversion when you can simply sidestep the issue.

The earlier Rails 3 betas were actually rock-solid and I have been using them since release. There are some issues with Gems and plugins, but this will resolve quickly now we have an RC.

Hearing from someone who converted from Rails 1 -> 2, it wasn't too hard. Just wait for someone to release a conversion guide that explains what needs to be done.

I would agree with sticking to 2 for now, if you don't want to take risks. Rails 3 will have less supported plugins/gems, as well as less documentation and bugfixes, when it is first released, although the new features may be worth it to you.

I just upgraded an app from rails2 to rails3, and while I would say that right now it's more difficult than it should be, in the future I imagine it will be much easier.

Right now not everyone has updated gems/plugins for rails3, so if you have any external dependencies, be prepared to modify anything that's mission-critical to get it rails3 ready. Though if you start with rails3, you'll figure out these incompatibilities from the get-go.

http://omgbloglol.com/post/353978923/the-path-to-rails-3-approaching-the-upgrade

This is an excellent overview of what you'll need to change when you upgrade. Also, you'll likely get a ton of deprecation warnings which you'll need to fix one-by-one, a task which although time consuming is not very difficult.

If you are new with rails, I definitively advice you to start with Rails3.

Indeed, there are a fewer plugins/gems but a lot of them are supported with rails 3 now.

Rails 3 is now pretty stable. Still remain some bug, especially with ruby 1.9(when I tried with beta 3).

In my company, we are running some commercial apps on Rails 3 and everything is fine. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM