The problem is understanding that the Ruby version "actually" / "effectively" works
I am on Mac OS and I am running Snow Leopard Version 10.6.8. I am using RVM to manage my Ruby installations (and therefore to use the Ruby on Rails framework), but I am having problems when I see some results in the log, mostly related to the current version, when I get a warning / error message. That is, I previously ran these commands in a terminal window:
$ which ruby /<ABSOLUTE_PATH>/.rvm/rubies/ruby-1.9.2-p290/bin/ruby $ rvm install 1.9.3 Installing Ruby from source to: /<ABSOLUTE_PATH>/.rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)... ruby-1.9.3-p0 - #fetching ... Fetching yaml-0.1.4.tar.gz to /<ABSOLUTE_PATH>/.rvm/archives Extracting yaml-0.1.4.tar.gz to /<ABSOLUTE_PATH>/.rvm/src Configuring yaml in /<ABSOLUTE_PATH>/.rvm/src/yaml-0.1.4. Compiling yaml in /<ABSOLUTE_PATH>/.rvm/src/yaml-0.1.4. Installing yaml to /<ABSOLUTE_PATH>/.rvm/usr ruby-1.9.3-p0 - #configuring ruby-1.9.3-p0 - #compiling ruby-1.9.3-p0 - #installing Removing old Rubygems files... Installing rubygems-1.8.10 for ruby-1.9.3-p0 ... Installation of rubygems completed successfully. ruby-1.9.3-p0 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake). ruby-1.9.3-p0 - #importing default gemsets (/<ABSOLUTE_PATH>/.rvm/gemsets/) Install of ruby-1.9.3-p0 - #complete $ which ruby /<ABSOLUTE_PATH>/.rvm/rubies/ruby-1.9.2-p290/bin/ruby $ rvm use --default 1.9.3 Using /<ABSOLUTE_PATH>/.rvm/gems/ruby-1.9.3-p0 $ which ruby /<ABSOLUTE_PATH>/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
So far this seems to be OK.
However, when I get some error like this gem related DelayedJob question , I see in the log that the system is using more
# Note the 'ruby-1.9.2-p290' undefined method `send_register_email\' for #<Syck::DomainType:0x00000108e2f870>\n/<ABSOLUTE_PATH>/.rvm/gems/ruby-1.9.2-p290/gems/delayed_job-3.0.1/lib/delayed/performable_mailer.rb:6:in ...
What's wrong? How can I solve the problem?
source to share
as @sarnold suggests you restart any long running processes like daemons.
Another thing is if it is running in the cron tab, make sure the cron task is running as the correct user. If you have configured RVM for a user and not a system, then root, or any user other than you have configured RVM for, will use the system ruby.
You carefully carved out "
Please note that this can easily happen with
sudo rake some:task # that has to do something as root like open a low port or move a file
this will run as root and not make the right choice of RVM. To fix this, there is
rvmsudo rake some:task
source to share