Should I use Rails 3 or Rails 2.3.8 - ruby-on-rails

I heard Rails 3 is almost ready to be released from beta, meaning its a stable version. But of course the real date still unknown.
So I'm looking for advice from a good RoR developer. Do you think I should learn and use Rails 3 RC version or use Rails 2.3.8? If I use the RC version now will it be hard to upgrade to the stable Rails 3 version?
Is there a decent RoR developer out there than can offer some guidance?
Thanks.

I don't know what a rock developer (!) is, but I'd recommend going with Rails 3 rather than Rails 2.x. Rails 3 represents the future direction of Ruby on Rails, so it's worth getting up to speed with it as soon as you can. To be frank, Rails 2.x is now an evolutionary dead-end. There shouldn't be any significant changes between the Rails 3 Release Candidate and the final version.
The barriers to adopting Rails 3 you might encounter are:
its availability on your production stack
plugin/gem compatibility
For the first issue, I know that the popular Heroku for example are tracking the Rails 3 beta releases pretty closely. Regarding the second issue, not all plugins or gems are compatible at the moment, but a lot of the most popular ones are. If there are specific plugins or gems that you need to use then check here.

If you need to get a project off the ground now, then by all means go with Rails 2.3.8. It's the safe choice.
There are some significant changes in Rails 3. Some tools will be available to help you upgrade. But no automated tool will ever completely convert your 2.3.8 application to Rails 3. It's hard to tell how much effort is involved, that really depends on your application.
That said, if you are new, learning, and not expecting to release anything for several months, Rails 3 is the right choice. By the time your grok Rails and have something in production, Rails 3 will likely have stabilized, and nobody will be looking back.

Use rails 3!! The RC is still in the pipeline, but it's more or less good to go and you won't need to make any code changes when the final release is made
Here are some reasonable resources to get you started with it
http://railscasts.com
http://www.railsdispatch.com/
http://www.teachmetocode.com/
http://rubyonrails.org/screencasts/rails3/

Related

I'm running a Rails 2.3.4 app and am wondering if i should upgrade to 3.0?

i am developing a app and have been for a while using Rails 2.3.4
but I'm wondering if i should try to update, or keep waiting, never upgrade, i suppose I have a couple options.
I am using ruby 1.8.7 would i need to upgrade that too huh?
how difficult would this be/ how much code would this break, would i have lots of unexpected results?
any input would be appreciated, I'm somewhat lost.
It largely depends on your constraints. If you plan on keeping the site up and running, and it has significant importance to you and/or your client, then staying on the Rails "golden path" is worth it. In general, upgrading Rails 2 to Rails 3 is relatively easy.
You may want to check to see if your plugins / gems are Rails 3 compatible at http://www.railsplugins.org/.
In terms of learning curve, you'll want to get familiar with bundler.
You can stick with Ruby 1.8.7.
Now, if you want to embrace all the advantages of Rails 3, that will take a little more time (refactoring) but it shouldn't stop you from upgrading.
For more information you might take a look at: http://www.railsupgradehandbook.com/

Should I use Rails 2.2 vs Rails 3 for learning?

Frustratingly my laptop has Rails 3 on it, although I cannot find much supporting documentation on how to use Rails 3, excepting the API reference.
There appears to be a significant amount about regarding rails 2.2. Would you recommend downgrading and learning 2.2 or just plough ahead with 3 and hope for the best?
Highly recommend continue with Rails3. No new apps out there are going to be created with Rails 2.3 -- as gems and engines are created and updated, your 2.3 app will get out of date.
The documentation is still coming for Rails3 out on the blogosphere, but searching for "Rails3 where conditions" gives good rails3 results.
If you're willing to buy documentation, Agile Web Development with Rails (4th edition) was quite excellent in its first edition, and was how I learned. Its 4th version covers rails 3.
If you don't have any experience yet, you'd better start with the latest version. As for no documentation, how about Rails Guides? I think that's pretty awesome.
If you really are stuck with Rails 3, at least use Rails 2.3.x instead of 2.2.
Rails tends to move pretty fast, so it hard for the documentation to keep up. This is a known problem though, and http://railstutorial.org/ was made to be a comprehensive tutorial that will be maintained by the rails evangelism team. (you can buy the book/screencast, or just go to the "book" link on the menubar, it is freely available there)
Rails 3 was a great release, I would recommend sticking with it if at all possible.
As captaintokyo and Jesse Wolgamott I strongly encourage you to use Rails3. Another great ressource to learn about Rails3 is http://railstutorial.org/ .
I agree, start learning on Rails 3. Everything is moving that way quickly.
If you knew you were going to be working on rails 2.* applications (you were starting a new job next month and they had rails 2 apps already installed and were not upgrading them this year) is the only reason I would give to start with 2.*.

Rails 2.3.4 Vs Rails 3 + Book - Beginner in RoR

I have started with Ruby and Rails development and I am a Java developer from the last 2 years (student). I am in for two things:
Learn Ruby
Make my website on ROR
I have Agile Web Development with Rails, 2nd Edition.
So, here are my questions:
How is the Agile Web Development with Rails book to start with, where I don't know anything about Ruby and proficient with Java.
What is the difference between 2nd and 3rd edition? People say the changes are irrelevant for a starter, how far is that statement correct?
Should I start with Rails 2.3.4 or Rails 3 (around the corner)? Rails3 It Is!
The Agile book is good, but the 2nd edition is for Rails 1.2 - which is quite old now! You could buy the 3rd edition (which is for Rails 2), but with Rails 3 coming out soon that'll probably also be outdated soon.
My recommendation is the website: http://www.railstutorial.org/book
It's a really well written online book called 'Learning Rails by Example', it gives a thorough introduction to Rails (using the latest Rails 2.3.8). Two of my colleagues have used it recently to get into Rails.
As someone who went on the same path, from java to rails, recently, I'll give my two cents.
Start with whatever version you have book/tutorial/guide for. (assuming it's good book/tutorial/guide, of course) Unfortunately, backwards compatibility is a big problem for rails and I often saw that code examples created just 2-3 years ago need significant fixes to become workable now. And fixing them especially difficult if you're a greenhorn.
As for "Rails 3 is cooler" argument, you could skip it as well and wait for Rails 5. IMHO, if you're doing a website for fun/to learn, both second and third versions will give you basic understanding of the platform and language. And once you know it, 'upgrading' your knowledge to the next version is much simpler than learning it anew.
Good luck with your quest, you'll need a lot of it :)
I don't have the Agile Book, but I can answer question 3.
Firstly, I have no idea why you would start with 2.3.4 when theres 2.3.8 out already.
Secondly, I would might do a little testing and mess around a bit with 2.3.8, but not start anything big and wait for Rails 3. This is because Rails 3 is largely different but better and you will probably want to upgrade an application once it comes out. Hence, it would be smart to wait for Rails 3 to be released before starting any large projects so that you don't have to go through the trouble of upgrading.
As a bit of note on question 1, I have done fine learning without the Agile Book, but there are probably some thing I could pick up better with that book rather than looking things up on Google and the RDoc.

Rails development with v3 merb merger in mind

I'm in the preliminary stages of designing a new web application, and have yet to begin any sort of implementation. The application models a fairly complex domain, and I'd feel more comfortable using tools such as the ruby DataMapper ORM (having using NHibernate in the .net world) than Rails Active Record. I also prefer jquery over prototype. All of these considerations of course point to using Merb, yet I'm aware that Merb is being merged into Rails for version 3 and will no longer exist as a distinct framework.
Is there any sense in starting work on the implementation of the application now given the fairly profound changes coming to rails? I'd really like to know if it would be worth starting development in Merb now and then porting it to Rails, but I've yet to find anything suggesting how difficult this may be. Another approach would be to start work on the domain now in Rails, and only give consideration to the ORM and frontend once v3 is released.
In essence, I'd like to know how portable a Merb app is going to be to Rails 3, but am aware that it may be too early for anyone other than the core developers to know this.
Any thoughts would be greatly appreciated. Thanks :)
-------------- Edit ---------------
Yehuda Katz, lead developer of the Merb project has this to say on his blog:
The plan is to start working on Rails immediately, and to continue fixing bugs and resolving other major issues in Merb in the interim. We will also release versions of Merb specifically designed to help ease the transition to Rails 3.
In particular, we will do Merb releases with deprecation notices and other transitional mechanisms to assist developers in tracking down the changes that will come between Merb 1.x and Rails 3. Expect a number of interim releases that get incrementally closer to Rails 3, and expect parts of Merb (most notably the helpers) to be ported to run on Rails 3 in order to further reduce friction.
To be perfectly clear: we are not abandoning the Merb project. There are many production applications running on Merb that are relying on both timely bug fixes and a clear path to the future. If you’re using Merb today, continue using Merb. If you’re considering using Merb for a project because it works better for your needs, use Merb. You will not be left in the cold and we’re going to do everything to make sure that your applications don’t get stuck in the past.
If you’ve already learned Merb, we will be working hard to make sure that you can parlay that knowledge into Rails 3. At Engine Yard, we fully intend to continue using Merb for our internal apps until Rails 3 is out, but we will be using those (non-trivial) applications to be sure the experience is smooth for everyone. There will be no huge jumps and you will not need to rewrite your application from scratch.
It's never a good time to start a complex application on a framework, really. It seems like there's always a major upgrade coming up or some other competing framework that may be a better bet. If you're having more success with Merb, stick with that right now and develop your project without fear! Both the Rails and Merb communities are going to have to cope with the merging of the projects with the release of Rails 3, but that's going to be awhile.
The project merge doesn't mean that Merb will be going away, however. Yehuda Katz will stop being the lead developer, but someone will take over the project. At the minimum, you can expect security patches and bug fixes for a few years, as long as you follow the official Merb developers' repository. Likely, after the Rails 3 release, you'll find great walk-throughs on upgrading your Rails 2.x/Merb 1.x application to Rails 3.

When will you upgrade your app to Rails 3? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 11 years ago.
Now that the Rails 3 beta is here, let's take a little straw poll.
Please tell us briefly what your application does and when you will upgrade it to Rails 3. Or, if you're not planning on upgrading any time soon, tell us what's stopping you.
Honestly? When developers wake up and start work on Rails 3/Ruby 1.9 in their gems and plugins. They know it's been coming for several months now, and most haven't even bothered to upgrade. One in particular that I'd like to point out is authlogic, one of the most used authentication plugins out there. It still doesn't work for Rails 3.
Whoops!
I'm not planning to. I'm sure I'm in a very small minority, but my big application is still running 1.2.6. Each time I consider making the effort to upgrade it seems Rails changes again.
It does what I want it to do, makes good money, and despite feeling more and more left out in the cold I just don't have a sufficiently compelling reason to update it.
All my Rails apps are currently running under Rails 2.3.5 and every app has a LOC of 80% or greater. This has always been a key requirement for every product I create for myself or I manage at work.
Usually, upgrading to a minor/bugfix release is just a matter of a few minutes.
Change GEM version, upgrade requirements, run tests, fix issues and commit.
Rails 3.0 is a major rewrite and the biggest problem is represented by plugin compatibility.
Plugins are not under my direct control. This is the same reason why I had hard time trying to upgrade to Ruby 1.9.1.
However, I'm already playing with Rails 3. I want to learn the most important changes of Rails 3 as soon as possible in order to start moving the existing apps to the right directions. Moreover, as a plugin author, it's important to me to start working with Rails 3 in order to make my plugins compatible.
Yesterday I start with my most simple app. Well, at least this is what I was used to think about it. Anyway, it is the app with the lower number of external dependencies (less than 3 Gems) and it took about 1 hour to upgrade and 3 hour to figure out why Rails was failing to load my routes. It turned out, the Rails Metal component was fighting with the new Rails 3 stack.
There are some minor issues I have to figure out, but I can say I successfully migrated my first app to Rails 3.
I'm planning to migrate all my Rails apps to Rails 3 as soon as possible, once Rails 3 stable will be available. Or at least, as soon as I can figure out whether the dependencies actually work with Rails 3. Fortunately, a project has been started at http://railsplugins.org/ with the intent of listing all compatible/incompatible Rails plugins.
My remote environment is already compatible with Rails 3, I'm using Passenger with Ruby Enterprise Edition (1.8.7). The only blocking issue are plugins.
I guess it would take at least one month before having the major part of my Rails app ready for Rails 3 thought I won't probably start the upgrade until Rails 3 stable is out or I really need the new version for some blocking feature (ex. subdomain-based routing).
I'm not going to upgrade any apps to rails 3.
However, I just decided that all new projects will be rails3 going forward. The lack of plugin support isn't a big issue as I see it as an opportunity to decouple my apps from plugins so that I can swap them in and out as I please later.
I also suspect that the big plugins will upgrade very quickly as they won't want to be left in the dust.
Keep track of plugin status here.
I've been keeping my apps on the edge of 2.3, but since there's a lot of fundamental changes to Rails in 3, I'll probably install the beta, work on converting them over and hope to be ready by the time it's released as stable.
I'm also glad there's a lot of lead time before RailsConf so I can really get familiar with the new features of Rails 3 and won't feel lost/overwhelmed there.
I don't think I'll upgrade any of my applications. It would be a large amount of work compared to what I'd gain from it. Also in some cases the plugins/gems I used in my app are not compatible with Rails 3 so upgrading would be impossible or would require to fork the gems... too time consuming.
If I had to update, I'd probably wait a bit more for all the gems/plugins to be updated to Rails 3. Of course any new application I'll develop will be done using Rails 3.
I'll answer my own question.
I'm not sure how many betas there are going to be for Rails 3, but I'm going to hold off converting my blog application until the next beta or the final release. I think it's going to be quite a time-consuming process because I have a lot of view helpers that build markup, a lot of named scopes and some quite complicated routing.
I want to add page caching first before tackling Rails 3!
After trying out the beta and it not wanting to work with any commands, I have decided to wait until a new beta.
The ticket has already been opened for the issue.
After realising that I probably spend more time in Zend Framework and Doctrine getting code to work (fixing framework bugs, annoying language workarounds, and just plain pain), than actually coding features I decided that it's finally time to give RoR a go. Especially as RoR3 is now out with a bunch of documentation.
5 hours through and it's looking really promising. 1 hour of it was debugging though, some documentation on a plugin was not up to speed, but alas I'm there.
It's interesting, and does seem to be in a better direction. More time to code on features, and less time coding to debug.
So the app I'm converting is my premium CMS that is deployed in over 20 websites now, and powers my own balupton.com - so will be interesting, as the CMS is already a complete featured cms.

Resources