How to handle deprecated gem warning (SourceIndex#all_gems)?
I got the same errors for a bunch of my gems in a non-Rails environment when I upgraded to rubygems 1.8.0. I got the warnings any time rubygems is required. Looking around the 'Net, it seems like it might be a problem also with rubygems 1.7.x, but I never had one of those versions installed so I'm not sure. I fixed this by running:
gem pristine --all --no-extensions
I had to run it a few times - it kept erroring out (but usually not in the same place from run to run). Eventually it got far enough that it had addressed the majority of my gems.
There were a few gems that didn't get their specifications regenerated correctly (json and sequel, specifically in my case) because they needed to build an extension. (The gem command output indicated it was skipping them, though it was easy to miss that message amidst all the deprecation warnings.) For those gems, I uninstalled them and then reinstalled them again (they'd previously been installed by bundler in rubygems 1.5.x) and that fixed the remaining warnings. It may be that I could have started with that plan of attack originally, but I didn't try.
Getting an error when trying to run rake db:migrate
Check what versions of rails you have installed:
$ gem list rails
*** LOCAL GEMS ***
rails (3.2.3, 2.3.14)
You should have multiple of them like I do here 3.2.3 and 2.3.14
afterwards uninstall the ones you dont need with:
$ gem uninstall rails -v2.3.14
Remove executables:
rails
in addition to the gem? [Yn] Y
Removing rails
Successfully uninstalled rails-2.3.14
at the end you should have just one version of rails:
$ gem list rails
*** LOCAL GEMS ***
rails (3.2.3)
Rails is Nuked - How to Reinstall
The difficulty here is likely bundler doesn't realize all these gems are gone. Try going into your Rails directory and doing 'bundle install'; this should result in all your gems returning.
Why would an app run fine in the system environment, but not under RVM?
Yes, RubyGems has had a very fast development pace lately and is not completely backwards compatible. Try:
gem install rubygems -v 1.3.7
You may have to clear out the gemset to reinstall rubygems...
If you're using rvm, you can change the version of RubyGems with the following command:
rvm rubygems 1.3.7
Error while running an rails application from command prompt
As the error message says:
For information about OpenSSL certificates, see bit.ly/ruby-ssl.
bit.ly/ruby-ssl points to http://railsapps.github.io/openssl-certificate-verify-failed.html which has the explanation for what is happening, and suggestions on how to fix it.
Changing https
to http
in source 'http://rubygems.org'
is one of the recommended workarounds.
There is a windows specific solution at the bottom which recommends downloading a cacert.pem for RailsInstaller
Related Topics
In Rails - Is There a Rails Method to Convert Newlines to <Br>
How to Change All the Keys of a Hash by a New Set of Given Keys
How to Find the Namespace/Module Name Programmatically in Ruby on Rails
Irb History Not Working with Ruby 2.3.0
3 Equals or Case Equality Operator
How to Map/Collect with Index in Ruby
How to Merge Two Hashes Without Overwritten Duplicate Keys in Ruby
Create_Or_Update Method in Rails
How to Get the Current Time as 13-Digit Integer in Ruby
Guard with Rspec on Rails 4 Giving a Lot of Warnings
How to Automate Chrome Request Blocking Using Selenium-Webdriver for Ruby
When Would a Ruby Flip-Flop Be Useful
In 'Require': No Such File to Load -- Iconv (Loaderror)