cannot run ruby with aptana studio 3 on windows 7 - ruby

i'm new to ruby and am trying to get it to run on windows 7 using aptana studio 3. however, i an unable to run .rb programs due to 'lack of interpreter' as aptana is unable to find a ruby executable. i saved my program with .rb extension and looked for ways i could set a path to the ruby interpreter. there is no option to set up an interpreter for ruby in aptana preferences. am i missing something here?
i searched the web, but all i found was that the exact problem happened to people in linux. although it was solved, it was sovled in terms of linux and a windows user like me couldn't quite understand how the problem was fixed.
another search gave me a bit of info that aptana had changed and was no longer offering the same interpreter management environment as it did in previous versions:
https://aptanastudio.tenderapp.com/discussions/problems/1591-cant-choose-ruby-interpreter-in-ubuntuaptana-studio-3-beta
so i'm really stuck here. i really want to work with aptana since it's much easy on the eyes with it's dark theme. eclipse, not so. overall i'd really like to run ruby on aptana.

I had the same problem on Windows 7/Aptana Studio 3/Ruby 1.9.3.
One solution that worked for me was to run RubyInstaller as administrator. If you do not do this, the PATH environment variable does not get set, and the Aptana toolset does not seem to find ruby.
(This is using the RubyInstaller from http://rubyinstaller.org/.)
I guess that it might be possible just to set the PATH environment variable to point to the correct ruby binary, but I did not try this.

Related

Ruby for vscode without Gem and Ruby installed on the system

I am searching for simple Ruby gem that would be able to find definitions of methods.
First I installed this:
But it requires some gems(rubocop, ruby-debug-ide or solargraph) to be installed in order to work. It provides a lot of features as debugging etc, but I dont need them. I only want to be able to find methods definition.
I am using Vscode to access Rails project on network directory. So I don't want to install Ruby on my host OS (Windoiws 10 x64). Instead I provide a network directory to a guest Guiless Ubuntu (as Guest OS). The Rails server is run on the Ubuntu OS.
VSCode works perfectly well with network directories, but the extensions need Ruby environment that is pretty sad.
For example Sublime Text 3 does this painlessly and donesn't complain for gems. Even without having any Ruby stuff on the OS it is running on:
I want to stick with VSCode because it is the best I have used so far.
So the question is: Is there a Ruby extension for VSCODE that works without Ruby installed?
The only thing that can really parse Ruby is Ruby, so you need Ruby when working with Ruby code. Same goes for a lot of other languages in Visual Studio Code. Sublime provides a "good enough" reflector based on a very simplistic syntax parse. Visual Studio Code uses Solargraph which does way more.
If you don't like that requirement you can always use or write a different Ruby plugin that has no such dependencies. As someone who does a lot of Ruby work, though, the installation is a minor inconvenience for all the benefits it provides.
#Hairi have you tried the ruby-symbols extension?
https://github.com/rubyide/vscode-ruby/issues/40
Keyboard shortcut for Windows is Ctrl + Shift + O.
And for Macs, it's Cmd + Shift + O.

Not able to use the extensions on visual studio code

I want to use Visual Studio Code in Windows 10.
As a user of vim editor, I have been used to coding in way of vim.
So i want to install the amVim extension on Visual Studio Code.
Issue 1 :
it keep saying "installing" after i clicked "install".
Issue 2 :
Then i went to the github page of amVim and download the file and put it into .vscode/extensions/. However, when i started to use it to code, it showed many warning:
when i try to delete something:
command 'amVim.backspace' not found
when i try to escape the insert mode:
command 'amVim.escape' not found
it didn't work at all!
then i change to ubuntu and download the version for linux. it works well. i can download the extension.
how can i fix this problem with Windows ?
I have also been trying to use vscode but really like to input and edit using vim commands. I have tried at least three different vim emulators on vscode and have encountered the problem you describe as well as some more serious freezing problems. If I install either amVim or vimStyle, my entire system will block if it ever enters the suspend state. I did some anecdotal experimentation and if I disabled the the plugins my system would no longer freeze. I have been using the Vim plugin by vscodevim and so far things are stable. I did encounter the same error messages about backspace and other commands but only when I was on Ubuntu. It would seem to be early times for associating vscode with vim style input.

How can I prevent PATH errors while developing Ruby in Windows (7)? Am I doing something wrong?

It seems every week I have to clean up the environment variables, uninstall all gems (I've even memorized the one liner command by now) and reinstall Ruby, DevKit, Gems, Rails, Heroku, etc. Most of the time it works and it's ok for a few days, but it's not long before the "x is not recognized as an internal or external command" or "The native gem requires installed build tools" errors start creeping up, until development becomes impossible.
Surely this can't be normal, but as far as I know I'm not doing anything explicitly wrong. I do things the same way I used to do on my Mac, and it just worked. But I'm at the end of my rope with this OS.
Any ideas?
Really all you should need is to have the Ruby you're using's bin folder at the start of your PATH (start for safety sake). And make sure you don't have any others in there.
For the "requires installed build tools" I usually just add these to the system path, your equivalent:
C:\installs\devkit451\devkit451\bin;C:\installs\devkit451\devkit451\mingw\bin;
HTH.

Can't download python idle for Python 3.2.3 Windows 64 bit

I need a line by line debugger for Python. I thought I should start with idle. I went to python.org and downloaded Python 3.2.3 for 64 bit Windows. Most Python documentation states that all installations automatically download IDLE. I installed Python in c:\Python32. I don't see idle.exe or any folder named idle in this folder or any of its subfolders. I then searched Google and tried to see how I could download idle. It seems that there is no separate download for idle--or not one that matches 64 bit.
Can you recommend quickest solution?
Install a different version for Windows 64 bit(will this ruin my 3.2.3 installation?)
Give up on IDLE install a different IDE (tried PyScripter and couldn't figure out how to do line by line debugging in one step. PyScripter is far inferior to Visual Studio but it's free.) Tried pythonfiddle and couldn't figure out how to set breakpoints. Tried pythontutor and couldn't figure out how to set breakpoints.
ANSWER TO THIS QUESTION (I can't post this answer because of low reputation.)
Someone on www.udacity.com provided me with the answer! The answer was that you launch idle by typing pythonw c:\python32\lib\idlelib\idle.py
I would never have thought of this in a million years! I assumed that idle was an executable. Instead, it is a python script.
Also I learned that other versions of python don't ruin your installation, they just end up in a different folder.
I learned about Aptana studio with Pydev and Visual Studio 10 with Python from stack overflow. So I will try these idle applications if idle isn't working for me.

new python version, now cannot start idle

Have been running Python 2.7.2 for several months, was using the 32-bit version on my 64-bit computer.
Today ran the installer for 2.7.3, 64-bit. Now I cannot get idle to start. I see answers here for Python in program files, I am running Win7, and I believe the correct location for this machine is in C:\, not in program files. At least that is where I had 2.7.2 and it worked.
So trying
C:\Python27\Lib\idlelib\idle.py
or
C:\Python27\Lib\idlelib\idle.pyw
neither of those would open Idle. With the .py one a console window flashes open for a split second and disappears. On the .pyw one, nothing at all happens as far as I can see. And the pyw one says right on the screen in File Type: "no console"
The old shortcut in the Start menu, under properties says 'target: python 2.7.2', but I don't see a way to change the target.
Also tried opening from Powershell, command line, Python command line, run. None of those worked.
When I downloaded 2.7.3, it said it was overwriting the files in Python27.
Now uninstall offers two programs to uninstall: 2.7.3 and 2.7.2 , but as far as I can tell there is a single Python program on disk and that one thinks it is 2.7.3. I started to uninstall and try a fresh install, but thought I'd ask first rather than risk further screwing up my machine. Thanks in advance for any help. I did read and try to use all the answers in similar questions here on the site.
I ran in to this today. Basically there was already an older version installed and installing over it (I think it was 2.7.2) with 2.7.3 64 bit broke it bad.
At first the CLI python would work but IDLE refused to launch without even an error. Uninstalling/reinstalling did nothing several times, and the problems got weirder as it couldn't find the msi's it had just downloaded, etc. Then I noticed that it wasn't deleting everything in the Python27 folder.
Manually deleting the folder wasn't enough and I found that it was storing another folder under App Data\Roaming (Windows 7). Removing this one finally allowed the re-installation to work (and show up as a newly installed program instead of acting like it had always been there by not highlighting it).
I was about to give up on the 64 bit version and try the 32 but it seems like the Python uninstaller/installer aren't cleaning everything up properly file wise (if it were registry entries I'd still be digging).

Resources