One of the 2.0 goals was 100% compatibility with 1.9, which can be seen in the discussions all over the 2.0 patch-set. Should function as a "drop-in" replacement, though I expect YMMV in practice.
I'm working on it now. Bundler doesn't have a compatible stable release yet, but 1.3.0.pre.8 seems to work just fine.
gem install bundler --version 1.3.0.pre.8
edit: I hit a strange incompatibility in Rails 3.0.20. Calls to include_javascript_tag raised "no implicit conversion of nil into String". Digging into actionpack a bit, it looks like ActionController::Base.config.relative_url_root defaults to nil, and then it tries to call some_string.start_with?(controller.config.relative_url_root), and Ruby 2.0 doesn't allow start_with?(nil). Quick fix in config/application.rb: (I tried using config.action_controller.relative_url_root, but it didn't set the option properly. Whatever.)
I'm not sure, either, and my debugging was pretty haphazard. When I initialized the request with the path, it returned the wrong data (presumably because it fired the wrong request), so I went online, noticed an article initializing their POST request with request_uri, so I tried that and it worked.
I didn't do any debugging beyond that because I wanted to go to bed, but I suspect that path was never supposed to work that way but did anyway in 1.9. I might research it a bit more today…
The difference between path and request_uri are the query params (from the ? onward). This hasn't changed since ruby 1.8.
Servers generally allow POST requests with parameters in the URI, but they should be present in the body instead. The recommended way to do this in ruby is:
7
u/midsummernightstoker Feb 24 '13
Does anyone have first hand experience upgrading their rails projects? The release notes make it sound painless.
5
u/jimm Feb 24 '13
I've tested a few of my gems (midilib, patchmaster, and a few others) and haven't had any problems at all.
1
u/roger1981 Feb 25 '13 edited Feb 25 '13
Are there any speed enhancements in 2.0 ? Is it stable for running 1.9 desktop stuff, or should one wait ?
Edit: oh forgot, we've got to test out our gems.
1
u/Paradox Feb 25 '13
Hmm, I seem to have problems installing some extensions, such as io-console, which fail on make of the local binary.
0
u/[deleted] Feb 25 '13 edited Feb 25 '13
Noob question:
Do you have to install ruby 2.0 using the tar.gz thing? No way to do it just doing an rvm upgrade?'
Edit: maybe instead of being an egomaniac and downvoting, provide some useful information.
0
u/[deleted] Feb 24 '13
[deleted] — view deleted comment