# pkg upgrade won't upgrade ruby-1.9



## jeraymond (Nov 13, 2014)

Hello,

When I run `pkg version -v` it tells me Ruby is out of date. However when I run `pkg upgrade` it says everything is up-to-date. Any ideas on why Ruby won't update?


```
# pkg version -v | grep ruby
ruby-1.9.3.547_3,1                 <   needs updating (remote has 1.9.3.547_4,1)
# pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
Checking for upgrades (14 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
```


----------



## drhowarddrfine (Nov 14, 2014)

Did you read /usr/ports/UPDATING about Ruby before doing this?


----------



## jeraymond (Nov 14, 2014)

Negative. I've been using pkg to install binary packages only. I don't even have /usr/ports on my system. Is updating Ruby binary packages via pkg broken?


----------



## talsamon (Nov 14, 2014)

> AFFECTS: users of lang/ruby19
> AUTHOR: swills@FreeBSD.org
> 
> The default ruby version has been updated from 1.9 to 2.0.
> ...


----------



## jeraymond (Nov 14, 2014)

Thanks for posting this information. How can I do this equivalently using pkg and the binary packages only. I'm not looking to build the ports myself.


----------



## SirDice (Nov 14, 2014)

You can always read the latest version on the SVN server: https://svnweb.freebsd.org/ports/head/UPDATING?view=markup


----------



## jeraymond (Nov 14, 2014)

Thanks for the link, but UPDATING only seems to mention what to do if you are compiling ports yourself. I'm not doing this, but am rather installing using the pre-build binary packages installed by pkg. Perhaps this is a pkg bug that it can't handle the switch to a new default version of Ruby? I really can't tell. All I see is that `pkg version -v` tells me that Ruby needs updating, but `pkg upgrade` tells me that I'm already up to date.


----------



## rmoe (Nov 14, 2014)

I'm somewhat guessing here as I happen to use ports only. But as packages are supposed to be just pre-built ports I guess my advice might help you anyway.

My understanding is that you _seem_ to be OK because you have ruby19 (which is outdated anyway). What you should probably do is to uninstall ruby19 and all its dependencies and to install ruby20 and the needed dependencies.


----------



## jeraymond (Nov 15, 2014)

I did a `pkg remove ruby` followed by `pkg install ruby`. This uninstalled 1.9 and installed 2.0. It'd be nice if pkg handled this better. At least provide the user a warning as to why the package isn't updating.


----------

