New information

This is what happens with rails console:

Loading development environment (Rails 3.1.1)
ruby-1.9.2-p290 :001 > RUBY_VERSION
 => "1.8.7" 

There's something really weird going on here - the prompt says 1.9.2 but RUBY_VERSION shows 1.8.7.


I'm using RVM, but I'm having problems with Rails on Ubuntu.

$ which ruby
/home/nick/.rvm/rubies/ruby-1.9.2-p290/bin/ruby

$rvm list
rvm rubies
=> ruby-1.9.2-p290 [ i686 ]

But if I do gem env I get

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.11
  - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
  - INSTALLATION DIRECTORY: /home/nick/.rvm/gems/ruby-1.9.2-p290
  - RUBY EXECUTABLE: /usr/bin/ruby1.8
  - EXECUTABLE DIRECTORY: /home/nick/.rvm/gems/ruby-1.9.2-p290/bin

and when I run Rails, if I do puts RUBY_VERSION it outputs 1.8.7.

In fact, in irb, RUBY_VERSION gives 1.9.2 but in rails console it gives 1.8.7.

The main problem is that it's failing when it gets to my JSON-style hash-literals.

I've tried various approaches of uninstalling rvm, rails, bundler, etc. but nothing seems to work. Any ideas?

EDIT:

Here is the output of rvm info:

ruby-1.9.2-p290:

  system:
    uname:       "Linux ubie 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:50:42 UTC 2011 i686 i686 i386 GNU/Linux"
    bash:        "/bin/bash => GNU bash, version 4.2.10(1)-release (i686-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.8.6 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]"

  ruby:
    interpreter:  "ruby"
    version:      "1.9.2p290"
Edit
Report