Gem generators on 1.2.6

In a 1.2.6 app (don’t ask), I don’t see the generators available to me
with the gems installed. However the documentation makes it look like
it should work:
Generator gems are also available:

  1. gem search -r generator
  2. gem install login_generator
  3. ./script/generate login

I’ve confirmed that with a fresh rails (2.x) app it works fine. Is
this supposed to work with 1.2.6? Are there any workarounds that
people have? Is my app just fucked atm?

Pat

I’ve confirmed that with a fresh rails (2.x) app it works fine. Is
this supposed to work with 1.2.6? Are there any workarounds that
people have? Is my app just fucked atm?

erm, I’ve also confirmed that with a fresh rails 1.2.6 app it DOESN’T
see the gem generators. I’m pretty suspicious though because of that
documentation.

Pat

Pat M. wrote:

people have? Is my app just fucked atm?

Pat


rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Hmm… I don’t know if that was supported in 1.2.6… I know having
generators in your home dir was.

Try this workaround:

mkdir -p ~/.rails/generators
ln -s /your_gem_path/rspec-rails-1.1.8/generators
~/.rails/generators/rspec-rails-1.1.8

HTH,

Ben

On Tue, Oct 7, 2008 at 4:58 PM, Pat M. [email protected] wrote:

I’ve confirmed that with a fresh rails (2.x) app it works fine. Is
this supposed to work with 1.2.6? Are there any workarounds that
people have? Is my app just fucked atm?

erm, I’ve also confirmed that with a fresh rails 1.2.6 app it DOESN’T
see the gem generators. I’m pretty suspicious though because of that
documentation.

Hey Pat - until recently, generator plugins were only found if they
were named [something]_generator:

http://github.com/rails/rails/commit/868e6b08df4b16fb71cc8a66308174253ff67bdb

So on 1.2.6, you’re kinda screwed unless you want to create a local
copy of the rspec-rails gem named rspec-rails_generator :frowning:

Cheers,
David

On Tue, Oct 7, 2008 at 4:34 PM, David C. [email protected]
wrote:

were named [something]_generator:

http://github.com/rails/rails/commit/868e6b08df4b16fb71cc8a66308174253ff67bdb

So on 1.2.6, you’re kinda screwed unless you want to create a local
copy of the rspec-rails gem named rspec-rails_generator :frowning:

No prob, I’ll just use the plugins then. Thanks for the info.

Pat