Moving a 1.8.6 install?

Is it possible to move the gems from a Ruby 1.8.6 install on an (old)
server to a new server? I've installed Ruby 1.8.6 on the new server but
can't install gems apparently because the gem updater is too old (from
what I've read). But to update the gem installer apparently requires
ruby 1.8.7 (which is currently not working well with my Rails app --
hence the need to stay with 1.8.6 for now). It seems I'm in a catch-22.

I tried copying the entire "gems" folder (cache and all) from the old
server to the new server, but this apparently does not work as I
thought.

Is there perhaps some minor tweak or additional file(s) that I should
copy from the old server?

Thanks in advance,
Rog

···

--
Posted via http://www.ruby-forum.com/.

could you give me a reason why you use 1.8.6? you should update to 1.8.7
or 1.9.2

···

--
Posted via http://www.ruby-forum.com/.

1) What makes you think it didn't work?

2) Can you just vendor the gems on the old server or from your own
    development environment?

3) Why not just install RVM on the server? That'll make it easier to
     work on upgrading the app, and will probably take care of your
     problem installing gems.

2 and 3 aren't mutually exclusive, of course...

···

On Fri, Jul 15, 2011 at 12:27 PM, Roggie Boone <rogboone@yahoo.com> wrote:

I tried copying the entire "gems" folder (cache and all) from the old
server to the new server, but this apparently does not work as I
thought.

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

I tried copying the entire "gems" folder (cache and all) from the
old server to the new server, but this apparently does not work
as I thought.

But gems are just ruby files too. setup.rb can also install them...

Perhaps try to use RVM for an upgrade.

Also, you should provide a list here with all the gems you want to
update and migrate, you didn't do so yet. :slight_smile:

···

--
Posted via http://www.ruby-forum.com/\.

I believe that was already explained: a Rails application depends on
1.8.6, and has yet to be made compatible to later versions of Ruby. I'm
sure the intention is to make it compatible with a later version, but to
ensure that it still works (thus requiring 1.8.6) until updating the
Rails appliction is completed.

···

On Sat, Jul 16, 2011 at 04:33:20AM +0900, Hans Mackowiak wrote:

could you give me a reason why you use 1.8.6? you should update to 1.8.7
or 1.9.2

--
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]

> I tried copying the entire "gems" folder (cache and all) from the old
> server to the new server, but this apparently does not work as I
> thought.

1) What makes you think it didn't work?

2) Can you just vendor the gems on the old server or from your own
   development environment?

This is probably the best solution.

3) Why not just install RVM on the server? That'll make it easier to
    work on upgrading the app, and will probably take care of your
    problem installing gems.

1.8.6 doesn't seem to work with Rubygems anymore:

$ ruby -v
ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-darwin9.6.0]

$ gem -v
1.3.5

$ gem update --system
Updating RubyGems
Updating rubygems-update
ERROR: Error installing rubygems-update:
    rubygems-update requires Ruby version >= 1.8.7
ERROR: While executing gem ... (NoMethodError)
    undefined method `version' for nil:NilClass

···

On Fri, Jul 15, 2011 at 2:52 PM, Hassan Schroeder < hassan.schroeder@gmail.com> wrote:

On Fri, Jul 15, 2011 at 12:27 PM, Roggie Boone <rogboone@yahoo.com> wrote:

Yeah, I was imagining a slightly more Byzantine barn dance of using
1.8.7 to create a gemset of the required 1.8.6-compatible whatevers
at the appropriate versions and then copying that gemset over to use
with 1.8.6.

Untested, but there might be a pony in there somewhere.

···

On Fri, Jul 15, 2011 at 1:36 PM, Josh Cheek <josh.cheek@gmail.com> wrote:

3) Why not just install RVM on the server? That'll make it easier to
work on upgrading the app, and will probably take care of your
problem installing gems.

1.8.6 doesn't seem to work with Rubygems anymore:

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

twitter: @hassan

I've not tested this with your versions of Ruby + gems, so +luck!
It is a minimal intrusion to versions and config.

Find the directory the gems are in.
tar it up for backup purposes.

Copy your Ruby application to new server.
Install Ruby 1.8.6 on new server.
copy gem tar to (adjacent) (new) machine/directory.
un-tar the gem dir.
set, export $GEM_HOME in bash before Rails app starts to new gem dir.
(Check $ vars for any other relevant settings.)
Light the blue-touch paper.

MarkT

Thanks for the replies. I've been out sick and haven't been able to
work with this too much. I did install rvm and used it to install ruby
1.8.6. I then did "gem install rubygems-update --version "1.4.1" (to
get a gem installer that didn't require ruby 1.8.7) and from there, I
*think* I've got a workable ruby and gem set for my rails apps. I'm
still testing it though.

Rog

···

--
Posted via http://www.ruby-forum.com/.

If you're using a version of Rails that supports Bundler (Rails >= 2.3, may
work with earlier versions but it's untested), you can use "bundle package"
to automate packing the gems into vendor/cache

More info: Gem Bundler – Manage your Ruby gems

···

On Mon, Jul 18, 2011 at 5:32 AM, Roggie Boone <rogboone@yahoo.com> wrote:

Thanks for the replies. I've been out sick and haven't been able to
work with this too much. I did install rvm and used it to install ruby
1.8.6. I then did "gem install rubygems-update --version "1.4.1" (to
get a gem installer that didn't require ruby 1.8.7) and from there, I
*think* I've got a workable ruby and gem set for my rails apps. I'm
still testing it though.

Rog

--
Posted via http://www.ruby-forum.com/\.