I tried to use a specific version for gem, as specified by Michael Hartl's ruby on rails tutorial.
I typed in $ gem update --system 1.8.24
but i got this output:
Latest version currently installed. Aborting.
How do I prevent this command from aborting? The tutorial notes that I must use the 1.8.24 version. Thanks!
We can user the following command to update the gem version.
gem update --system -v (version_number)
using this we can do downgrading the version also.
you might face issues when you downgrade from some random version. you have to update your rubygem to the latest version and then use
gem update --system version_number
To upgrade to the latest version, do
gem update --system
Related
I am trying to update a gem version to a particular version. But whenever I run command bundle update gem, it is updating the latest version of that gem.
Even on running command bundle update gem -v "x.x.x" it is still updating to the latest one.
Is there any way to update a gem version to a particular version?
In your Gemfile specify the gem version. For example:
gem "foo", "= 1.0.0"
then run bundle update foo
I'm start to learning Rails in freeCodeCamp.org on youtube. So im trying to install devise in rubygems.org
and i already pasted gem 'devise', '~> 4.7', '>= 4.7.3' in my Gemfile
and then when using bundle install
i saw this
Resolving dependencies....
responders-3.0.1 requires ruby version >= 2.4.0, which is incompatible with the
current version, ruby 2.3.3p222
so im trying to update my ruby by using rvm and following steps in wrvm.io
This's show up
BASH 3.2.25 required (you have 3.1.20(4)-release)
i dont know to update BASH version and ruby version as well.
To update, open a Bash on Ubuntu on Windows window, and enter the following commands,
To check your Ruby version before updating,
ruby -v
To update all of your local package repositories,
sudo apt-get update
To upgrade Bash,
sudo apt-get install --only-upgrade bash
To upgrade Ruby, the following guide should help you with this,
https://everydayrails.com/2017/12/18/ruby-upgrade-guide-for-rails.html
Currently I am having gem package manager version 2.0.14, I found it by running
gem -v
but how to downgrade the package manager to version 1.8.25. Every search attempt to find this leads me to, how to upgrading or downgrading a particular gem.
maybe you are referring to rvm?
rvm list
rvm use 2.0.0-p353 // just a sample version
Gem can be updated using:
gem update --system
or
sudo gem update --system
This may help you:
sudo gem update --system 1.8.25 # If you don't mention version then by default it will update with latest one
More information about downgrading/upgrading rubygems: http://rubygems.rubyforge.org/rubygems-update/UPGRADING_rdoc.html
This error appears for a new rails app, with nothing modified, when visiting the homepage (after successfully running bundle install).
Here are the version numbers:
ruby: 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin12.2.1]
rails: 3.2.12
rvm: 1.18.14
gem: 2.0.0
bundler: 1.3.0.pre.8
Calling which ruby returns /Users/J/.rvm/rubies/ruby-1.9.3-p392/bin/ruby, which seems fishy, right?
You need to update Bundler: gem update bundler
RubyGems release 2.0 seems to be the trigger for the error:
RubyGems 2.0 includes several new features and many breaking changes. Some of these changes will cause existing software to break. . . . If you are using bundler be sure to install a 1.3.0.prerelease version or newer. Older versions of bundler will not work with RubyGems 2.0.
Here are the issue details.
Thanks!
Rails-7, ruby 3.1.2, had the same issue
solved it by gem update --system
Run:
gem update --system 1.8.24
Sounds like there's something buggy with latest.
Have you tried updating your RubyGems?
gem update --system
gem update bundle && gem update --system
For me it was all of the above + using the new one on my nginx config.
recently i installed rails 2.3.5 using apt-get. After installing rails 3.0.1 the version shows on as rails 2.3.5 when i type rails -v command. How to change that? or can i update rails 2.3.5 to 3.0.1? pls help me out
You should NOT use apt to manage your rubies or your gems! (NEVER)
Use RVM to manage your Rubies and your gems : http://rvm.io/
Try gem uninstall rails then select version of rails gem which you want to remove.
You can follow the upgrade directions given at http://guides.rubyonrails.org/3_0_release_notes.html
to install Rails 3 use this script..
sudo gem install rails --pre
It's possible to control version of Rails
rails _2.3.8_ --version
rails _3.0.0.rc_ --version
Hope it'll work. For more details https://help.ubuntu.com/community/RubyOnRails#Installing_rails it's a best url
Oh, I got another solution. Try this script, it'll work
sudo gem install -v=3.0.1 rails --include-dependencies