Ruby and JRuby on the same Windows 7 machine - ruby

Can I have Ruby and JRuby on the same Windows 7 machine without running into problems?
As I know both of them are tending to be registered in PATH.

I think pik might allow this:
https://github.com/vertiginous/pik
If that doesn't work you might want to look at running a linux instance inside a virtual machine and using rvm or rbenv.

Related

How to access ruby from Ubuntu bash for windows

I started ROR development on windows using Ubuntu bash. For now it was going well but when i tried to debug ruby on window using Rubymine it said no ruby SDK specified. How can i access the ruby sdk from ubuntu bash?
In resume: maybe Rubymine is a windows-program which is not aware of the ruby (ROR) environment installed inside the windows10-WSL.
In more detail: before windows10 (with winxp, win7, etc) ubuntu and linux programs could not be installed inside windows. So in those cases, if you needed to use a linux program, you could download virtualbox, create a separate VirtualMAchine, install there your Ubuntu and then inside install the ubuntu programs (Ruby, ROR, etc)
With windows10, there is a new feature called WSL - Windows Subsystem for Linux, which allows a ubuntu system to be installed inside window. It uses some hidden virtualization/conversion to make it transparent for the user, and so any ubunut command can be run from the windows-console, without VirtualBox nor VirtualMachine - its looks as if windows could execute linux programs natively (but its just an ilusion though)
It looks like you installed ROR in the WSL-Ubuntu. And then installed RubyMine on windows. And then Rubymine tried to find the ROR-things in the windows directories but it did not found any. I guess its because Rubymine is not prepared to search within the WSL-Ubuntu for the ROR-things and so fails.
My second guess, is that the easiest solution could be to avoid using WSL-Ubuntu (as other programs wont be ready for it - currently it looks more of an experiment, not a real stable standard). And instead, try to do it all inside a Virtual-Box VirtualMachine, where you install ubuntu, all the programs you want (and they will run fine there), and avoid the WSL-mix. Even if this way requires a bit more work in the start - to prepare the VirtualBox and VM with ubuntu (youtube has many tutorials for this) - it will definitely save you time/headaches in the long-run when you need to install additional library/program/gem for your ROR environment

Install Ruby 2.3.2 on Windows 10

I have an old Ruby 2.3.2 app I've been asked to help maintain on Windows 10. RubyInstaller (https://rubyinstaller.org/downloads/archives/) would normally be great, but it seems like 2.3.2 was not ported over.
Since RubyInstaller was not an option, installing RVM on the Windows Subsystem for Linux was the next option. While this sometimes works, it has issues with our VPN pretty regularly, which seems like a recurring issue with WSL (https://github.com/Microsoft/WSL/issues/1350 && https://github.com/Microsoft/WSL/issues/416).
Is there a way to convert any of the 2.3.2 builds (https://www.ruby-lang.org/en/news/2016/11/15/ruby-2-3-2-released/) to run on windows?

How to install Ruby with rvm on Windows 10 with Cygwin64 Terminal?

I have been trying to install Ruby on a Windows 10 using the Cygwin64 Terminal so that I can us RVM to manage my Ruby version and gems. This is a first time install so I do not have any Ruby currently. Every time I try to run rvm install 2.1.7 the process errors out on compiling. Below is a screen shot of the terminal window:
enter image description here
Edit: Nowadays (2021) the best way to go is not to use Cygwin but rather WSL2. Then you have plenty of tools since you basically have a Linux install. rvm, rbenv or asdf should be able to do the job.
Old answer:
Best way is to use RailsInstaller. It handles most dependencies for you. I wouldn't mess around with RVM in Windows, AFAICT you will have issues along the road trying to use it on a non-UNIX environment.

Program added to path but cmd not recognizing/finding it (ruby version manager for windows)

I've installed pik in a windows machine so I can manage my ruby versions I also added the path to the PATH variable, but pik is not being recognized, I also created an alias but that just results in an error when it's used but the program runs fine when I run it directly ("C:\ruby_bin\pik").
What is going on?
p.s. ruby is installed in "C:\ruby", just so you know.
In the end I used the windows installer and that worked, don't know why it worked over the ruby gem version but whatever, so lesson for the future, just use the windows installer.

How can I download Ruby gems without installing them or Ruby?

I'm working from a Windows machine I can't install anything on, and am trying to get the Ruby gems for a Linux machine not connected to the internet. The Windows machine does not have Ruby on it, only the Linux machine.
How can I get the needed gems for the Linux machine?
You can download them from https://rubygems.org/ on the Windows machine.
You can transfer them to the Linux machine via USB or similar.

Resources