Note that there are some explanatory texts on larger screens.

plurals
  1. PORails not using correct version of Ruby
    primarykey
    data
    text
    <p><strong>New information</strong></p> <p>This is what happens with <code>rails console</code>:</p> <pre><code>Loading development environment (Rails 3.1.1) ruby-1.9.2-p290 :001 &gt; RUBY_VERSION =&gt; "1.8.7" </code></pre> <p>There's something really weird going on here - the prompt says <code>1.9.2</code> but <code>RUBY_VERSION</code> shows <code>1.8.7</code>.</p> <hr> <p>I'm using RVM, but I'm having problems with Rails on Ubuntu.</p> <pre><code>$ which ruby /home/nick/.rvm/rubies/ruby-1.9.2-p290/bin/ruby $rvm list rvm rubies =&gt; ruby-1.9.2-p290 [ i686 ] </code></pre> <p>But if I do <code>gem env</code> I get</p> <pre><code>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 </code></pre> <p>and when I run Rails, if I do <code>puts RUBY_VERSION</code> it outputs <code>1.8.7</code>.</p> <p>In fact, in <code>irb</code>, <code>RUBY_VERSION</code> gives <code>1.9.2</code> but in <code>rails console</code> it gives <code>1.8.7</code>.</p> <p>The main problem is that it's failing when it gets to my JSON-style hash-literals.</p> <p>I've tried various approaches of uninstalling rvm, rails, bundler, etc. but nothing seems to work. Any ideas?</p> <h2>EDIT:</h2> <p>Here is the output of <code>rvm info</code>:</p> <pre><code>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 =&gt; GNU bash, version 4.2.10(1)-release (i686-pc-linux-gnu)" zsh: " =&gt; 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" date: "2011-07-09" platform: "i686-linux" patchlevel: "2011-07-09 revision 32553" full_version: "ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]" homes: gem: "/home/nick/.rvm/gems/ruby-1.9.2-p290" ruby: "/home/nick/.rvm/rubies/ruby-1.9.2-p290" binaries: ruby: "/home/nick/.rvm/rubies/ruby-1.9.2-p290/bin/ruby" irb: "/home/nick/.rvm/rubies/ruby-1.9.2-p290/bin/irb" gem: "/home/nick/.rvm/rubies/ruby-1.9.2-p290/bin/gem" rake: "/home/nick/.rvm/gems/ruby-1.9.2-p290/bin/rake" environment: PATH: "/home/nick/.rvm/gems/ruby-1.9.2-p290/bin:/home/nick/.rvm/gems/ruby-1.9.2-p290@global/bin:/home/nick/.rvm/rubies/ruby-1.9.2-p290/bin:/home/nick/.rvm/bin:/home/nick/local/node/bin:/home/nick/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" GEM_HOME: "/home/nick/.rvm/gems/ruby-1.9.2-p290" GEM_PATH: "/home/nick/.rvm/gems/ruby-1.9.2-p290:/home/nick/.rvm/gems/ruby-1.9.2-p290@global" MY_RUBY_HOME: "/home/nick/.rvm/rubies/ruby-1.9.2-p290" IRBRC: "/home/nick/.rvm/rubies/ruby-1.9.2-p290/.irbrc" RUBYOPT: "" gemset: "" </code></pre> <p>but still <code>gem env</code> tells me that in the RubyGems Environment the Ruby version is <code>1.8.7</code>. I just don't get it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload