unitialized constant

1 view
Skip to first unread message

andy

unread,
Apr 25, 2008, 10:56:57 AM4/25/08
to RubiGen
I am using NewGem and RubiGen for a project of mine that has two
stages. The first is Capistrano-like function where you run an
executable, in this case lockdown. This adds a couple of files into
your project...all is good.

The second (optional) stage is a generate script that installs
models,controllers, views ... etc... I'm testing this script and the
first thing I got was a:

uninitialized constant RubiGen message.

So, I tried the script/generate install_rubigen_scripts and received
the same message.

So, what did I miss. I wouldn't be asking if the
install_rubigen_scripts hadn't returned the same message.

Let me know what other info you need.

thanks,
andy

Andrew Stone

unread,
Apr 25, 2008, 12:13:57 PM4/25/08
to RubiGen


uninitialized constant RubiGen message.


version info:

Rails 2.0.2
Rubigen  1.3.1 (but project was initially stubbed with 1.2.4)
Newgem 0.23.1


--
Andrew Stone

Nic Williams

unread,
Apr 25, 2008, 5:07:27 PM4/25/08
to rub...@googlegroups.com
Hmm, I just released a new rubigen version; perhaps this is the issue,

What version(s) of rubigen + newgem do you have installed?

$ gem list rubigen
$ gem list newgem
--
Dr Nic Williams
http://drnicacademy.com - Ruby/Rails training/dev around the world
http://drnicwilliams.com - Ruby/Rails/Javascript/Web2.0
(skype) nicwilliams
(p) +61 412 002 126 / +61 7 3113 3033
(mail) PO Box 583 Ashgrove 4060 QLD Aus

Nic Williams

unread,
Apr 25, 2008, 5:10:08 PM4/25/08
to rub...@googlegroups.com
Ooh, sorry didn't see your 2nd email.

Can you try the following:

gem uninstall rubigen
- select "all"
gem install rubigen

and see if having just one gem version helps. I say this because I had a funny issue when I had 1.2.4 + 1.3 installed. I have no idea why I had issues, but when I cleaned out my gem cache it fixed it. This isn't a solution, but I'm just interested if it does solve your issue. I'm guessing lots of ppl will have this issue (whatever it is) so it needs to be fixed.

Nic

Andrew Stone

unread,
Apr 25, 2008, 6:39:48 PM4/25/08
to rub...@googlegroups.com
On Fri, Apr 25, 2008 at 5:10 PM, Nic Williams <drnicw...@gmail.com> wrote:
Ooh, sorry didn't see your 2nd email.

Can you try the following:

gem uninstall rubigen
- select "all"
gem install rubigen


It looks like the new version corrected the issue. The original issue was that the code generated by the component generator (for Rails) utilized the RubiGen::Base class instead of Rails::Generator::Base.  I didn't know any better at the time...the Rails code requires it's generators to be descendants of Rails::Generator::Base.

Anyway...issue resolved.   Thanks for Newgem and Rubigen, it has been a really big help.
 

--
Andrew Stone

Nic Williams

unread,
Apr 25, 2008, 6:40:53 PM4/25/08
to rub...@googlegroups.com
Yeah the 1.3.1 fixes the issues with creating + testing rails generators. Tis good fun :)

Andrew Stone

unread,
Apr 25, 2008, 6:54:59 PM4/25/08
to rub...@googlegroups.com
On Fri, Apr 25, 2008 at 6:40 PM, Nic Williams <drnicw...@gmail.com> wrote:
Yeah the 1.3.1 fixes the issues with creating + testing rails generators. Tis good fun :)

Quick question... any chance of adding in the copy_dirs and copy_files methods Merb uses into Rubigen?  Those are some nice additions I think.  I don't know if you know about them...they are defined in merb-gen/lib/merb-gen/helpers.rb 


--
Andrew Stone

Nic Williams

unread,
Apr 25, 2008, 7:06:44 PM4/25/08
to rub...@googlegroups.com
Yeah, now that I'm looking @ rubigen again I can take a look @ what wycats et al did in Merb.

Kevin D

unread,
Jun 16, 2008, 4:49:47 PM6/16/08
to RubiGen
I am experiencing the same error whenever I run "script/generate
scaffold" and can't figure out how to fix it. Because I am totally new
to rails, I don't know which gems are relevant, so I'm just going to
list all that I have installed:

$ gem list

*** LOCAL GEMS ***

abstract (1.0.0)
actionmailer (2.1.0, 2.0.2, 1.3.6, 1.3.3)
actionpack (2.1.0, 2.0.2, 1.13.6, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (2.1.0, 2.0.2, 1.15.6, 1.15.3)
activeresource (2.1.0, 2.0.2)
activesupport (2.1.0, 2.0.2, 1.4.4, 1.4.2)
acts_as_ferret (0.4.1)
capistrano (2.0.0)
cgi_multipart_eof_fix (2.5.0, 2.2)
daemons (1.0.10, 1.0.9, 1.0.7)
dnssd (0.6.0)
erubis (2.6.2)
fastthread (1.0.1, 1.0)
fcgi (0.8.7)
ferret (0.11.4)
gem_plugin (0.2.3, 0.2.2)
highline (1.2.9)
hoe (1.5.3)
hpricot (0.6)
json_pure (1.1.2)
libxml-ruby (0.3.8.4)
merb-core (0.9.3)
mime-types (1.15)
mongrel (1.1.5, 1.1.4, 1.0.1)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
newgem (0.23.1)
rack (0.3.0)
rails (2.0.2)
rake (0.8.1, 0.7.3)
RedCloth (3.0.4)
rspec (1.1.4)
rubigen (1.3.2)
ruby-openid (1.1.4)
ruby-yadis (0.3.4)
rubyforge (1.0.0)
rubygems-update (1.1.1)
rubynode (0.1.3)
sources (0.0.1)
sproutcore (0.9.9)
sqlite3-ruby (1.2.2, 1.2.1)
syntax (1.0.0)
termios (0.9.4)

I have already tried uninstalling and reinstalling rubigen. I also had
the same issue when using rails 2.1. Again, for the sake of being
thorough, here's an example of what happens:

$ script/generate scaffold event name:string budget:decimal
exists app/models/
exists app/controllers/
exists app/helpers/
create app/views/events
exists app/views/layouts/
exists test/functional/
exists test/unit/
create app/views/events/index.html.erb
create app/views/events/show.html.erb
create app/views/events/new.html.erb
create app/views/events/edit.html.erb
create app/views/layouts/events.html.erb
create public/stylesheets/scaffold.css
dependency model
uninitialized constant RubiGen

Any help would be greatly appreciated.

Thanks,
Kevin

On Apr 25, 6:40 pm, "Nic Williams" <drnicwilli...@gmail.com> wrote:
> Yeah the 1.3.1 fixes the issues with creating + testing rails generators.
> Tis good fun :)
>
>
>
> On Sat, Apr 26, 2008 at 8:39 AM, Andrew Stone <stoneli...@gmail.com> wrote:
>
> > On Fri, Apr 25, 2008 at 5:10 PM, Nic Williams <drnicwilli...@gmail.com>
> > wrote:
>
> > > Ooh, sorry didn't see your 2nd email.
> > > Can you try the following:
>
> > > gem uninstall rubigen
> > > - select "all"
> > > gem install rubigen
>
> > It looks like the new version corrected the issue. The original issue was
> > that the code generated by the component generator (for Rails) utilized the
> > RubiGen::Base class instead of Rails::Generator::Base.  I didn't know any
> > better at the time...the Rails code requires it's generators to be
> > descendants of Rails::Generator::Base.
>
> > Anyway...issue resolved.   Thanks for Newgem and Rubigen, it has been a
> > really big help.
>
> > --
> > Andrew Stone
>
> --
> Dr Nic Williamshttp://drnicacademy.com- Ruby/Rails training/dev around the worldhttp://drnicwilliams.com- Ruby/Rails/Javascript/Web2.0

Kevin D

unread,
Jun 16, 2008, 5:01:55 PM6/16/08
to RubiGen
In response to my post a few minutes ago about encountering the
"uninitialized constant RubiGen" error:

It's working now. All I had to do was uninstall sproutcore and the
related executables (sc-build, sc-gen, sc-server, sproutcore). I'll
have to tell the sproutcore folks about this. Though my issue has been
resolved, I encourage you to display my posts anyway because
sproutcore is very new and others may encounter the same error.

Kevin

On Apr 25, 6:40 pm, "Nic Williams" <drnicwilli...@gmail.com> wrote:
> Yeah the 1.3.1 fixes the issues with creating + testing rails generators.
> Tis good fun :)
>
>
>
> On Sat, Apr 26, 2008 at 8:39 AM, Andrew Stone <stoneli...@gmail.com> wrote:
>
> > On Fri, Apr 25, 2008 at 5:10 PM, Nic Williams <drnicwilli...@gmail.com>
> > wrote:
>
> > > Ooh, sorry didn't see your 2nd email.
> > > Can you try the following:
>
> > > gem uninstall rubigen
> > > - select "all"
> > > gem install rubigen
>
> > It looks like the new version corrected the issue. The original issue was
> > that the code generated by the component generator (for Rails) utilized the
> > RubiGen::Base class instead of Rails::Generator::Base.  I didn't know any
> > better at the time...the Rails code requires it's generators to be
> > descendants of Rails::Generator::Base.
>
> > Anyway...issue resolved.   Thanks for Newgem and Rubigen, it has been a
> > really big help.
>
> > --
> > Andrew Stone
>
> --
> Dr Nic Williamshttp://drnicacademy.com- Ruby/Rails training/dev around the worldhttp://drnicwilliams.com- Ruby/Rails/Javascript/Web2.0

mech

unread,
Jun 18, 2008, 7:55:48 AM6/18/08
to RubiGen
Yes!

Please make public because I have sproutcore also and suddenly I
cannot even script/generate model where in the past I can...

having this error "uninitialized constant RubiGen" and scratch my
head... I will try uninstall sproutcore and see what is the outcome.

mech

Dr Nic

unread,
Jun 18, 2008, 5:28:54 PM6/18/08
to RubiGen
I've added a sticky message to the top of the mailing list for other's
finding this error.

Thanks
Nic
> > > Dr Nic Williamshttp://drnicacademy.com-Ruby/Railstraining/dev around the worldhttp://drnicwilliams.com-Ruby/Rails/Javascript/Web2.0
Reply all
Reply to author
Forward
0 new messages