Now that Rails 3.0 beta has been released, should I spend time building my first Rails application on 2.3 or does it make more sense to use the beta?
I'd suggest sticking with the non-beta version (2.3). Chances are tutorials and/or webcasts you might use are for the older version. Go for version 3 only if it includes features you actually need that are not in 2.3.
If you plan on actually building something with Rails, go with version 2.3 because it's, well, not a beta (stable), and because most tutorials are geared towards the 2.x series.
If you're just going to mess with it, I say go with version 3 for two reasons: you'll be better prepared when it does come out, and you get to play with the new features. But if you're not going to do anything serious with it, it doesn't really matter which you pick, so it's your call.
I disagree with other answers. Rails 3 does a number of things differently than 2.3. You should learn right away the new way to code. It's not harder and you won't have time to re-learn in a few short weeks.
Rails 3 beta is stable enough. You will run into few problems.
Your learning. Use something that is stable. Rail 2.3.x is stable and 3.0 is not.
If you are strapped on a deadline for your app, use Rails 2.3.
But I encourage you to use Rails 3.0 as it'll teach you a lot about the framework works when you do encounter problems.
Related
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.*.
We are currently running rails 2.1.
My main motivation for the upgrade is the fear that gems/plugins will get rarer/unavailable/unsupported day by day for our version (,and the excitement of the latest technology).
I understand there are many-many improvements that come with rails3, but probably what my manager would want to listen is the advantages that he'd get, in terms of the business.
Ours is a Saas application, load on the app is not very high, but the demand for reliability is more.
Edit :
Looks like my inclination towards the upgrade needs rethinking, so answers to "should I upgrade" are welcome.
my original question also needs answers - how to describe the business advantages of an upgrade from rails2.1 -> rails3.
The app is under active development/enhancements.
The longer you go without upgrading, the harder it will be when the time comes. Sooner or later, any actively maintained project is going to have to move up to the more recent versions, and the more versions you have to skip along the way, the harder and more risky it will be. If you upgrade regularly, it becomes a fairly simple maintenance task.
I'm afraid that going from 2.1 -> 3.0 is going to be a fairly rough one unless your app is pretty simple. You might try going from 2.1 -> 2.3.9 as a first step. However, doing it now, instead of when it's 2.1 -> 3.1 will save you heartache. Right now, everyone is focused on helping people upgrade. A year from now, there will be fewer fresh resources available and fewer people going out of their way to help people upgrade.
If your application is under development and is likely to have more and more features over the months to come then you should migrate to the newer and actively supported version.
If your application only needs bug fixes occasionally then you should stick to the current version.
Upgrade!
I'd say that you should definitely upgrade, for the reasons you stated, but don't rush it. If you have a well defined test suite everything should be ok.
Most of core Rails 2.x code works with Rails 3, you can just read the deprecation warnings and fix things one by one. You can also use the official Rails Upgrade plugin to automate the bulk of the editing.
As for the gems and plugins you use, you can check their compatibility at railsplugins.org and decide if it's worth the trouble if any.
And the elevator pitch for the boss: You said the app is under development, so upgrading later when you absolutely have to means that you have to first deal with all the issues arising under 2.x and then deal with the upgrade issues plus 3.0 issues of a much bigger app. Upgrading now saves time by saving you the trouble of having to deal with 2.x issues. And you also avoid some of the upgrade issues since your app is probably much leaner now than the heavyweight it will be when you decide to upgrade later.
Since reliability is high on priority, you should probably not upgrade unless it's absolutely required. Some unforeseen issue is bound to come up.
To address the excitement of the latest technology, you can always try out new plugins and Rails 3 offline.
Businesses should not be sandboxes of developers. Nor should development be Resume Driven.
But that's just my opinion. :)
There are several reasons to upgrade, all of which are under the assumption that the app is and will continue to be under active development.
Integration with 3rd party software- for example, rails 1 did not have ActiveSupport. An app remaining on rails1 all through say rails 2 might want to integrate with a 3rd party API that primarily supports restful json. At that point, the sensibile path is to upgrade, but since you delayed it so long your risk of having lots of issues in the upgrade will be significantly greater than if you upgraded early.
Using plugins that will help with new features - if you want to add a new feature and someone has scratched your itch already, then if you are stuck on an older version of rails you will have to write that code yourself. The more code you have to write yourself, the greater the likelyhood of bugs and the more maintaince the code will likely require, depending on the function.
Fixing bugs in older verisons of the plugins/gems - if you encounter a bug in rails, or a plugin, or a gem, or some sort of other integration issue, it might be fixed in a later version, but what that depends on a newer version of rails. This will make your path to fixing said bug or implementing said enhancement greater the longer you wait to upgrade.
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/
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.
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.