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?
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.
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
> 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.
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.
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.
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.
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
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.