Looks like that in Rails 2, in addition to changing the default database, default sessions store, now some of the oldies such as render_text method no longer work as expected. If you’ve used render_text "some text" in a controller, then you’ll need to replace it with render :text => "some text".
March 10, 2008 at 7:48 pm |
Thanks, just what I was looking for!
April 2, 2008 at 8:12 pm |
Thanks…
April 22, 2008 at 10:07 pm |
Thanks. I love Google. And now I love you.
May 31, 2008 at 7:09 pm |
I haven’t moved up to Rails 2 yet, because of the many incompatibilities I keep reading about. In fact, I kinda suspect that Rails 2 may well kill Rails because folks like me won’t move up to v2 and will instead move on to other technologies for our next projects.
Meanwhile, though, for those who’ve been suckered into upgrading existing projects that use render_text to Rails 2, it should be possible to re-created it with the following at the end of config/environment.rb (untested, as I don’t run Rails 2):
class ActionController::Base # :nodoc
def render_text(text = nil, status = 200, append_response = false) #:nodoc:
render :text => text, :status => status, :append_response => append_response
end
end
June 28, 2008 at 6:20 pm |
So much for backward compatibility! Can we stop changing things? this kind of migration has caused me more than one headache with rails and ruby!!!! If ruby and rails are so “great”, why this stupidity?
July 26, 2008 at 5:32 pm |
thanks! very helpful. man, these other people seem to think technology is ever going to be perfect.
July 29, 2008 at 3:57 pm |
Thanks, say Frank!
September 10, 2008 at 2:05 pm |
Thanks for your help, useful hint.
September 25, 2008 at 3:43 pm |
Thanks for your help. It made my day
December 23, 2008 at 4:37 pm |
yeah google brought me right here
Guess it was deprecated.
-=r
February 5, 2009 at 3:17 pm |
You saved me a ton of time by posting this information. Thank you!
July 2, 2009 at 7:08 pm |
[...] doesn’t work in Ruby 1.9. You need to use: [...]
July 28, 2009 at 10:06 pm |
Thanks so much. Just what I was looking for. Now I can continue developing
September 5, 2010 at 2:25 pm |
This was great. I was looking for problems in my installation of ruby instead of backwards compatibility.
June 1, 2011 at 1:12 pm |
i getting trouble with “render_text”, in the mean while u helped me alot..
Thank You dear..
Keep go on.