Forum: RSpec gem generators on 1.2.6

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2008-10-07 23:57
(Received via mailing list)
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
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2008-10-07 23:59
(Received via mailing list)
> 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
C694a032be7518a0d704318895f8fe1d?d=identicon&s=25 Ben Mabey (mabes)
on 2008-10-08 00:06
(Received via mailing list)
Pat Maddox wrote:
> people have?  Is my app just fucked atm?
>
> Pat
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> 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
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2008-10-08 01:39
(Received via mailing list)
On Tue, Oct 7, 2008 at 4:58 PM, Pat Maddox <pergesu@gmail.com> 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/868e6b08df4b1...

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 :(

Cheers,
David
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2008-10-08 02:01
(Received via mailing list)
On Tue, Oct 7, 2008 at 4:34 PM, David Chelimsky <dchelimsky@gmail.com>
wrote:
> were named [something]_generator:
>
> http://github.com/rails/rails/commit/868e6b08df4b1...
>
> 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 :(

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

Pat
This topic is locked and can not be replied to.