Ruby 1.9.3 Teeny Version
Ruby has two concepts of version: The actual release version, and the "compatibility version". For all Rubies 1.9.1 -> 1.9.3, the compatibility version is 1.9.1
, because they are all backward compatible with the 1.9.1
release.
The RUBY_VERSION
constant contains the release version number, but you will need to split the dots to get the MAJOR, MINOR, and TEENY if those values are important to you:
>> major, minor, teeny = RUBY_VERSION.split(".")
=> ["1", "9", "3"]
>> teeny
=> "3"
That said, Ruby version numbers are specifically designed to be ASCII-comparable, so it is common to see code like this for simple version checks:
if RUBY_VERSION >= "1.9.3"
#...
end
Patch level can typically be ignored, because there are no API changes in patch level releases, only bug fixes and security patches. Hope that helps!
Why is the latest version of Ruby 1.9.3 in Ubuntu using apt-get?
http://packages.ubuntu.com/yakkety/ruby says that the version of Ruby used for yakkety is Ruby 2.3, based on it relying on the package Ruby2.3.
Trouble installing ruby 1.9.3 because of a configuration issue
First goal should be to get the app back up running.
Therefore I would suggest to reset your app's configuration to the last working stand.
If this is not possible, please install ruby using rvm with the --with-gg=clang-option like this:
rvm install 1.9.3 --with-gcc=clang
Then use the installed ruby version by listing all installed rubies (running rvm list
) and choosing the 1.9.3 version provided (e.g. 1.9.3-p448) with the following command:
rvm --default use 1.9.3-p484
Please update your Gemfile with the ruby '1.9.3-p484'
line and make sure, you're in the login shell (to change to it, use /bin/bash --login
). After that your rvm commands should work again.
Installation of ruby 1.9.3 in Mac OS Mavericks
I used @UnholySheep advice and resolved my problem.
First I found that gcc46 were installed:
$ gcc-4.6 -v
Using built-in specs.
COLLECT_GCC=gcc-4.6
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc46/4.6.4/libexec/gcc/x86_64-apple-darwin13.0.0/4.6.4/lto-wrapper
Target: x86_64-apple-darwin13.0.0
Configured with: ../configure --build=x86_64-apple-darwin13.0.0 --prefix=/usr/local/Cellar/gcc46/4.6.4 --enable-languages=c --program-suffix=-4.6 --with-gmp=/usr/local/opt/gmp4 --with-mpfr=/usr/local/opt/mpfr2 --with-mpc=/usr/local/opt/libmpc08 --with-ppl=/usr/local/opt/ppl011 --with-cloog=/usr/local/opt/cloog-ppl015 --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --enable-plugin --disable-nls --disable-multilib
Thread model: posix
gcc version 4.6.4 (GCC)
I used locate gcc-4.6
and found that homebrew installed it under /usr/local/bin
. Then created a symlink as suggested by @UnholySheep:
sudo ln -s /usr/local/bin/gcc-4.6 /bin/gcc-4.6
Ruby Version Display
Chances are, you upgraded your Ruby installation somewhere along the line (or your system package manager did). It's very unlikely that you messed anything up.
rvm install 1.9.3 failing
It turns out this is a bug in RailsInstaller OSX 1.0.3 - (Found that out while reading Problems installing Ruby on Mountain Lion - ruby 1.9.3 wont' compile)
I needed to change /etc/rvmrc
to contain this:
umask g+w
export -a rvm_configure_env
rvm_configure_env=('LDFLAGS=-L/opt/sm/pkg/active/lib' 'CFLAGS=-I/opt/sm/pkg/active/include' 'CPATH=/opt/sm/pkg/active/include')
For more info see: https://github.com/railsinstaller/railsinstaller-nix/issues/10
Related Topics
Ruby 2.4 on MAC Os Mojave:Image Not Found ... Related to Openssl.Bundle
Gem Install Wrong Number of Arguments (Given 4, Expected 1)
Deep Convert Openstruct to JSON
Encoding::Undefinedconversionerror: "\Xc2" from Ascii-8Bit to Utf-8
Omission of Curly Braces for a Hash in an Array
How to Override the System Timezone in Ruby
Ruby - Convert Integer to String
How to Interpolate a Variable in a Ruby Regex
When Should I Use Datetime VS Date, Time Fields in Ruby/Rails
Return True Only If All Values Evaluate to True in Ruby
Openssl::Cipher::Ciphererror When Running Staging Db on Local
Active Resource Complaining About Expects an Hash
Ruby on Rails - Add Condition on ':Include =>' to Load Limited Number of Objects
"Bad Ecpoint" Ssl Error on Fresh Rvm Ruby 1.9.3 Install on Osx Mountain Lion
Ruby Multiple Background Threads
Obfuscating Rails App on Mri Ruby/Jruby for a Enterprise Customer