I tried looking for an answer for about an hour but no luck. I have installed ruby-2.0.0
with my rvm but the system only detects the old ruby-1.9.3
!I changed the sym link in /usr/bin/ruby
to point to my ~/.rvm
ruby and now I get the following when I run ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]
However when I try to start a rails server
I get the error which says my current ruby version is 1.9.3
I ran gem env
and got a surprising results:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.23
- RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [x86_64-linux]
- INSTALLATION DIRECTORY: /var/lib/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /var/lib/gems/1.9.1
- /home/username/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--no-rdoc --no-ri"
- "update" => "--no-rdoc --no-ri"
- REMOTE SOURCES:
- http://rubygems.org/
As you can see it is pointing to the wrong location. I tried modifying .gemrc
to get it to work but it still refuses to change it's ruby installation directory. I have no idea how to fix it. I tried removing them all and starting fresh but apparently they are not installed via apt-get
so I don't know how to remove them!
Any help will be very much appreciated. Just for further info:
$ gem -v
1.8.23