Running into issues installing ruby 2.0 with rvm - rvm

The error I keep getting when rvm is trying to import the default gemsets, is:
ruby-2.0.0-p247 - #importing default gemsets, this may take time...............................
/Users/****/.rvm/scripts/functions/support: line 291: 84474 Segmentation fault: 11 "$ruby_path" -rrbconfig -e '\
File.open("'"$config_path"'","w") { |file|
RbConfig::CONFIG.sort.each{|key,value|
file.write("#{key.gsub(/\.|-/,"_")}=\"#{value.gsub("$","\\$")}\"\n")
}
}
' > /dev/null 2>&1
rvm -v
rvm 1.21.17 () by Wayne E. Seguin , Michal Papis [https://rvm.io/]
xcode 4.6.3
uname -a
Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
sw_vers -productVersion :10.7.5

This can be happening because this ruby was build on OSX 10.8 and this is OSX 10.7 (like mentioned in the other answer), you can make sure it's all fine with disabling binary rubies:
rvm reinstall 2.0.0 --disable-binary
this will tell rvm to not search for binary and to go straight to compile process.
If this works for you then open a ticket for rvm to prepare binaries which are compatible with OSX 10.7
Update 2013.08.06
I have removed the link to binary osx/10.7/x86_64/ruby-2.0.0-p247 - if you prefer to use binaries then please open a ticket for rvm to build version for your system.

If the code you are showing segfaults, it must be a bug in Ruby 2.0. I recommend that you submit a bug report to https://bugs.ruby-lang.org/.

I had the same problem at OS X 10.7.5
I tried: sudo rvm reinstall 2.0.0, but it fails again.
Finally I chose to install a previous version with:
sudo rvm install 1.9.3 and all its ok

Related

rvm install 1.9.3 on OS X 10.9.5 failing

Trying to install ruby 1.9.3 using rvm on Mac OSX 10.9.5. I've installed latest command line tools. I'm getting some weird errors with miniruby. I tried following other instructions to use clang but that didn't help:
$ rvm install 1.9.3 --with-gcc=clang
ruby-1.9.3-p547 - #removing src/ruby-1.9.3-p547..
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Warning: found user selected compiler 'clang', this will suppress RVM auto detection mechanisms.
Installing Ruby from source to: /Users/redact/.rvm/rubies/ruby-1.9.3-p547, this may take a while depending on your cpu(s)...
ruby-1.9.3-p547 - #downloading ruby-1.9.3-p547, this may take a while depending on your connection...
ruby-1.9.3-p547 - #extracting ruby-1.9.3-p547 to /Users/redact/.rvm/src/ruby-1.9.3-p547....
ruby-1.9.3-p547 - #applying patch /Users/redact/.rvm/patches/ruby/GH-488.patch.
ruby-1.9.3-p547 - #configuring...............................................
ruby-1.9.3-p547 - #post-configuration.
ruby-1.9.3-p547 - #compiling...........................
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/redact/.rvm/log/1412548428_ruby-1.9.3-p547/make.log
-- Other runtime information -----------------------------------------------
* Loaded script: ./miniruby
* Loaded features:
0 enumerator.so
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Took a lot of research and eventually found some hints to a solution here: https://github.com/wayneeseguin/rvm/issues/1975
I had to install a different version of gcc and run rvm using that:
brew install gcc46 # wait a long long time.
CC=$( find $( brew --prefix gcc46 ) -name gcc-4.6 -perm /u+x ) rvm install 1.9.3
Hope this helps someone.

Ruby 2.0 on Mac 10.5.8 via RVM

I have been having some issues with my Ruby and Gem environments and wanted to clean them all out and start over. So I removed all my ruby's in rvm (rvm 1.13.8 (stable)) which left me with the stock Ruby 1.8.6 and Gem 1.0.1. I thought about removing these as well but everything I read said they should be fine. Anyway I went to install Ruby 2.0 but RVM has 1.9.3 as the most current and I was wondering if its because I am running 10.5.8 on a G4 MDD and if there is a possibility of being able to install it. My MacBook Pro running 10.8 was able to install it.
$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-p358]
[ruby-]1.8.7-head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2-p180
[ruby-]1.9.2-p290
[ruby-]1.9.2-p318
[ruby-]1.9.2[-p320]
[ruby-]1.9.2-head
[ruby-]1.9.3-preview1
[ruby-]1.9.3-rc1
[ruby-]1.9.3-p0
[ruby-]1.9.3-p125
[ruby-]1.9.3-[p194]
[ruby-]1.9.3-head
ruby-head
You need to update RVM, the versions are part of the update:
rvm get head
rvm list known | grep 2.0.0
which gives:
[ruby-]2.0.0-rc1
[ruby-]2.0.0-rc2
[ruby-]2.0.0[-p0]
rbx-2.0.0-rc1

install ruby on Rails in mac 10.6.8

Hi every one I try to install the last version on ruby on rails and I have several problem when run this command
\curl -L https://get.rvm.io | bash -s stable --ruby
The version of my mac is 10.6.8
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.6/i386/ruby-2.0.0-p0.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Installing requirements for osx, might require sudo password.
Skipping `brew update` make sure your formulas are up to date.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Missing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libxslt, libksba, openssl, sqlite.
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
On OSX 10.6 instead of command line tools install:
https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.6.pkg
download this application and install it, and run again the line to install ruby, but I obtain the same error.
Any idea!
This was a known issue with rvm (see: https://github.com/wayneeseguin/rvm/issues/1671).
The issue was resolved. Install rvm separately from ruby, then try
rvm install 2.0.0 --autolibs=4
to install 2.0.0.

can't get "rails console" to work on ubuntu 11.10

I want to use rails console and I'm using ubuntun 11.10 currently I have found the issue
error is something :
completion.rb:9:in `require': no such file to load -- readline (LoadError)
and I found a way to solve it:
http://blog.jasonmeridth.com/2010/11/25/readline-error-with-rvm-and-rails-3.html
but seems in ubuntu 11.10 the libreadline5-dev is missed and it is replaced with version 6
I installed version 6 and also I get the version 5 from
https://launchpad.net/ubuntu/oneiric/i386/libreadline-gplv2-dev/5.2-9ubuntu1
but yet if I try to run following code :
ruby extconf.rb
I'll get following lines :
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
checking for readline() in -ledit... no
checking for editline/readline.h... no
the "no"s part is my problem , so how can I solve this problem?
Ubuntu 11.10 uses newer readline library which not in sync with the readline package offered by rvm
To solve this (assuming you use single-user installation of rvm) do:
1) ensure you have installed ubuntus readline and editline dev packages
sudo apt-get install libreadline6 libreadline6-dev
2) configure ruby's readline extension to use the systems libs, not rvm's packages
rvm pkg uninstall readline
cd ~/.rvm/src/ruby-1.9.2-p290/ext/readline
ruby extconf.rb --with-editline-dir=/usr/ --with-readline-dir=/usr/
make
make install
3) go to your project and start up the rails console
Tip: You can call
rvm requirements
to see what ubuntu packages should be installed to use rvm ruby
You have to install the readline development packages before compiling ruby. Just run
sudo apt-get install libreadline6-dev
Alternative (as suggested in the article you linked) you can use RVM to get the appropriate readline sources by running
rvm package install readline
Edit: Once you've installed the readline packages from source, you can install your rubies like this
rvm install 1.9.3 --with-readline-dir="$rvm_path/usr"
If you alredy have installd a specific ruby, just use reinstall instead on install.

no such file to load -- openssl

Am trying to load my rails app onto a new linux machine and i have done all the installations required and the bundle install is working .Now my problem is when i start the server (rails s) and then try to open the web app its tells me " no such file to load -- openssl "
LoadError in MembersController#index
no such file to load -- openssl
This error occurred while loading the following files:
openssl
i tried uninstalling openssl (apt-get remove openssl) but still the problem persist.Can some body please help me with it.thanks
Am using ruby 1.8.7 and rails 3.0.0
Are you using RVM?
If so you may want to reinstall ruby with the location of your openssl installation passed as an option:
$ rvm remove 1.8.7
$ rvm install 1.8.7 --with-openssl-dir=/usr/local/openssl # or wherever openssl is installed
On a Debian-based system, you can find where openssl is installed by running the following command:
$ dpkg -L openssl
Alternatively you can have RVM install openssl for you:
$ rvm package install openssl
$ rvm remove 1.8.7
$ rvm install 1.8.7 --with-openssl-dir=$HOME/.rvm/usr
Note that afterwards you'll need to re-install rails:
$ gem install rails
I had this problem with OpenSUSE 12.1 after installing rvm (according to website instructions) and using it to install and use ruby 1.9.2.
Specifying --with-openssl-dir DID NOT solve it for me. But, after I installed libopenssl-devel with the OpenSUSE Software Management utility, "bundle install" complleted successfully.
For me, this issue was fixed (on Debian Lenny) by installing libopenssl-ruby:
$ sudo apt-get install libopenssl-ruby
Debian (did) split the openssl support into a separate package, see what's the role of libopenssl-ruby? for more information.
Using rbenv.
I had this issue after upgrading to Ubuntu 20.04 LTS.
Upgrading to newer version of ruby-build by following rbenv documentation ( do not forget dependencies at the beginning of the tutorial )
https://github.com/rbenv/ruby-build/wiki#updating-ruby-build
and then installing new version of ruby 2.7.1 ( previosly 2.6.0 ) and setting the new version locally where I use it, solved the problem.