Upgrading Ruby 1.9.2 to 1.9.3 Error - ruby-on-rails

I had ruby 1.9.2 previously installed, and now I would like to upgrade it to version 1.9.3 so that I can install Rails, but I keep getting this error:
ruby-1.9.3-p484 - #downloading rubygems-2.2.2
There is no checksum for 'http://production.cf.rubygems.org/rubygems/rubygems-2.2.2.tgz'
for 'rubygems-2.2.2.tgz', it's not possible to validate it.
This could be because your RVM install's list of versions is out of date. You may want to
update your list of rubies by running 'rvm get stable' and try again.
If that does not resolve the issue and you wish to continue with unverified download
add '--verify-downloads 1' after the command.
I have already tried:
rvm get stable
rvm get head
gem update --system
yet I still get the same error. I am using JewelryBox to install version 1.9.3.

Try this.
To Install RVM
\curl -L https://get.rvm.io | bash -s stable --ruby
Then
rvm install 1.9.3 --with-gcc=clang

Try the following command:
rvm install 1.9.3 --verify-downloads 1

Related

Error running '__rvm_make -j4' when installing ruby 2.1.10 on ubuntu 18.04

I was doing set up a rails project which was on ruby-2.1.10 and rails-4.1.4.
I tried a lot of solutions but nothing has worked for me, It already took my one day.
please help me to resolve this If anyone can help or already faced this issue.
solutions which I have tried.
1)
rvm install 2.1.10
2)
rvm get head
rvm install 2.1.10
3)
rvm get master
rvm install ruby-2.1.10
4)
sudo apt-get install libcurl4-gnutls-dev libxml2 libxml2-dev libxslt1-dev ruby-dev
rvm reinstall 2.1.10 --force
5)
rvm get head
rvm reinstall all
I also tried to reinstall rvm and ruby using rbenv,
using rvm, using source files
from this link
each time I was facing this issue
Error running '__rvm_make -j4',
please read /home/mds/.rvm/log/1525769841_ruby-2.1.10/make.log
There has been an error while running make. Halting the installation.
When I opened this file /home/mds/.rvm/log/1525769841_ruby-2.1.10/make.log
This is the log file link.
First try this:
rvm reload
rvm install ruby-2.1.10
If you get same errors try installing with this patch, based on #mark 's comment,
you can use a patch file, but of course you probably wanna view the patch before running, it seems to correct SSL version problems.
View the patch from here
Then try install your version with the patch:
rvm install ruby-2.1.10 --patch https://gist.github.com/mislav/055441129184a1512bb5.txt
I had same issue, installing 2.1.10.
Solution that worked for me.
rvm get master
rvm reload
rvm pkg install openssl
rvm reinstall 2.2.10 --force -C --with-openssl-dir=$HOME/.rvm/usr

Can't update Ruby resulting in Rails error

I checked the list for http://railsapps.github.io/installrubyonrails-mac.html trying to reinstall Rails and have been trying to update it for the last 2+ hours.
This is what I get at the terminal:
Stevens-MBP:Desktop Steven$ rvm install ruby-2.3.1
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.3.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
==> Upgrading 1 outdated package, with result:
automake 1.15
Error: You must `brew link autoconf` before automake can be installed
Requirements installation failed with status: 1.
Here is additional information:
Stevens-MBP:Desktop Steven$ rails -v
Rails is not currently installed on this system. To get the latest version, simply type:
$ sudo gem install rails
You can then rerun your "rails" command.
Stevens-MBP:Desktop Steven$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin14.0]
Stevens-MBP:Desktop Steven$
When I type sudo gem install rails I get:
ERROR: Error installing rails:
activesupport requires Ruby version >= 2.2.2.
sudo gem install rails
Rule #1 when working with RVM (or rbenv) is do NOT use sudo except for multi-user installs (which are not encouraged by the maintainers).
By default, RVM and rbenv manage Rubies installed using them in a separate folder in your home directory where you already have full privileges to install/update/remove Rubies or gems. Use whichever manager you want to install/remove Ruby and set it as a default, then use gem install ... to install gems.
Using sudo changes your effective user to the sysadmin, which has a different idea where the RVM/rbenv managed Rubies and the associated gems live.
After issuing rvm install ruby-2.3.1 you should do
rvm use 2.3.1 --default
to tell RVM which Ruby you want to use.
rvm info will tell you what RVM knows about its world.
The error you get is probably because your vendor-installed version of Rails is out of date, and sudo is the root-cause of that occurring. Try gem install rails and you should be OK.
First upgrade ruby with rvm upgrade 2.1.2 2.3.1
That should do the trick if you have rvm installed correctly. Once it's done you can install rails with sudo gem install rails

The program 'gem' can be found in the following packages

I'm installing Ruby on Rails on Virtual Box/Ubuntu 13.10. Below are the steps
ruby -v
=> The program 'ruby' can be found in the following packages ... Try: sudo apt-get install
source /my account/...
==> Ok.
\curl -L https://get.rvm.io | bash
=> I've got a message thanking me for using RVM. In case of problems, I should consult their website or twitter.
rvm requirements
==> Requirments installation successful.
type rvm | head -n 1
==> rvm is a function
rvm list known
==> I get a list of ruby's versions
rvm install 2.0.0 -C --enable-shared, --with-openssl-dir=/usr/local
==> Install of ruby 2.0.0 complete. Please consider upgrading to ruby 2.1.0 ...
rvm list
==> rvm rubies
=* ruby-2.0.0-p353 [i686 ]
# => - current
# =* - current && default
# * - current
rvm use 2.0.0#railstutorial_rails_4_0 --create --default
==> ok.
rvm gemset list
==> gemsets for ruby-2.0.0-p353 ...
(default)
global
=> railstutorial_rails_4_0
gem -v
=> The program 'gem' can be found in the following packages:
ruby1.9.1
rubygems
try: sudo apt-get install
Why do I need to install ruby again? I thought I did so in step 7. I've gone over and over the same steps but I don't understand why it keeps telling me to install ruby again.
Thanks for helping
On your Terminal window go to Edit>Profile Preferences>Title and command, and check the box that says "Run command as a login shell". Restart your Terminal and try ruby -v and gem -v now. The versions should come up. If they don't then try re-installing them.
It sounds like the rvm ruby is not actually being used. If you run ruby -v, what do you get? I suspect it will be the message from the system about ruby being available in a package. Are you sure your $PATH is set correctly?
If you run /bin/bash --login and try again what happens?
check what rvm list returns.
I had multiple ruby versions installed but had not selected the ruby version to use.
I did rvm use <ruby_version> --default then ruby as well as gem command worked.

Ubuntu Installation Error

I had used below mentioned commands to install rails in ubuntu 12.10
sudo apt-get update
sudo apt-get install curl
\curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm requirements
rvm install 1.9.3
rvm use 1.9.3 --default
rvm rubygems current
gem install rails
Every steps are doing good, but it works for terminal which we are installing rails. If we exit from the terminal and work on a new terminal then the following error occurs.
The program 'rails' can be found in the following packages: * rails * ruby-railties-3.2 Try: sudo apt-get install
I came through a solution that whenever I open an terminal I would run these cmd
source ~/.rvm/scripts/rvm rvm --default use 1.9.3-p374
Can any one explain why these things happen??
Did you include the init script into your bash_profile/bashrc?
RVM installed by Ruby not working?
I've installed Rails 3.2.9 on my machine with RVM. You can follow this steps:
Install RVM : \curl -L https://get.rvm.io | bash -s stable
Reload shell configuration & test: source ~/.rvm/scripts/rvm
Install Ruby via RVM: rvm install 1.9.2 or rvm install 1.9.3
Choose version Ruby after install: rvm use 1.9.2 or rvm use 1.9.3
Ruby 1.9.2 and 1.9.3 support gem 1.8.25, so you'll install rails: gem install rails -v 3.2.9.
Done.
Note
Reload shell: source ~/.rvm/scripts/rvm and choose version Ruby rvm use 1.9.2 before work with projects.

cannot load such file -- openssl (LoadError)

In OS X in rvm how do I check if openssl is configured properly?
I get the cannot load such file -- openssl (LoadError)
And I have tried everything in Rails 3 - no such file to load -- openssl with no success.
Check what rubies are installed:
rvm list
Then make sure to use one of the installed rubies:
rvm use 1.9.3-p327
And test if openssl is available:
ruby -ropenssl -e "puts :OK"
It will print OK if openssl is enabled, otherwise you will get exception
In case of exception =>
UPDATE:
new version of rvm has improved automation support:
rvm get stable
rvm autolibs enable
rvm reinstall all --force
OLD:
run:
rvm requirements run force
rvm pkg remove
Followed by:
rvm reinstall all --force
This instruction is not OSX specific, it will work on all platforms, although on OSX it will work best with HomeBrew, when it's not installed only list of required software will be shown and you need to install it manually.
Many years later, the solution is changed because of brew upgrading, this works now:
# pull full brew git repo
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" fetch --unshallow
# generate new brew tap repo
brew tap-new $USER/old-openssl
# extract openssl 1.0.2t forumlar to $USER/old-openssl
brew extract --version=1.0.2t openssl $USER/old-openssl
# install old openssl from $USER/old-openssl repo
brew install openssl#1.0.2t
# reinstall ruby
rvm reinstall 2.3.4 --with-openssl-dir=`brew --prefix openssl#1.0.2t`
Try this.
rvm install ruby-2.0.0-preview1 --with-openssl-dir=$HOME/.rvm/usr --verify-downloads 1
This help me :
https://gist.github.com/Irio/1496746
$ rvm pkg install openssl
$ rvm remove 1.9.3
$ rvm install 1.9.3 --with-openssl-dir=$rvm_path/usr
I uninstalled everything (rvm, rails, ruby, etc) on my macbook.
Installed homebrew
Installed rvm
Ran rvm requirements run force
Ran rvm install rails
rails new sample_app
cd sample_app
Note: source 'https://rubygems.org' is present in Gemfile, openssl is required!
bundle install and it worked!
No need to specify: --with-openssl-dir=$HOME/.rvm/usr
To resolve this, install openssl (preferably using brew).
Update Xcode to the latest version and enable command line installations using it.
Reinstall rvm using
rvm reinstall all
Note that rvm reinstall all --force
will delete all your previous installations of binaries/pkgs done using rvm.
Assuming ruby is already installed, do the following:
rvm cleanup all
rvm reinstall all --force
I got the same error, and the error was fixed by opening new terminal session.
I am using frum ruby version manager.
gem install openssl
worked for me, but nothing has declared depending on the openssl, its weired
Following command solved my issue
note 2.3.4 is the ruby version I am using, change as per your requirements
rvm reinstall 2.3.4 --with-openssl-dir=$rvm_path/usr
Make sure that $rvm_path is properly set, with command echo $rvm_path. If this path is empty, check if your home folder has .rvm folder.
In this case use
rvm reinstall 2.3.4 --with-openssl-dir=~/.rvm/usr

Resources