I’ve just successfully compiled Ruby 1.9 under Cygwin (which was
surprisingly easy). Is there a (simple) way to allow 1.8 and 1.9 to
co-exist, allowing me to switch between them at will?
Thanks
Cliff
I’ve just successfully compiled Ruby 1.9 under Cygwin (which was
surprisingly easy). Is there a (simple) way to allow 1.8 and 1.9 to
co-exist, allowing me to switch between them at will?
Thanks
Cliff
On Aug 31, 2007, at 10:52 PM, Cliff R. wrote:
I’ve just successfully compiled Ruby 1.9 under Cygwin (which was
surprisingly easy). Is there a (simple) way to allow 1.8 and 1.9 to
co-exist, allowing me to switch between them at will?Thanks
Cliff
create an alias or symlink for at least one of them and have them in
different directories
If you create a symlink for 1.9 called ruby19 you can call the 1.9
interpreter with
ruby19 script_name.rb
Likewise you could create ruby18 for 1.8
That’s the easiest way to do it, and common with other software such
as PHP 4 or 5 on the same system.
Usually, people leave one of the two installations as the default
with simply PHP
you can do this with Ruby too.
With Ruby Gems you might run into some trouble though.
create an alias or symlink for at least one of them and have them in
different directories
If you create a symlink for 1.9 called ruby19 you can call the 1.9
interpreter with
ruby19 script_name.rb
Thanks, I figured the ruby interpreter itself might be as easy as that.
With Ruby Gems you might run into some trouble though.
Buut yes, this is where I thought I may come unstuck
Any thoughts?
Cliff
With Ruby Gems you might run into some trouble though.
Buut yes, this is where I thought I may come unstuck
Any thoughts?
Cliff
Well, number 1, I’ve never actually used or installed 1.9 yet, no
hurry for me.
So I don’t know if the load path is any different or things like the
gem path. I imagine that when you do the installation of rubygems,
you can alias it as well, so that you call gem19 or something and set
your gem_path to be for 1.9’s gem directory (wherever that is,
probably similar to 1.8, but I don’t know)
(If I were you I’d keep 1.8 stuff unaliased and normal for now)
Now here’s the trick… when you install any command line software in
a custom manner, it becomes very tricky for things installed on top
of that. (3rd party software) Other stuff may make stupid (?)
assumptions about your installation.
So here I’ve thought of a better way to do this.
You’re using CygWin so I’m assuming it’s windows and I don’t know
much about this on windows, but you might try creating another user
account in windows, and install everything for ruby 1.9 under that
instead. if it works, you can totally avoid all the fragile custom
installation stuff. Just a logout / login away.
So here I’ve thought of a better way to do this.
You’re using CygWin so I’m assuming it’s windows and I don’t know
much about this on windows, but you might try creating another user
account in windows, and install everything for ruby 1.9 under that
instead. if it works, you can totally avoid all the fragile custom
installation stuff. Just a logout / login away.
That wouldn’t really work for a number of reasons. Firstly because
things like Ruby and Cygwin are installed globally, not on a per-user
basis - so I wouldn’t actually gain anything by switching user
accounts. Secondly because my development environment exists under my
user account, so switching users would kinda cripple me
There must be a simple way to do this. I’ll try fiddling with things
like the gem path. As you say, things make assumptions, and this is
what I’m afraid of - I don’t want to hose my existing Ruby.
Cliff
Hmm… on *nix, things like this are not necessarily global, but per
user.
You normally install things in /usr/local or a subdirectory of that,
pretty instantly allowing each user to have a custom setup from there
or from their shell login script. I know that Windows (not 95 or 98)
has some unix-like features here and there, but I don’t know how much
in the users/accounts area.
Yep, I’m a pretty experienced Linux/BSD user - but my options are
pretty much limited to Windows or Mac, since I use a hefty array of
Adobe products in my work too. I’m looking to buy myself a Mac in the
next few weeks, but for now I’m unfortunately stuck with Windows - and
Cygwin is as close to sanity as I can get here
Cygwin is a *nix-like environment so I thought it might be possible
from there…
It may be possible by setting the PREFIX variable on compilation, but
again as you say things make assumptions, so I still can’t guarantee
the safety of my current Ruby installation.
I guess I’ll keep playing until I find something that works for me,
thanks
On Sep 1, 2007, at 8:32 AM, Cliff R. wrote:
accounts. Secondly because my development environment exists under my
user account, so switching users would kinda cripple meThere must be a simple way to do this. I’ll try fiddling with things
like the gem path. As you say, things make assumptions, and this is
what I’m afraid of - I don’t want to hose my existing Ruby.Cliff
Hmm… on *nix, things like this are not necessarily global, but per
user.
You normally install things in /usr/local or a subdirectory of that,
pretty instantly allowing each user to have a custom setup from there
or from their shell login script. I know that Windows (not 95 or 98)
has some unix-like features here and there, but I don’t know how much
in the users/accounts area.
Cygwin is a *nix-like environment so I thought it might be possible
from there…
Hate to say this, because I don’t like to be an OS basher too much,
but maybe you should get an install of Linux to boot into, or go out
and buy a cheapo second hand pc or year old model or something just
for Linux/Unix installation?
You wouldn’t need tons of HD or RAM or graphics ability, just an
internet capable machine.
This wouldn’t help for testing 1.9 on windows though.
Maybe somebody else knows a solution…?
On Friday 31 August 2007 08:52:31 pm Cliff R. wrote:
I’ve just successfully compiled Ruby 1.9 under Cygwin (which was
surprisingly easy). Is there a (simple) way to allow 1.8 and 1.9 to
co-exist, allowing me to switch between them at will?Thanks
Cliff
When you configure ruby 1.9, use the flag `–program-suffix=19’ and all
binaries (ruby, irb, etc) will be suffixed with ‘19’ (ruby19, irb19,
etc).
On 8/31/07, Cliff R. [email protected] wrote:
I’ve just successfully compiled Ruby 1.9 under Cygwin (which was
surprisingly easy). Is there a (simple) way to allow 1.8 and 1.9 to
co-exist, allowing me to switch between them at will?Thanks
Cliff
This is how I would switch between different ruby versions under
Windows:
When you configure ruby 1.9, use the flag `–program-suffix=19’ and all
binaries (ruby, irb, etc) will be suffixed with ‘19’ (ruby19, irb19, etc).
Now that indeed, is what I’m talking about
I can’t believe I missed that. Thanks!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs