0

I upgraded from rails 3.0.4 to 3.1.0. Then I started getting these error messages when running rails server, I had to change a couple of initializers like this:from wrap_parameters format: [:json] to wrap_parameters :format => [:json]

Now WEBrick does start up but I get A LOT of these messages: syntax error, unexpected ':', expecting '=' ...er json: @page.errors, status: :unprocessable_entity }

leonel
  • 10,106
  • 21
  • 85
  • 129
  • 1
    Are you sure you only changed the rails version? This looks more like a difference between ruby 1.8 and 1.9. – Benoit Garret Sep 21 '11 at 21:25
  • You're right, I think I downgraded to 1.8.7 >:( Upgrading to 1.9 would be the only solution? I downgraded because my web host uses 1.8 – leonel Sep 21 '11 at 21:31
  • Unfortunately, you would have to change every hash by hand. See this answer for more information: http://stackoverflow.com/questions/5620785/does-ruby-1-8-7-head-support-1-9-style-hash-literals. Getting a lot of these is strange though, are you sure you're not auto-generating this hash syntax in some way? – Benoit Garret Sep 21 '11 at 21:45
  • I was using Rails 3.0.4 -and Ruby 1.8.7. then switched to Ruby 1.9.2. Then switched to Rails 3.1.0 and Ruby 1.8.7. Question: would it be ok if I use RVM on the production server? – leonel Sep 21 '11 at 22:32
  • 1
    It looks like you can: http://stackoverflow.com/questions/5864001/is-rvm-production-ready. I'm also doing it and I'm not the only one. – Benoit Garret Sep 21 '11 at 22:42

0 Answers0