old rubigen

1 view
Skip to first unread message

viatropos

unread,
Sep 17, 2009, 1:15:35 AM9/17/09
to ProjectSprouts
can't activate rubigen (= 1.3.3, runtime) for [], already activated
rubigen-1.5.2 for ["restfulx-1.2.2"]

Can't figure out where the problem is...

Richie Vos

unread,
Sep 17, 2009, 10:06:18 AM9/17/09
to ProjectSprouts
No exact advice for you, but http://www.engineyard.com/blog/2009/my-five-favorite-things-about-rails-3/
has some notes about the overarching problem. It's rubygems doesn't
resolve gem depends all at once so one version of the gem can get
required before another.

Luke Bayes

unread,
Sep 17, 2009, 5:13:34 PM9/17/09
to project...@googlegroups.com
Um Yeah -

This is a problem. You're probably going to have other issues with
RestfulX/Sprouts integration too - since they also expose compiler
tasks and other sugar that Sprouts tries to take over.

To speak to this particular issue, Rubigen is what we (and Rails, and
Restfulx) use to generate classes, projects and other files.

Unfortunately, the latest version of Rubigen took a dump for some
reason along the way, so instead of figuring out why, I just updated
the Sprout gem dependency to a specific and old version of the Rubigen
gem.

There are only a handful of options that I'm aware of:

a) Try to change the dependency in the Sprout gem, increment the
revision, repackage and see if you can still generate projects,
classes, test cases, test suites, etc. Send me a pull request if this
works!

b) Do the same to your gem or sources of RestfulX, but specify the
older version instead.

c) Are you actually using RestfulX for anything other than the
library? If not, try to pull any references to them out of your
rakefile and instead just manually add their lib to your sourcepath.


Thanks,

Luke

stuartblair

unread,
Oct 8, 2009, 2:33:32 PM10/8/09
to ProjectSprouts
I may have found another explanation and a possible fix. I had similar
problems where the sprout generator was crashing because the rubigen
1.5.2 gem was active and the sprout generator needed rubigen 1.3.3.
This puzzled me, since I thought the only application I had which
depended on rubigen was sprout, so why the clash?

A quick grep over the sprout gem revealed the problem -

stuart-blairs-macbook:sprout-0.7.215-darwin stuartblair$ grep -R
"rubigen" *
doc/Generator:Generators can exist in multiple different locations on
disk, to learn how to create a new generator, see the Rubigen
documentation[http://rubigen.rubyforge.org/].
lib/sprout/generator.rb:gem 'rubigen', '= 1.3.3'
lib/sprout/generator.rb:require 'rubigen'
rakefile.rb: s.add_dependency('rubigen', '= 1.5.2')

In the rakefile, we're declaring an explicit dependency for rubigen
1.5.2, however in the generator, we've got another explicit dependency
for rubigen at version 1.3.3. I commented out the gem requirement for
1.3.3 in the generator and hey presto, things work again.

ps. sprout ftw

Stuart

Luke Bayes

unread,
Oct 9, 2009, 5:26:34 PM10/9/09
to project...@googlegroups.com
Hey Stuart,

Thanks for the catch. I'm pretty sure I pushed a fix for this issue
live on Wednesday, so please run an update and let me know if you
still have problems:

sudo gem update sprout

That should update all of your sprout gems....


Thanks,

Luke
Reply all
Reply to author
Forward
0 new messages