If I upgrade my Ruby from 1.9.1 to 1.9.2, do I have to reinstall all my gems? - passenger

I'm particularly worried about whether I need to upgrade Passenger and recompile my Passenger apache module.

When upgrading I had to recompile my passenger apache module. I had quite a few issues but this post helped: http://www.prestonlee.com/2010/09/24/upgrading-from-ruby-1-9-1-to-ruby-1-9-2/

Related

Bundler version for Ruby 2.3.8?

I currently have 2 ruby versions, 2.5.5 and 2.3.8, I am managing them with rbenv, and for gems, I use bundler to manage my specific gem versions. I have an issue when I want to switch to a project that uses 2.3.8 or a version that has to do with Ruby version 2.3.
My question is how do I get bundler to run the command to bundle install interact with my 2.3 projects.
My current version of bundler is 2.0.2.
I have already tried installing a lower version of bundler of which the bundler website claims to interact with ruby version 2.3.
I thought that if I specified the command to run bundle _version_ install it would work, but it still gave me the response that it needed ruby version 2.5 for bundler to work.
Lots of help appreciated.
In some situations, isolation can help. I would like to recommend rvm (https://github.com/rvm/rvm) for managing ruby versions. This tool is very similar to rbenv but in comparison, it allows you to create gemsets which are kind of containers of gems for special purposes. For instance:
rvm install 2.5.5 --disable-binary
rvm use 2.5.5#name-of-gemset --create
gem install bundler
bundle install # inside your project folder with Gemfile
I think that you will not have problems with versions again.

Prevent bundler from upgrading gems

I'm working on a project and we've just updated bundler to version 1.7.0. There was a few days of trouble in getting all the gemfiles/gemfile.locks in a correct state, but I'm still having trouble with one issue in particular.
If there are differences in Gemfile.lock, I check it out, and then bundle so that I will have the gems in the Gemfile. However bundle seems to always auto-upgrade my gems. For example:
Installing multi_json 1.10.1 (was 1.9.2)
The rest of my team is using 1.9.2 - there's a dependency in another part of the application or...who knows. I should be using 1.9.2, but bundler consistently 'auto-upgrades' everytime i run bundle. Is there a way to prevent this behavior? I'm using RVM 1.25.23
Bundler 1.7.0 has some bugs which can result in unexpected gem updates. Please try upgrading to the latest version (1.7.2 at the time that I write this).
See:
https://github.com/bundler/bundler/issues/3136
https://github.com/bundler/bundler/issues/3142
https://github.com/bundler/bundler/issues/3149
Try:
bundle install --frozen
This should prevent bundler to update the Gemfile.lock.

How do I run boxen in Mavericks with rbenv installed?

I recently upgraded to Mac OS 10.9 and now I get this message when I run boxen:
Bundler is not compatible with Ruby 2.0 or Rubygems 2.0. Please
upgrade to Bundler 1.3 or higher. Can't bootstrap, dependencies are
outdated
I imagined that I could just set boxen's .ruby-version file to something like 1.8.7, but based on the message above, it still seems to be using Ruby 2.0.
How can I run boxen in Mavericks?
I ran into the exact same issue. The answer is actually deceptively simple. Since Mavericks now includes Ruby 2.0.0p247 and Rubygems 2.0.3, and you apparently upgraded, your system ruby will not find your bundler or ansi gems. So what you need to do is install both with your system ruby, as root.
sudo /usr/bin/gem install bundler
sudo /usr/bin/gem install ansi
Then just restart or terminal. You can now run boxen as you would normally. Also, in order not to keep old files lying around, you may want to cleanup /Library/Ruby/Gems/1.8/ because it will include your old installation of both bundler and ansi on a ruby and gem installation you no longer have.
Seems the problem is with bundler. Just try to update it.
gem install bundler
system ruby (now 2.0) needed an updated version of bundler. Currently, only a pre-release version is compatible with Mac OS 10.9. If gem install bundler complains that you need a newer version of Bundler, as above, try gem install bundler --pre. Also, you may need elevated privileges to install gems for your system's ruby.
I am still confused about why Boxen wants to use system ruby's bundler gem when a different ruby installation is defined by Boxen's rbenv config, but the problem has a working solution now.

How can I manage rubygems version with bundler?

I just started learning Ruby, and for my sandbox I use latest Rubygems version, according to examples and tutorials.
At the same time I have Redmine, which requires Rubygems 1.6.2.
To manage gem versions I use bundler, but can I use it to manage Rubygems version too?
I dont think so - I believe it uses your current rubygem from the environment.
However you can use rvm to manage the rubygems version, so if you install it and have a project specific gemset in your .rvmrc file.
I think rvm is OSX/unix only - there is an alternative for Windows I believe.

Bundler throws uninitialized constant Gem::SilentUI (NameError) error after upgrading to Rubygems 1.5.0

I ran gem update --system to update to Rubygems 1.5.0 and after every time I run any bundle commands I get:
rvm/gems/ruby-1.8.7-p249/gems/bundler-1.0.9/lib/bundler/ui.rb:56: uninitialized constant Gem::SilentUI (NameError)
Has anyone else had this issue?
Update to bundler 1.0.10 or above (gem update bundler). The issue is fixed in later versions.
If you're a bit vague on what bundler actually is and don't want to learn then the very short answer to the question is:
gem install bundler
This was posted on the issue tracker, by my count, 6 times now.
Here's the one that I've been linking everybody to: https://github.com/carlhuda/bundler/issues/issue/995
Re: "just Update to bundler 1.0.10." — Note that you can't necessarily get the new version simply by doing
sudo gem update
You'll need to fully uninstall your current bundler, ignore the warnings about the dependencies it breaks, and then re-install it. That fixed my Bundler 1.0.7 and got my system working again.
It looks like RubyGems 1.5.0, which just came out today, is incompatible with Bundler 1.0.9.
You'll probably want to downgrade back to RubyGems 1.4 until an update is released for Bundler (which will likely be very, very soon).
Update: Bundler 1.0.10 is out now.
You can also downgrade Rubygems, however this is less than ideal, but for legacy systems if you need a specific bundler version you will have to do this.
For example on the app I am working on at the moment we are using:
Ruby 1.8.6-p383
RubyGems 1.3.6
Bundler 0.9.26
Note that if you're using rvm, you may not be able to upgrade bundler yourself. You may need to upgrade rvm in order to update bundler, since rvm integrates bundler pretty tightly. I got this error, tried to upgrade bundler, couldn't, and upgrading rvm fixed my problem.

Resources