Interesting infographic about ruby, rails, gems etc from New Relic:
http://blog.newrelic.com/wp-content/uploads/Ruby-State-of-the-Stack-Infographic_2013.jpg
Interesting infographic about ruby, rails, gems etc from New Relic:
http://blog.newrelic.com/wp-content/uploads/Ruby-State-of-the-Stack-Infographic_2013.jpg
Problem
You would like to upgrade your rubygems version from 1.8.17 to the latest version 2.0.7 for example.
Solution
You can upgrade to a specific or the latest gem version and relate that to a specific rvm ruby that you have installed.
So if for example you have ruby-1.9.3-p327 and ruby-2.0.0-p247, you can have different gem version (or the same if you want) for each ruby version.
To upgrade to the latest one in the ruby-2.0.0-p247 for example you could do the following:
rvm list rvm use ruby-1.9.3-p327 gem -version 1.8.17 rvm use ruby-2.0.0-p247 gem --version 1.8.17 gem update --system gem --version 2.0.7 rvm use ruby-1.9.3-p327 gem --version 1.8.17
Problem
After the announcements in the previous posts about the security vulnerabilities in Rails 3.0.3, you would like to update your application and deploy with the latest 3.0.4 version.
Solution
gem 'rails', '3.0.3'
gem 'rails', '3.0.4'
bundle update rails
git status
git rm name_of_3.0.3_gem
git add vendor/cache
git commit vendor/cache -m 'upgrade to rails 3.0.4'
git commit Gemfile Gemfile.lock -m 'update Gemfiles to use 3.0.4'
You have modified your Gemfile in development but did not check the resulting snapshot (Gemfile.lock) into version control
git push
cap deploy
Problem
You want to deploy to a shared host (dreamhost) that has a later version of rails from the one you have developed your application.
You also have a later version installed in your development pc,and using rake rails:freeze:gems uses the latest one and not the one you want.
Solution
Use the following to freeze the specific version you want, and by using your gems you have installed:
rake rails:freeze:gems VERSION=2.3.2
Problem
Your host (ie dreamhost) for deploying applications doesn’t have the gems you are using in your development.
Solution
After freezing your rails gems with rake rails:freeze:gems, freeze the rest of your gems, not with rake gems:freeze gem=GEM_NAME, as used in previous versions of rails, but with:
rake gems:unpack