drscream / bamboozled-ruby-plugin

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

System ruby capability detection throws NoSuchMethodError #13

Closed ultimav closed 8 years ago

ultimav commented 8 years ago

So I'm on Bamboo 5.8.1, and the API docs show that method should be available..

I was adding Type: Ruby Label: SYSTEM 1.9.3p484@default Path: /opt/rh/ruby193/root/usr/bin/ruby

Caused by: java.lang.NoSuchMethodError: com.atlassian.bamboo.util.BambooFilenameUtils.stripTrailingSlashes(Ljava/lang/String;)Ljava/lang/String;
    at com.alienfast.bamboozled.ruby.capability.RubyCapabilityTypeModule.getCapability(RubyCapabilityTypeModule.java:98)
    at com.atlassian.bamboo.configuration.agent.AddSharedRemoteCapability.validate(AddSharedRemoteCapability.java:23)
rosskevin commented 8 years ago

I'm not sure why there would be an incompatibility with 5.8.1 as I don't believe this code hasn't changed for some time. Nonetheless, the current version of bamboo is 5.9.7 so perhaps you would consider upgrading and trying again?

Another potential difference is that most are not using a ruby gemset manager such as RVM; I see you are using the system ruby. Perhaps those take different paths through the code and you are seeing a bug.

I'm on 5.9.3 using RVM, and RVM is highly recommended over system ruby (system can only use one, RVM can use many). If one of these solutions doesn't solve your problem, I welcome a pull request to solve the system ruby issue.

ultimav commented 8 years ago

Actually this wasn't a system detected ruby, this was a manually added one. I tried both on the Agent, and and on the Shared Capabilities.

I just used SYSTEM because i didn't have anything else to use, because i'm not using RVM..

ultimav commented 8 years ago

Ok it works on my test instance of bamboo that is running 5.9.0.. I'll see if i can try the upgrade route..

Gives me an excuse anyway :)

ultimav commented 8 years ago

Upgrade to 5.9.7 fixed it, the abillity to add, however i still couldn't add the ruby as a system because it uses a completely different path to the executable. The task would always error out because it couldn't find ruby (not in /usr/*)