Output task fails on Ruby 1.9.3 #27

Closed
kieranmaine opened this Issue Nov 13, 2012 · 9 comments

Comments

Projects
None yet
5 participants
@kieranmaine

When using the output task with rake 10.0 and Ruby 1.9.3, the following error was raised:

undefined method `rmtree' for OutputBuilder:Class
C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.4/lib/albacore/output.rb:36:in `output_to'
C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.4/lib/albacore/output.rb:71:in `execute'
C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/albacore-0.3.4/lib/albacore/support/createtask.rb:24:in `block in output'
@AnthonyMastrean

This comment has been minimized.

Show comment
Hide comment
@AnthonyMastrean

AnthonyMastrean Nov 16, 2012

Member

The output task uses the Albacore OutputBuilder class, which includes FileUtils so that it can use the rmtree method. But, that's been changed from Ruby 1.9.2 where it was a "public" module method which could be included. In Ruby 1.9.3, it's a "private" module method which cannot be included (I know I'm describing it wrong, but the outcome is correct).

Looks like we have a legit bug in Ruby 1.9.3 support! You can fix the issue in your local Albacore by changing the calls to FileUtils methods to explicitly use the module, like FileUtils.rmtree.

Member

AnthonyMastrean commented Nov 16, 2012

The output task uses the Albacore OutputBuilder class, which includes FileUtils so that it can use the rmtree method. But, that's been changed from Ruby 1.9.2 where it was a "public" module method which could be included. In Ruby 1.9.3, it's a "private" module method which cannot be included (I know I'm describing it wrong, but the outcome is correct).

Looks like we have a legit bug in Ruby 1.9.3 support! You can fix the issue in your local Albacore by changing the calls to FileUtils methods to explicitly use the module, like FileUtils.rmtree.

@AnthonyMastrean

This comment has been minimized.

Show comment
Hide comment
@AnthonyMastrean

AnthonyMastrean Nov 30, 2012

Member

We'll track the issue here and I'll get a fix in soon!

Member

AnthonyMastrean commented Nov 30, 2012

We'll track the issue here and I'll get a fix in soon!

@darrenhaken

This comment has been minimized.

Show comment
Hide comment
@darrenhaken

darrenhaken Dec 14, 2012

What's the fix with using FileUtils.rmtree exactly? I'm new to Ruby/Rake so I have no idea how to do this.

What's the fix with using FileUtils.rmtree exactly? I'm new to Ruby/Rake so I have no idea how to do this.

@AnthonyMastrean

This comment has been minimized.

Show comment
Hide comment
@AnthonyMastrean

AnthonyMastrean Dec 14, 2012

Member

It's in the dev branch right now. You can see the exact change I made in the source. I basically explicitly use FileUtils on any method defined in that module.

It's ready for a release, but the jruby build started failing at the same time and I can't dedicate time to investigating it right now :(

Member

AnthonyMastrean commented Dec 14, 2012

It's in the dev branch right now. You can see the exact change I made in the source. I basically explicitly use FileUtils on any method defined in that module.

It's ready for a release, but the jruby build started failing at the same time and I can't dedicate time to investigating it right now :(

@adamralph

This comment has been minimized.

Show comment
Hide comment
@adamralph

adamralph Dec 26, 2012

is there any update on this? I can fix my local build, but I'm using codebetter CI for my regular builds and I have no power to hack Albacore there :-(

is there any update on this? I can fix my local build, but I'm using codebetter CI for my regular builds and I have no power to hack Albacore there :-(

@AnthonyMastrean

This comment has been minimized.

Show comment
Hide comment
@AnthonyMastrean

AnthonyMastrean Dec 28, 2012

Member

I haven't had the time to investigate the jruby issue, which is moderately concerning. I also think that it's just coincident with the output task fix, but I want to be sure. Can you upgrade Codebetter's Albacore to a prerelease version (like semver's recommended, 0.3.5-pre.1) ? I can publish a prerelease gem, I think.

Member

AnthonyMastrean commented Dec 28, 2012

I haven't had the time to investigate the jruby issue, which is moderately concerning. I also think that it's just coincident with the output task fix, but I want to be sure. Can you upgrade Codebetter's Albacore to a prerelease version (like semver's recommended, 0.3.5-pre.1) ? I can publish a prerelease gem, I think.

@adamralph

This comment has been minimized.

Show comment
Hide comment
@adamralph

adamralph Dec 28, 2012

That would have to be a request for the codebetter server admins. I'd be surprised if they'd be willing to put a pre-release version up.

It's no longer a pressing issue for me since I've reworked my rakefile so that it no longer needs to use the output task.

That would have to be a request for the codebetter server admins. I'd be surprised if they'd be willing to put a pre-release version up.

It's no longer a pressing issue for me since I've reworked my rakefile so that it no longer needs to use the output task.

@AnthonyMastrean

This comment has been minimized.

Show comment
Hide comment
@AnthonyMastrean

AnthonyMastrean Dec 28, 2012

Member

Thanks, Adam, for keeping up with the issue. Sorry we haven't been able to jump on it. I feel kinda bad.

Member

AnthonyMastrean commented Dec 28, 2012

Thanks, Adam, for keeping up with the issue. Sorry we haven't been able to jump on it. I feel kinda bad.

@haf

This comment has been minimized.

Show comment
Hide comment
@haf

haf Jul 6, 2013

Member

As for the teamcity at codebetter, you should be using a Gemfile and bundle your albacore rather than having server-admins upgrade albacore for all projects.

I'm closing this due to Anthony's fix.

Member

haf commented Jul 6, 2013

As for the teamcity at codebetter, you should be using a Gemfile and bundle your albacore rather than having server-admins upgrade albacore for all projects.

I'm closing this due to Anthony's fix.

@haf haf closed this Jul 6, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment