I installed RadRails as a plugin to eclipse, and I set the interpreter to C:\ruby, the location of my ruby installation. I've also installed RubyGems 1.3.5 via the ruby setup.rb script.
When I run the following, however, I get syntax errors in eclipse, although running works.
test = {
raw: '1',
symbols: '2'
}
p test
Furthermore, when I start eclipse, a prompt asks me to install a number of gems. When I continue, I receive a number of unexpected tCONSTANT, expecting $end errors. Has anyone run into this, and is there a viable solution?
Assuming you've installed the latest version of RadRails, it seems as if 1.9 is not yet supported.
The quick and easy solution is to not use Eclipse and RadRails. Personally, the only Windows IDE I've been remotely pleased with is RubyMine. If you're on a Mac, the choice is much simpler: TextMate.
Related
As a proof of concept, I successfully built a local Jenkins server on my MacBook (MacOS is Catalina) and the pipeline uses Fastlane scripts to clone, build, and distribute successfully.
Now, I have a Mac Server in our Data Center and I completed the same build-out and installed Jenkins. When I run the same pipeline, it fails, so I tried executing from the command line and it fails with this error:
google-api-client-0.38.0 requires ruby version ~> 2.4
Apparently, my install used ruby 3.0, so I followed recommendations to install rbenv and down level to 2.4. the installers were successful, but still the problem persists and uses ruby 3.0. The paths defined in my profiles look correct.
There are two key differences between my local server and the server in the data center that I can think of that may be influencing this problem:
My MacBook was upgraded to Catalina where the DataCenter iMac was built factory-fresh with Catalina. Note that an Apple version of ruby is installed with Catalina.
I do not have Xcode installed, only the CLI xcode-select version 2373; I would like to keep the IDEs off of this server, so there isn't a temptation to fix code on this dedicated Jenkins server.
Any recommendations to further troubleshoot this installation?
First, you probably will have to install Xcode, to use all of its tools (the CLI won't cut it). I recommend xcode-install to manage xcode versions via CLI. That is one key difference in your setup.
However, there're probably shenanigans with your $PATH environment within Jenkins. From what I understood from your description, you were able to run fastlane normally by invoking it via Terminal, but it won't work in Jenkins, is that right? Check the $PATH in Jenkins and make sure it matches the $PATH in your Terminal. rbenv and other ruby version managers require you to execute some startup code (e.g. eval "$(rbenv init -)" in case of rbenv) before being able to use it, and then setting up the right $PATH is required to make everything work as expected (i.e. have it point at Ruby 2.4 instead of 3.0).
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.
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.
I recently used Rubyinstaller to install Ruby 2.0. I installed Bundler and Pry via rubygems. Pry does no highlighting whatsoever. During a pry session, everything is the same default grey.
I also have 1.9.3p392 installed with Pry 0.9.12. That works fine if I go in the start menu, and click "Start Command Prompt With Ruby (1.9.3)", then a Pry session that I began that way properly highlights.
If I use the "Start Command Prompt With Ruby" (The 2.0.0 version), then a pry session initiated in that has no syntax highlighting. The same result occurs when using cmd.exe, and the Powershell.
I know the snarky, unhelpful answer is just use POSIX-type OS, but this is on my work computer and I can't change that.
Thanks for any help,
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.