Looking to build a Rails 3 stack and trying to sort out Ruby versions.
I'm very interested in the concept of JVM, but not 100% sure if it even relates to Rails 3; meaning why not just do a deploy just for JVM if needed.
Then there's heroku saying there's a bug in Ruby 1.9.1, but they don't say wh开发者_开发技巧at the bug is, if it's addressed by Ruby 1.9.2 -- or what will happen as a result of running Rails 3 on Ruby 1.8.6.
UPDATE: Found the bug heroku is indirectly linking to: "Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails 3.0. Ruby Enterprise Edition have these fixed since release 1.8.7-2010.02 though. On the 1.9 front, Ruby 1.9.1 is not usable because it outright segfaults on Rails 3.0, so if you want to use Rails 3 with 1.9.x jump on 1.9.2 for smooth sailing."
Anyone have info/link on the subject?
Thanks!
If you're running on windows, my personal recommendation is go with JRuby. MRI (both 1.9.x and 1.8.x) has mountains of problems on windows, whether deploying to XP, Vista, or Windows 7. I don't develop on Windows often, but I do teach Rails classes, and that's my recommendation to Windows students now. Haven't had many issues with JRuby at all, aside from needing to use a different database driver (the jdbc gem versions). RVM doesn't work on windows, but you can use pik (https://github.com/vertiginous/pik) to achieve many of the same goals.
My advice is that if you're starting a new Rails 3 project you should definitely think about kicking it off using Ruby 1.9.2. Heroku supports multiple stacks with the default now being Bamboo (the one that supports 1.9.2 as well as REE). If you're worried about gem compatibility or something else then you can hedge your bets and use RVM and/or multiruby to run your test suite across multiple versions of ruby so you can deploy to either run time.
Personally I'm running a Rails 2 app on REE and a Rails 3 app on 1.9.2 and haven't had any problems.
If you're not deploying on Heroku and are setting up your own server then I would manage your Ruby versions using RVM on your production server so you can easily switch between versions if anything doesn't work.
In summary:
You can run Rails 2 and 3 apps on both REE and Ruby 1.9.2.
精彩评论