drscream / bamboozled-ruby-plugin

Bamboozled Ruby Plugin for Atlassian Bamboo continuous integration/continuous deployment
Other
24 stars 9 forks source link

"Unable to locate Runtime Manager installation" doesn't describe the error well enough to diagnose what the problem could be #11

Closed hakanai closed 8 years ago

hakanai commented 8 years ago

I configured my Bamboo instance as follows:

Server capabilities:

Direct support for rbenv would have been nice (then it could populate the list of versions automatically, which would be nice), but at least it was possible to configure the full path, so I did that.

In the plan configuration under Miscellaneous:

When I try to run the plan, I get a cryptic error:

com.alienfast.bamboozled.ruby.rt.RuntimeLocatorException: Unable to locate Runtime Manager installation.
    at com.alienfast.bamboozled.ruby.rt.RubyLocatorServiceFactory.acquireRubyLocator(RubyLocatorServiceFactory.java:65)
    at com.alienfast.bamboozled.ruby.tasks.AbstractRubyTask.getRubyLocator(AbstractRubyTask.java:156)
    at com.alienfast.bamboozled.ruby.tasks.AbstractRubyTask.buildEnvironment(AbstractRubyTask.java:193)
    at com.alienfast.bamboozled.ruby.tasks.AbstractRubyTask.execute(AbstractRubyTask.java:89)
    at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:288)
    at com.atlassian.bamboo.task.TaskExecutorImpl$3.call(TaskExecutorImpl.java:284)
    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:200)
    at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:284)
    at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:106)
    at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:75)
    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:196)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:124)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl$1.call(BuildAgentControllerImpl.java:115)
    at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:215)
    at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:114)
    at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:118)
    at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49)
    at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31)
    at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20)
    at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52)
    at java.lang.Thread.run(Thread.java:745)

Questions not answered by that error message:

I get the feeling that some kind of underlying exception has been swallowed by the plugin, and thanks to that, I have no lead to follow which would otherwise give a clue to what I have done wrong.

The executables are certainly present:

bucket:rbenv Tester$ ls -la /Users/Tester/DevEnv/rbenv/versions/2.2.1/bin/ruby
-rwxr-xr-x  1 Tester  staff  2565440 28 Jul 14:12 /Users/Tester/DevEnv/rbenv/versions/2.2.1/bin/ruby
bucket:rbenv Tester$ ls -la /Users/Tester/DevEnv/rbenv/versions/2.2.1/bin/bundle
-rwxr-xr-x  1 Tester  staff  529 12 Aug 11:20 /Users/Tester/DevEnv/rbenv/versions/2.2.1/bin/bundle

rbenv is also on the path:

bucket:rbenv Tester$ which rbenv
/Users/Tester/DevEnv/rbenv/bin/rbenv

Maybe it's looking in a hard-coded location for it or something? It would be helpful if it printed that location.

Getting this working is sort of low priority though to be honest, because Bamboo is lacking in so many other areas that it is unlikely that we'll continue using it anyway. I guess making this sort of error more obvious could help the next person who comes along.

rosskevin commented 8 years ago

In the readme, on Installation and Usage step 2, did you detect server capabilities?

Were you able to select the appropriate RVM or ruby runtime in step 4 miscellaneous tab?

rosskevin commented 8 years ago

rbenv support is written to the plugin for recommended installations, if you have gone outside the norm then it may not work.

When you detect server capabilities, you should see Searching for rbenv installation in users home directory located at in the log. I don't use rbenv, but it appears you are using something like a global or shared installation, instead of a user installation under ~/.rbenv like the rbenv readme suggests.

I would suggest setting up your rbenv as suggested, then re-detecting server capabilities. You should see an rbenv manager with a path under ~/.rbenv.

rosskevin commented 8 years ago

Confirmed to be a non-standard install in the stackoverflow comments.

Added extra message for next release, not sure we need any other action at this point.