wolfeidau / rake-bamboo-plugin

Plugin for bamboo which enables building of ruby projects using rake
Other
34 stars 16 forks source link

server capability detection on windows #81

Open gutierlf opened 9 years ago

gutierlf commented 9 years ago

Hi Mark,

I’m trying to test Bamboo for CI of a new Ruby on Rails project. I have an evaluation version of Bamboo installed on my Windows machine, and I’ve also added your rake-bamboo-plugin via the Atlassian Marketplace (their Answers site is in read-only mode right now, which is why I’m emailing you directly). I’m getting some errors when trying to detect my server capabilities.

I installed Ruby via the RubyInstaller, and I didn’t have JRuby installed (originally).

First, when WindowsRubyLocater.listRubyRuntimes() executed, the line rubyExecutables.addAll(detectExecutablesOnPath("ruby.exe")); executed fine, but the next line rubyExecutables.addAll(detectExecutablesOnPath("jruby.exe")); threw a PathNotFoundExeption.

I worked around this by installing JRuby. However, it would be nicer if the search for JRuby exited more gracefully to avoid this.

After getting JRuby installed, the executable detection lines ran successfully, and the execution continued to getting the Ruby version and the GemPathString.

For my original Ruby installation (installed on my machine at C:\row\Ruby200\bin\ruby.exe), the detection and parsing of the version number (final String rubyVersionString = getRubyVersionString(rubyExecutable); final String version = parseRubyVersionString(rubyVersionString);) executed successfully. However, the detection of the GemPathString failed with the following log message:

[WindowsRubyLocator] IO Exception occurred trying to build Ruby Runtime - Cannot run program "C:\row\Ruby200\bin\gem.bat": CreateProcess error=87, The parameter is incorrect

I Googled for this error, and the only thing I’ve been able to find is something about my CLASSPATH being too long. However, with that info, I don’t know how to proceed (I’m not a Java programmer).

Can you help?

Thanks, --Luis

wolfeidau commented 9 years ago

Gday Luis

Unfortunately I don't have a windows machine to test with at the moment.

My search unearthed this http://stackoverflow.com/questions/2893970/fail-to-launch-application-createprocess-error-87-cant-use-shorten-classpath/2894135#2894135 tidbit of information.

Maybe check that the machine your running on doesn't have some enormous CLASSPATH configured under system properties.

Windows is not the friendliest environment to run software under worst luck.

gutierlf commented 9 years ago

Hi Mark,

Thanks for writing back. From my earlier googling, I got the sense that the CLASSPATH was a java thing, which is why I asked you. Is that not right? Do you think it's a Windows environment variable (I'm not actually at my machine right now)?

--Luis

Sent from my mobile device

On Sep 4, 2014, at 6:01 PM, "Mark Wolfe" notifications@github.com<mailto:notifications@github.com> wrote:

Gday Luis

Unfortunately I don't have a windows machine to test with at the moment.

My search unearthed this http://stackoverflow.com/questions/2893970/fail-to-launch-application-createprocess-error-87-cant-use-shorten-classpath/2894135#2894135 tidbit of information.

Maybe check that the machine your running on doesn't have some enormous CLASSPATH configured under system properties.

Windows is not the friendliest environment to run software under worst luck.

— Reply to this email directly or view it on GitHubhttps://github.com/wolfeidau/rake-bamboo-plugin/issues/81#issuecomment-54551867.


The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.

gutierlf commented 9 years ago

Hi Mark,

I had a chance to check now, and I don't have any CLASSPATH environment variable defined. My googling gave me the impression that the CLASSPATH is a Java thing. Is it maybe created at runtime when Bamboo or your plugin is running? Do you know any other way around this issue?

Thanks again, --Luis

wolfeidau commented 9 years ago

To start with I would take my plugin out of the equation and just try running a simple batch file using bamboo. If this fails then you need to work out why either by asking Atlassian to assist or debugging it yourself.

Not a lot I can do to assist without the ability to reproduce the issue.

gutierlf commented 9 years ago

With that hint, I was able to use Bamboo with my new Rails project, but still without your plugin. Instead of using your plugin's functionality, I'm just running commands to the batch files (bundle.bat, rake.bat, rspec.bat) created by the RubyInstaller.