uninitialized constant RubiGen

12 views
Skip to first unread message

Dr Nic

unread,
Jun 18, 2008, 5:27:57 PM6/18/08
to RubiGen
If you are seeing "uninitialized constant RubiGen" then you possibly
recently installed sproutcore.

Instant Fix: gem uninstall sproutcore

Its not known at this time what sproutcore is doing to cause RubiGen
grief, but uninstalling sproutcore is the current known fix. Sorry.

Hopefully either sproutcore or rubigen can be fixed to live happily
with the other. Once someone figures out how they are not living
happily together.

Kevin Daum

unread,
Jun 25, 2008, 10:00:59 PM6/25/08
to rub...@googlegroups.com
Thanks, that's exactly what it was. Sproutcore was fixed a couple days later and they now live together happily.

Kevin

Nic Williams

unread,
Jun 25, 2008, 10:02:40 PM6/25/08
to rub...@googlegroups.com
Cool, I can remove the sticky article?
--
Dr Nic Williams
* Learn TextMate for Rails2 - http://peepcode.com/products/textmate-for-rails-2 *
Training in Ruby/Rails/JavaScript - http://drnicacademy.com
Fun with Ruby/Rails/Javascript - http://drnicwilliams.com
Photos of our new daughter & family- http://flickr.com/photos/drnic

Dr Nic

unread,
Jun 26, 2008, 12:52:48 AM6/26/08
to RubiGen
Its unstickied. To solution is to upgrade to latest sproutcore.

See the patch here: http://github.com/lukebayes/project-sprouts/commit/bddf343d375e2e0ea9ea373fba40c592e8604e98

On Jun 26, 12:02 pm, "Nic Williams" <drnicwilli...@gmail.com> wrote:
> Cool, I can remove the sticky article?
>
>
>
> On Thu, Jun 26, 2008 at 12:00 PM, Kevin Daum <kevin.d...@gmail.com> wrote:
> > Thanks, that's exactly what it was. Sproutcore was fixed a couple days
> > later and they now live together happily.
> > Kevin
>
> > On Wed, Jun 18, 2008 at 5:27 PM, Dr Nic <drnicwilli...@gmail.com> wrote:
>
> >> If you are seeing "uninitialized constant RubiGen" then you possibly
> >> recently installed sproutcore.
>
> >> Instant Fix: gem uninstall sproutcore
>
> >> Its not known at this time what sproutcore is doing to cause RubiGen
> >> grief, but uninstalling sproutcore is the current known fix. Sorry.
>
> >> Hopefully either sproutcore or rubigen can be fixed to live happily
> >> with the other. Once someone figures out how they are not living
> >> happily together.
>
> --
> Dr Nic Williams
> * Learn TextMate for Rails2 -http://peepcode.com/products/textmate-for-rails-2*
> Training in Ruby/Rails/JavaScript -http://drnicacademy.com
> Fun with Ruby/Rails/Javascript -http://drnicwilliams.com

Matt Lins

unread,
Aug 6, 2008, 10:04:51 AM8/6/08
to RubiGen
Did anyone ever figure out what the cause of this is?

My gem has a generator called 'migration' and when it is installed it
breaks the Rails generator 'migration.'

I couldn't find anything in the link Dr. Nic provided.

On Jun 25, 11:52 pm, Dr Nic <drnicwilli...@gmail.com> wrote:
> Its unstickied. To solution is to upgrade to latest sproutcore.
>
> See the patch here:http://github.com/lukebayes/project-sprouts/commit/bddf343d375e2e0ea9...

Matt Lins

unread,
Aug 6, 2008, 10:07:35 AM8/6/08
to RubiGen
I think this is the right commit:

http://github.com/lukebayes/project-sprouts/commit/b4ef4fde342059b97587586676e445e5ff79d561

However, it just looks like they switched from the Rails::Generator to
Rubigen. That doesn't help me. :(

Nic Williams

unread,
Aug 6, 2008, 4:29:01 PM8/6/08
to rub...@googlegroups.com
Matt, email me your code if you want me to have a look.

Nic
--
Dr Nic Williams
Fun with iPhone/Ruby/Rails/Javascript - http://drnicwilliams.com

Matt Lins

unread,
Aug 8, 2008, 9:06:44 AM8/8/08
to RubiGen
Thanks Dr. Nic.

It's on GitHub:

http://github.com/mlins/godwit/tree/master

My project uses newgem, which is what I used to generate the
generator. The only problem is my 'migration' generator. If my gem
is installed I get the unintialized constant in rails when trying use
it's 'migration' generator.

Thanks.

On Aug 6, 3:29 pm, "Nic Williams" <drnicwilli...@gmail.com> wrote:
> Matt, email me your code if you want me to have a look.
> Nic
>
>
>
> On Thu, Aug 7, 2008 at 12:07 AM, Matt Lins <mattl...@gmail.com> wrote:
>
> > I think this is the right commit:
>
> >http://github.com/lukebayes/project-sprouts/commit/b4ef4fde342059b975...
> Fun with iPhone/Ruby/Rails/Javascript -http://drnicwilliams.com

Nic Williams

unread,
Aug 11, 2008, 8:17:12 AM8/11/08
to rub...@googlegroups.com
The problem is that you're using a generators/ folder. This is for generators that are globally accessible. Really, there probably aren't many of those. Perhaps zero.

Instead your folder should be called merb_generators or rails_generators. The prefix (merb or rails respectively) is called the scope, and its how generators are filtered when you run script/generate from merb or newgem or adhearsion projects.

In your app generator (http://github.com/mlins/godwit/tree/master/app_generators/godwit/godwit_generator.rb#L49-50) you are specifying that your scope is 'godwit'.

So, your component generators should be in a godwit_generators folder.

When you created the migration generator using component_generators you should include the scope name as the 2nd argument after the generator name. I probably should make this mandatory. Or provide big warnings about creating scopeless generators (as you did).

So, rename your generators folder -> godwit_generators and see if that helps. (Remember to update your manifest before recreating the gem).

Nic
Fun with iPhone/Ruby/Rails/Javascript - http://drnicwilliams.com

Matt Lins

unread,
Aug 13, 2008, 10:11:45 AM8/13/08
to RubiGen
Thanks Dr. Nic!

On Aug 11, 7:17 am, "Nic Williams" <drnicwilli...@gmail.com> wrote:
> The problem is that you're using a generators/ folder. This is for
> generators that are globally accessible. Really, there probably aren't many
> of those. Perhaps zero.
> Instead your folder should be called merb_generators or rails_generators.
> The prefix (merb or rails respectively) is called the scope, and its how
> generators are filtered when you run script/generate from merb or newgem or
> adhearsion projects.
>
> In your app generator (http://github.com/mlins/godwit/tree/master/app_generators/godwit/godw...)

Matt Lins

unread,
Aug 13, 2008, 11:16:13 AM8/13/08
to RubiGen
Well, I guess that didn't work. Here's what I did:

1. Renamed generators -> godwit_generators
2. Updated manifest
3. sudo gem uninstall godwit
4. sudo rake install_gem

To test(in a rails app):

1. ./script/generate

with no arguments to see what gems it's finding:

Rubygems: active_model, hobo_migration, install_rubigen_scripts,
legacy_model, migration

active_model, legacy_model and migration are all from godwit.

I then uninstalled the godwit gem:

1. sudo gem uninstall godwit

and the output from rails generate:

Rubygems: hobo_migration, install_rubigen_scripts

Hmmm....still having the same problem.

I pushed the changes to git even though it didn't help, in case you'd
like to try it:

git://github.com/mlins/godwit.git
Reply all
Reply to author
Forward
0 new messages