Ruby IDE and the Ruby Version Manager - ruby

I am trying to use either Aptana or RubyMine. I am using RVM so I can have multiple versions Ruby at once, but when I am starting a new project in either of them I get the 1.8.7, which is not what I want to use. I have installed the latest 1.9.2 and it is this version that I want to use, how do I manage that? (I have set the 1.9.2 as default in command line)

In RubyMine you can choose your Ruby version in the menu Preferences -> Ruby SDK and Gems.
In RubyMine 4, Preferences has been changed to File -> Settings...

Related

Unable to install and use Ruby plug-in on IntelliJ for Mac

I am unable to get IntelliJ to list and recognize Ruby projects. I'm using a Mac (High Sierra). Ruby was installed using RVM.
After I installed the Ruby plug-in, the plug-ins tab under Preferences shows the Ruby plug-in in red (any idea why?). According to the download page, the version of the plugin I downloaded matches the version of IntelliJ I'm running.
Even then, when I try to create a new project, Ruby isn't listed as part of the options.
The Ruby plugin requires IntelliJ IDEA Ultimate (Community Edition is being used)

What's a proper way to install Ruby <1.9.3 on OS X Lion with Xcode 4.3?

Until recently I used to have Xcode 4.2 with the osx-gcc-installer installed on top of it, which worked quite well for older versions of Ruby.
The thing is, that now that I installed Xcode 4.3 with the command line tools (for homebrew), I found that I don't have gcc-4.2 on my system.
From what I was able to find, the usual way to install pre 1.9.3 is to either get an older version of Xcode, or using the osx-gcc-installer. I also found a warning saying that if I install osx-gcc-installer over Xcode 4.3, it will cause problems with node.js.
As I'm currently doing both iOS and node.js development alongside Ruby, I can't really do any of these things. Which means I can only work with 1.9.3, which is the only Ruby version that can be compiled with LLVM.
Is there a clean way to install any older version of Ruby without sacrificing Xcode 4.3? The solution that comes to my mind is having gcc-4.2 in some kind of non-system-wide sandbox and specify it's path when installing Ruby, but I'm not really sure how to do this properly.
Update:
See this link for the process required to get GCC-4.2 onto a machine with Xcode 4.3 without overwriting other components.
Xcode 4.3, Homebrew, and Ruby
It will obviate the need for the instructions below:
RVM should work if you set the default compiler for RVM to gcc. Place this in your .bashrc or .zshrc.
export CC=/usr/bin/gcc-4.2
RVM should then use GCC to compile.
If you don't want to have CC set permanently then you could try installing with:
CC=/usr/bin/gcc-4.2 rvm install 1.8.7

debugging ruby with eclipse dltk

I'm trying to debug ruby scripts with eclipse helios (dltk installed) on a win7 x64 machine and ruby1.92 environment
I installed ruby-debug19, ruby-debug-base19, ruby-debug-ide19 gems but still can't debug rb scripts with eclipse dlt it says following,
Debugging Engine not started
The 'Fast Ruby Debugger (ruby-debug)' is selected, but the 'ruby-debug' gem doesn't seem to be installed in the selected Ruby Interpreter (C:\Ruby192\bin\ruby.exe)
I also added c:\Ruby192\lib\ruby\gems folder to system library paths of ruby interpreter settings in eclipse.
Any ideas?
Try setting the GEM_HOME and GEM_PATH environment variables on your machine.
It's just what I've been told by my programming-prof., but he told me there is acutally no way to use the debugger for Ruby > 1.8. So, maybe, if Ruby 1.8 suits for your requirements, you could use the 1.8 interpreter for debugging.

ruby of support in vim on windows

I am new to vim and would like to configure command-t plugin to work in vim 7.3. It says it doesn't have ruby support. Is there any way to configure vim to have ruby support on windows 7?
I think you need to compile vim with --enable-rubyinterp flag.
Check if vim has support for ruby using :version in vi.
If that shows -ruby (no ruby support) then you will have to compile from vim source or fetch an installer which was compiled that way.
I guess that your problem is that you do not have ruby installed and that plug-in need it. Try installing ruby:
http://rubyinstaller.org/
You can't configure vim to have ruby support (as in checking a box or changing an option). You have to download a distribution of vim with ruby support or download the sources and compile it yourself. Type
vim --version
If it says "-ruby" then you need to install a different vim version that has it supported (+ruby).
You can follow the step-by-step here: My own post or Official doc installation

Install Ruby support for VIM on Mac OS X

Mac OS X 10.6 (Snow Leopard) has VIM pre-installed (version 7.2), which is great.
It also has Ruby pre-installed (version 1.8.7) which is great too.
However, I want Ruby autocompletion in VIM. Looking up the VIM version (vim --version) shows -ruby (i.e. ruby support isn't enabled).
How to enable ruby for my VIM installation?
While it's possible to build and install your own Vim to replace the pre-installed version, I don't recommend it. It's far easier to just use MacVim instead:
http://code.google.com/p/macvim/
MacVim is a very Mac-friendly version of Vim, and it's got Ruby support already built in. It can be used as both a GUI and Terminal application. (Check out :help macvim-start from within MacVim for details.)
+1 for MacVim - I also use it and love it.
But if you want a fresh vim compiled with ruby support, you can build one from scratch on OSX by following this article:
http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/
Only took me about 5 minutes to do...

Resources