ASP MVC3 vs Ruby on Rails - ruby-on-rails

I have mainly developed in the .NET world, but I have a project coming up which needs to really favor the front end. Lots of UI love.
Is there value in using to Ruby On Rails instead of MVC3? How should I go about choosing between the two? Are there other options worth looking at?
I know Ruby On Rails is pretty popular, but how does it differ from MVC3?

Is there value in using rails instead of mvc3?
YES. If nothing it will give you a different perspective and broaden the way you think about programming problems. There's something about the terseness of ruby, usefulness of blocks, and dynamic behavior of the language that allows you to really think differently.
How to choose between the two?
If the project is a short one then stick with what you know. But if it'll end up being a longer project it might be worth the effort to start digging into the learning curve of rails. Most people will tell you that rails is faster to develop in than .net mvc. If the project is long enough, you might end up being able to develop faster on rails once you get comfortable with it.
That being said, the learning curve for a Microsoft programmer can be STEEP! If you're a unix guy then it wont be so bad but if not, get ready to learn about a LOT of different topics. The command line and your shell, TDD, homebrew or macports, git instead of subversion, gems, bundler, rvm, rspec or some other testing framework, etc.
Also, if you don't own a mac or aren't on some flavor of *nix then you might want to stick with .net. From what I hear it's a painful experience developing rails on windows.
If TDD is important to you then rails is the way to go. Also deployment is much easier on rails.
The ecosystem is something that might be a factor if you like to use tools built by others. Rails has a huge base of open source developers that contribute a lot back to the community. If you want to compare take a look at github.com (for rails) and codeplex (for microsoft). However, with Microsoft's NuGet system maybe the Microsoft side will start creating a better ecosystem. But right now it's not even close.
Other options worth looking at?
If you need to develop a pretty dynamic, database backed website then rails or .net mvc are good options. If it's something much simpler/smaller then some simpler/smaller frameworks are sinatra (for ruby) or webmatrix for .net. You'll be able to get up to speed much quicker with these frameworks.
How do the two frameworks differ?
The biggest difference I notice are from the underlying langues, ruby for rails and c# for .net mvc. Ruby is dynamic while c# is static. Rails is not compiled while .net mvc is. You'll get more raw performance out of .net mvc.
Rails is really built with TDD and BDD in mind. The last time I used .net mvc 1.0 it was really hard to do TDD.
When developing, pretty much everyone on .net mvc will use Visual Studio but I'd say most rails developers don't use an IDE. They just use a simple text editor (textmate, vim, emacs) and debug using the console.
EDIT:
*Bonus tips*
If you want to get started with rails (which I highly recommend) the easiest and most thorough way is to go through the rails tutorial by Michael Hartl. In it you'll learn about ruby/rails along with the following
git - source control
rvm - for running different versions of ruby on the same computer
rspec - for TDD
heroku - free web hosting with SIMPLE deployment
Once you get a good understanding of rails you'll want to improve your ruby skills to really become a good rails developer.

Ruby and RubyOnRails sounds like it would fit the bill.
And if you really wanted, you could use IronRuby for .NET goodness.
As for justification - many successful sites have been written with the framework. It has a proven track record over MVC3.

Related

Ruby on Rails vs ASP.NET MVC 3 - Which is quicker to develop a website with?

I want to build websites as quickly as possible, from initial concept to deployed within a few days. For the purposes of rapid app development - I'm fine ignoring Unit tests.
Assuming all things being equal, is Ruby on Rails faster to build a web application than ASP.NET MVC 3? I'm not concerned about the time taken to learn Ruby on Rails, I just want to know whether it is faster to develop web apps with.
Real life experience or references would be highly appreciated.
You will develop speed with the one you use the most.
Simple like that, everything is based on practice and training.
You should choose based on what makes you comfortable:
Language (Ruby, C#)
Development environment (Windows, Linux, Mac)
Text Editor, IDE...
Edit:
Just by coincidence from an ex-googler
In the short time I've been outside
Google I've created entire apps in
Java in the space of a single workday.
(Yes, you can program as quickly in
Java as in Ruby or Python, if you
understand your tools well.)
Since you're "well experienced with ASP.NET", it will be faster for you to learn ASP.NET MVC 3.
ASP.NET MVC 3 is an extension to ASP.NET, so your learning curve will be shorter.
On the other hand, do you want to learn new, non-Microsoft skills? In that case, Ruby on Rails would be an excellent choice. It is mature, fun, fast, lots of support etc. And all of the cool kids are using it these days.
The other part of the answer: which platform will your employer prefer? Assuming you'll be part of a team, what will the team as a whole use?

Groovy/Grails :: Ruby/Rails :: 2011 State of the framework

Yes, several similar threads exist, but we're now in 2011, and much has changed.
Grails 1.3.6 has improved hugely compared to v1.3 when I initially tried to learn the framework (and gave up to slow compile times and other groan inducing events).
Having spent a couple months with the latest release, I am impressed, protyping an app is an absolute breeze (GORM is great!). In development mode one no longer needs to restart, barring changes to domain classes. Groovy.lang is fantastic (bare in mind, this is compared to my day job life in PHP).
Now, on the flip side there is Ruby/Rails, which I have little experience with beyond perusing Ruby docs and exploring Active Record (to compare to GORM). Coming from PHP/Jquery, groovy syntax is cake, ruby not so much, although accessible.
Ruby/Rails is all the rage, while Groovy/Grails seems to be picking up speed in its own right.
I'd like to hear what both camps have to say (flame inducing lang war welcome) re: pros/cons of both langs/frameworks now in 2011. When choosing a framework it's important to know what you're getting into, so have at it, newbies will benefit, and experts can vent ;--)
Rails and Grails are both excellent frameworks with their current releases. You really can't go wrong with either. Here are some things I find interesting about them though:
Rails
Rails (Ruby) does not scale as well as Grails (Groovy). You will need more horsepower to run your application. This isn't a big deal at all with PaaS options like EngineYard (and hopefully a AWS BeanStalk Rails option in the future), but it might just cost a little more to run a Rails app vs a Grails app (obviously JRuby is also an option to though).
Rails is slightly better with NoSQL alternatives currently, but Grails is catching up quickly
Rails has many more plugins, but this can lead to trouble if you use some that aren't maintained (a lot of them don't currently work with Rails 3 yet either).
Rails is more mature and has more features at this point in time because it's been around longer
Rails REST support is amazing
There are many more "big" Rails websites than Grails
Ruby is much more popular than Groovy - TIOBE
No dependence on Oracle, ha! (Grails obviously needs the JVM)
Grails
Grails integrates with the JVM better than JRuby
Grails GORM is better than ActiveRecord (IMHO), although Rails 3 opened the door a little bit for other persistence options, but all the books, tutorials, etc all use ActiveRecord
Grails View taglibs are better than <=%...%> in view
Grails plugins are well documented and clearly state whether they are supported by SpringSource or not
SpringSource is investing heavily in Grails
There will be many more corporate jobs for Grails than Rails in the future, but more startups use Rails (where do you want to work?)
My perspective
I used Rails a couple years ago, I'm working on a Grails project now
I like them both better than Django (Python) or Zend Framework (PHP)
I plan to learn Lift (Scala) next
My Recommendation
If you have never done Java development and are working on a side project for a small to medium website, go with Rails
If you are working at a big company that uses Java, try pitching Grails to your management as the "next Java framework" they should invest in
If you are working on "the next twitter or foursquare," well then you are smart enough to answer this question yourself! :)
First time I begun a project with Rails I was really surprised:
How can I separate "repository" from "Service"? Oh my God: I have to put business logic on controllers... I can't imagine a real big project with Ruby on Rails: Is there Someone on 37signals remembering the basics of separating Business and Domain/Repository. The Rails folders/classes structure doesn't take care about this.
Second sock: "Active Record". Try to design a real complex Object Oriented Business layer and map it using the Rails Models (Active Record)... really: don't.
6 months later, with our project running: R&R is consuming 80% CPU (and memory...) using apache + passanger on a quad core server... and the Postgresql Database is in holidays (3-4% of CPU)... Oh my god (newly)
My old ASP/VB6 applications where capable of serve pages to 300 concurrent users in a real backoffice context with real complex databases and complex business installed on a standalone machine (a year 2001 1 CPU core server).
Of course, conventions and Ruby syntax are lovely... and no one needs a compiler (well... unit tests are used for this porpouses 90% of the time... just for solving the dissapeared typing each time I change some code... "Please, programming god, take care about my fingers mistakes" )
First impession with Grails:
A "Cool" stack inspired on Rails with professional power based on Spring framework (IoC, Hibernate, ...)
And YES!!!
There is a clean Domain/Service separation. NICE!!!
You can, eventually, forget Java.
Rails is fairly mature, has a HUGE ecosystem to go with it. I'm not familiar with Grails or it's support online, but the red flag I see in your post is that you've admitted Grails is playing catch up to Rails.
Ruby is an absolute joy to work with (and this coming from an old C++ hack... why, back in the day I used to program with just a hex keypad, young whippersnapper... now GET OFF MY LAWN!).
There are things about ruby that make it hard to follow at times (method_missing I'm looking at YOU) but I'm sure that can be said about any language.
Me? I'd go with ruby and rails.
Well for grails, i still think that even catching up, it has 2 main things that rails won't have in a easy way:
scaling up
tons of mature java libraries at your fingertips (personally geotools among others)
Ruby on Rails is outstanding - like the Pink Floyd of web dev.
Groovy on Grails is a decent copy of it - kind of like the Australian Pink Floyd show...
BTW - We have both at work - and I have seen many Grails developers eventually learn Rails and stick with it.
I have also seen Rails developers learn Grails, but NONE of them have preferred it.
About half of the time, our Java developers learn Grails and simply stay away from Ruby.
IMHO - If you truly know both fairly well, you will almost always prefer Ruby and Rails.
You also have to consider your IDE. When I started out with rails, it was quite painful. Rubymine was super slow and crashing, everyone I know were using textmate. Grails has STS (eclipse based) and gives you all the features you need.

What is the common .NET MVC workflow? Is there one portable between Rails?

I've been working as an apprentice/junior developer working in .NET web forms and dabbling in a ton of other stuff.
After tasting a ton of technologies I've settled on Ruby on Rails and ASP.NET MVC.
I'm struggling with workflow and I want to get into behaviour driven development.
What workflows work for you?
What tools do you recommend for testing etc?
Are there any tools I can use on both Rails and .Net?
Are there any concentration tips you recommend?
One of the tools that I use heavily in .NET is ReSharper. It costs a nice chunk of change but it enables me to easily and quickly change my code as it provides a quick and simple way to execute tests and refactor code. On top of that it also provides visual hints when I could be doing something better.
As far as portable between Rails and ASP.NET MVC, I have not seen anything. The closest you might get as far as tooling goes is using ReSharper on .NET and then RubyMine in Ruby as they are both written by JetBrains.
For testing in .NET you may want to check out mSpec as it is a BDD framework for .NET and then combine that with using some stuff from MvcContrib for automated UI testing and you might get a closer workflow to what you get out of box with Rails 3.
I am no expert and am continuing to refine my process. I recently blogged about it which should get you off to a great start: http://ntcoding.blogspot.com/2011/01/total-bdd-in-aspnet-mvc_16.html
Hope you like it. BDD helps you stay organised and make sure you are developing the right product.
Spend a lot of time learning gherkin too.
You can use IronRuby in .NET which means RSpec and lots of stuff the rails boys use.
Ciao for now :PPPPPPPPPPPPPPPP

mono or RoR for new application run on linux?

I have little experience with ruby itself. I am going to hire somebody to write a web based application and I wanted it to be written in RoR but I was recommend mono. I guess because they like mono and because they think the RoR is slow.
The whole application would be some kind of social media meta management tool. There will be front end web based part and then back end doing the 'real stuff'.
I have no experience with mono at all and I am not experienced enough to comfortably say that RoR is the best choice.
I understood that if RoR is configured properly it could be pretty fast. I read that RoR has some troubles with scalability. I will start the application small and if it's successful I need to scale it up.
What would you recommend?
in the light of
performance
scalability
easiness to test
easiness to maintain, develop code/project
( I like ruby but I am not going to be the developer myself. I prefer to choose the 'better' option if there is such answer to that question)
please feel free to suggest anything else ...
If you are not going to write it yourself, you may want to go with what the person who will write it is most comfortable with.
Full disclosure: I have developed several sites now using Mono and I love it. I have used Ruby-on-Rails but not for anything nearly as big as what I have done in Mono. Keep that in mind.
Quick answer: In the greater scheme of things, Ruby-on-Rails and ASP.NET MVC have more in common than not. My choice would be ASP.NET MVC on Mono but I doubt you would regret choosing either.
Architecture: If you want one way of doing it out of the box, choose Ruby-on-Rails. If you want to be able to choose what you feel are the best-of-the-best technologies from a range of choices, choose .NET (Mono).
Ruby-on-Rails is more of a turn-key solution in that it provides a standard way of doing pretty much everything you need out of the box. .NET (Mono) offers a lot more power (my opinion let's say) but there are a lot of different pieces to choose from and you have to choose a technology stack yourself. As an example, RoR has a standard way of accessing databases while .NET Mono let/force you to choose from a dozen different ways to do that.
Mono and .NET generally have a little better separation of concerns so the purist in you might like that. If not, you actually find the roll-up-your sleeves and get it done attitude of Ruby more to your liking.
Performance and Scalability: This should clearly go to .NET and Mono. In fact, I believe the fastest way to run Ruby-on-Rails is to use IronRuby to run it on .NET. StackOverflow is written in ASP.NET MVC and, given the amount of traffic, it obviously performs great. Proof is in the pudding. That said, the performance bottleneck will probably not be your choice of framework.
Testing: Old style ASP.NET (now called WebForms) is considered pretty hard to test. The newer ASP.NET MVC was designed to be easy to test and is similar to RoR. One major factor is that in Mono you will probably be using a statically typed language (like C#) while Ruby is of course a dynamically typed language. You have to write more tests in a dynamic language (because the compiler/interpreter will not catch type problems) but it can also be easier to write tests if you are not fighting the compiler. I think it is a matter of taste and style (I like static) but this is a major factor in answering this question.
Of course, since .NET/Mono is a multi-language platform, you could always write your ASP.NET MVC tests in a dynamic language. You could even do it in Ruby (IronRuby). Perhaps that would be the best of both worlds (static checking on your real code and flexible dynamism in your tests). I have considered doing this myself using IronPython for tests.
Maintenance and development: This is a tough one. It depends what you are writing, what third-party libraries you might need, and what tools you are going to use. I would say that RoR is probably the more advanced MVC framework. My own thoughts are that Ruby-on-Rails is probably a shade easier to write but a little bit harder to maintain.
Community: I like the Ruby community more than the .NET one but I think I like the Mono one the best. That makes it a little confusing. The core Mono guys (like Michael Hutchinson that answered here) are simply awesome. I really like MonoDevelop as a tool (IDE) as well. It just keeps getting better and better. Michael, thank you for Git support if you had anything to do with that. :-)
Tools: If you are writing for Mono you can use the whole universe of .NET tools (VisualStudio, ReSharper, Reflector, etc) so that is pretty hard to beat. That is assuming you develop on Windows of course. On Linux or Mac the tool of choice for Mono would be MonoDevelop. It supports version control, a software debugger, and NUnit tests right in the IDE and is completely cross-platform.
It seems like a lot of Ruby folks just use a simple text editor. This may just be because an IDE just does not have as much to offer a dynamic language as it does a static one. Here is a SO question on what people like for Ruby:
What Ruby IDE do you prefer?
EDIT: Just to make things confusing...there is another MVC framework for .NET/Mono that is even more like Ruby-on-Rails; MonoRail even has an implementation of ActiveRecord. MonoRail has actually been around longer than ASP.NET MVC but I would stick with ASP.NET MVC these days as that is where the future lies. ASP.NET MVC is open source by the way and ships with Mono out of the box (the actual Microsoft code).
I can speak more to Rails than Mono. RoR is pretty scalable these days with all of the cloud hosting services available. Web applications query data and render web pages using that data, which really isn't that big of a deal. Most performance issues are caused by database and schema design issues, not the web framework. Typically, database response times dwarf other portions of server processing. RoR is also very easy to test. Testing is a more natural part of development than in other languages that I use. When I started RoR programming I was used to the much more structured world of Java, and the more dynamic Rails won me over for web development.
Firstly, I work on MonoDevelop, a crossplatform IDE for Mono (including ASP.NET & ASP.NET MVC), so feel free to consider my answer biased, but hopefully it will be helpful anyway.
Performance: a decent JIT compiler (Mono) should be much faster than an interpreter (Ruby). But it depends on the programmer's skill too - well-written Ruby could be faster than really badly written C#. The libraries and database and caching mechanisms you use will be a big factor too, but these aren't fundamental to the languages/frameworks.
Scalability: AFAIK there is no magic bullet for web app scalability, and although I don't have practical experience in this field, here's some info I've picked up. It really depends on your database usage, how your session state is stored, and how caching is implemented. This isn't really fundamental to either framework - once you start scaling to multiple machines, you'll probably have many machines/processes for database servers, cache servers, message queues, frontends, servers for static content, etc. Likely only the frontends will be ASP.NET or ROR, and if they're stateless, you can simply clone them and handle the scalability problems on the backend.
Testing: I can't speak for Ruby, but ASP.NET MVC (but not vanilla ASP.NET) was designed to be easily testable using .NET testing tools such as NUnit (Mono's own unit tests use NUnit).
Maintenance and development: Again, I can't really speak for Ruby, but it's pretty much a given that it will be easiest to develop (at least initially) in the language & framework that the developer already has experience with. Also, .NET has some amazing development tools on Windows - Visual Studio, ReSharper, etc. - and there's a huge pool of experienced C# and ASP.NET developers you can hire, though few of them will know Linux/Mono.
Also, StackOverflow uses ASP.NET MVC :)
To introduce a little levity...
How about DOS on Dope: the last MVC web framework you will ever need?
There are of course a dizzying array of choices but another nice alternative is Django.
It is basically Ruby-on-Rails for Python so most of the comparisons of RoR vs. ASP.NET MVC would apply. Depending on what kind of site you are building, the really interesting feature of Django is the automatic admin interface.
If you need to be up and running quickly, I would go for RoR. Scaling rails is becoming easier with time and you have a big range of ruby runtime environments to choose from MRI 1.8, 1.9, REE 1.8, JRuby (run on java VM), Rubinius.
ASP.NET MVC is nice, but I still think it has some way to go before it offers the same speed of development as RoR.

Learning Ruby on Rails any good for Grails?

My company is in the process of starting down the Grails path. The reason for that is that the current developers are heavy on Java but felt the need for a MVC-style language for some future web development projects. Personally, I'm coming from the design/usability world, but as I take more "front-end" responsibilities I'm starting to feel the need for learning a language more intensively so I can code some logic but especially the front-end code for my UIs and stuff.
I've been trying to get into Python/Django personally, but just never invested too much time on it. Now that my company is "jumping" into Grails I bought the "Agile Web Development with Rails (3rd Ed - Beta)" and I'm starting to get into RoR. I'd still like to learn Python in the future or on the side, but my biggest question is:
Should I be learning RoR, and have a more versatile language in my "portfolio", knowing that my RoR knowledge will be useful for my Grails needs as well??
-OR-
Should I just skip RoR and focus on learning Grails that I'll be needing for work soon, and work on learning RoR/Django (Ruby/Python) later?
Basically the question revolves around the usefulness of Grails in a non-corporate setting and the similarities between Rails and Grails. (and this, while trying to avoid the centennial discussion of Python vs Ruby (on Rails) :))
Mmh, I don't know how to say this. Some people might bash me over this.
Language (Groovy and Ruby)
As a language I reckon Ruby is more funky compared to Groovy. Groovy only exists to ease Java programmer as you don't need to learn too much new syntax. But overall I reckon is not as funky as Ruby. Groovy wouldn't be the JVM language that is worth to learn based on attender's vote in this year's JavaOne but instead Scala is the one to go. Besides that, the original creator of Groovy himself does not have faith in the language he created himself in the first place.
Community and Job openings
As for the community, Grails community is not as big as Rails, though since the acquirement by Spring more and more people are using it in serious application. Rails has more job openings in the market compared to Grails (that is if you want to invest in looking a new job).
The framework (Grails and Rails)
But, as a framework, if you really care about maintainability and need access to Java framework and legacy Java system, Grails is the way to go as it provides cleaner access to Java. Grails itself is built upon several popular Java framework (Spring & Hibernate). Rails itself IMHO is funky like Ruby itself, but it's funkyness costs you maintainability. Matz himself prefers Merb over Rails 2 because Rails create a DSL on top of Ruby which is really against the Ruby philosophy. And I reckon because Rails itself is opiniated, which in turn if you don't have the same opinion as the creator, it might not fit your needs.
Conclusion
So in your case, learn Grails as that is the company's consensus (you need to respect the consensus) and if you still want to secure your job. But, invest some time learning Rails and Ruby too if you want to open a chance getting a new job in the future.
Just a bit of a question, is the reason they are choosing Grails because Groovy is closer in syntax to Java than Ruby, or because they want access to Java?
If it is the former, then I would say try to focus on Grails since that is what you will be using. If it is the latter, you might want to see if the development team is open to using JRuby.
I have never used Grails or Rails before, but I have used Groovy and Ruby before, and as a language I think Ruby is much cleaner and more consistent, and the team might enjoy production more. As a platform, Rails has been out longer and has a lot of attention, so I would imagine it is a more stable platform to use with more fleshed out features.
JRuby has full access to classes written in Java, so this is why I would say consider trying Rails. If it is too late in the decision time to consider it then I guess you can just ignore this post.
Basically, if you just want to hook in with Java, then JRuby is an option you should consider, but if the team is afraid of non-Java like syntax, maybe continue as is.
I would learn both. They are both up and coming technologies. Learning RESTful coding is a real benefit in any language.
I use GRAILS at work and RoR for side projects. I can say that the RoR community is much larger (I'm talking about RoR vs Grails not RoR vs Java) and very helpful.
Short Answer: They are similar.... what could it hurt?
Just skip RoR. There are really not a lot of similar things(besides the name)
I certainly believe that being enough familiar with Java, plus some experience programming with a dynamic language is more than enough if you plan to do serious development with Grails.
Comparing just only views(taglibs in Grails, RHTML in RoR) and the persistence stuff(GORM vs ActiveRecord) is just too different in the core, to invest time learning the nitty gritty details of RoR. Just dive into Grails, you won't regret.
Edit: corrected typo.
I've been learning RoR and Grails and the latter is far easier to learn.
Both frameworks share the same principles (agile, kiss, dry, duck typing and so..) but Groovy syntax is...well is simply great, something you can learn and use in a blink of an eye.
I truly feel that Grails has brighter future than RoR.
PD: Just in case you find it useful, a college of mine it's working full time with Grails and has a blog with some tips:
http://dahernan.net/search/label/grails
You should just skip RoR and focus on learning Grails that you'll be needing for work.
#Levi Figueira
For one thing, Grails is far more flexible than Rails. Rails is difficult to use with a legacy DB because ActiveRecord has too many design constraints that many legacy DBs didn't follow. Grails, oth, can use standard Hibernate mappings, which can accommodate a much broader range of DB designs.
The Rails community has been very vocal in evangelising RoR, with the result that high expectations have been set and not always met (programmer productivity is good, but ensuring good performance once deployed isn't so easy).
Grails has been designed as the scripted successor to Java, whereas the Ruby-Java integration used in JRuby on Rails, for example, has had to be retrofitted.
I would suggest that you stick with Grails; it may not have the same glitz as RoR, but it's a pragmatic choice; you get improved productivity and the re-use of existing Java libraries.
Jump straight into Grails. I'm sure Ruby/Rails is good but so in Groovy/Grails. I recommend this book.
http://beginninggroovyandgrails.com
Remember the errata is online. There are a couple of mistakes in the book.
http://beginninggroovyandgrails.com/site/content/errata
Also, check out the 3 minute and 30 second demo of creating your first Grails app.
http://grails.org/Grails+Screencasts
This tutorial will show you the basics.
http://grails.org/Quick+Start
Yes Grails is the way to go. RoR is good but it ties you in to the Ruby ecosystem. Part of the effort of learning a new framework or language is learning the class libraries as well as the language syntax. If your co-workers are all Java types you will be much better placed to receive help and support as they will all be speaking the same language as you.
The other advantage to learning a bit of Groovy and Java is that web frameworks like GWT will open up to you. Grails has a GWT plugin and as a front end developer you will appreciate the ease of use and cross browser compatibility.
Also there is at least one hosting company offering free Grails application hosting (http://www.mor.ph/) which means that you can prototype sites at small data volumes before having to pay.
I favor Grails over Rails, but learning Rails will give you a more balanced perspective and actually open your eyes to overlooked things that are possible in Grails.
At a first glance you would think they are completely differente stories, since they are based on extremely different languages (Ruby and Groovy).
Then, after reading a couple of tutorials, you'll realize they share the same principles, scaffolding, duck typing, .. and finally the same goal:
making agile programming feasible.
If you already feel comfortable with terms like IoC and MVC, you'll find any of these options easy and exciting to learn.
I would say no, I'm learning Grails as well, and I've considered this as well, but just learning Grails is pretty big, plus learning Groovy (which granted is easy, but still gotta learn it right?) and all that... so learning Rails would have been just too much.
Yes if we compare grails and rails I would choose grails (I developed some intranet applications in grails).
But Django is superior to both - as python is well hmm a perfect choice.
You might also want to take a look at Clojure, a JVM language that's just starting to get popular. It may be a good choice for a Java-based company since it's compatible with your old codebase, and has a lot of modern innovations going for it. There are some good web frameworks emerging, including Compojure.

Resources