Scaffolding in Merb... Any Tutorial available
The group you are posting to is a
Usenet group . Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
From:
MyMerb <mym... @gmail.com>
Date: Fri, 26 Sep 2008 01:14:53 -0700 (PDT)
Local: Fri, Sep 26 2008 4:14 am
Subject: Scaffolding in Merb... Any Tutorial available
Hi,
I an currently in my learning process for Merb and Active Record.
So far... I have not seen any tutorial on Scaffolding in Merb.
Can few experienced folks point me out few good links or Blogs or
Tutorials on this subject.
Thanks
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Michael Klishin" <michael.s.klis... @gmail.com>
Date: Fri, 26 Sep 2008 11:16:53 +0300
Local: Fri, Sep 26 2008 4:16 am
Subject: Re: [merb] Scaffolding in Merb... Any Tutorial available
2008/9/26 MyMerb <mym
... @gmail.com>:
> So far... I have not seen any tutorial on Scaffolding in Merb.
run merb-gen without arguments to see generators available on your system.
Additional gems may provide their own generators.
--
MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Fri, 26 Sep 2008 17:06:40 -0700
Local: Fri, Sep 26 2008 8:06 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
FYI and to add to what Michael just said:
merb-gen resource Bird name:string color:string family_id:integer last_location:string last_seen_at:datetime
merb-gen AR template uses the same syntax as Rails generator.
-Matt
On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
michael.s.klis
... @gmail.com> wrote:
> 2008/9/26 MyMerb <mym... @gmail.com>: > > So far... I have not seen any tutorial on Scaffolding in Merb.
> run merb-gen without arguments to see generators available on your system. > Additional gems may provide their own generators. > -- > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 12:26:40 -0800 (PST)
Local: Wed, Nov 12 2008 3:26 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
> merb-gen resource Bird name:string color:string family_id:integer
> last_location:string last_seen_at:datetime
"merb-gen resource" gives the error:
FATAL: The file dm-core was not found
config/database.yml specify:
use_orm :activerecord
> merb-gen AR template uses the same syntax as Rails generator.
merb-gen does not seem to show any help on this. Can you expand more
here ?
-Arun
> -Matt
> On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> michael.s.klis... @gmail.com> wrote:
> > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > run merb-gen without arguments to see generators available on your system.
> > Additional gems may provide their own generators.
> > --
> > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 12:42:25 -0800 (PST)
Local: Wed, Nov 12 2008 3:42 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
jruby -S merb-gen model --orm activerecord Runner distance:float
minutes:integer
still showing the same error message.
Any idea ?
On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > merb-gen resource Bird name:string color:string family_id:integer
> > last_location:string last_seen_at:datetime
> "merb-gen resource" gives the error:
> FATAL: The file dm-core was not found
> config/database.yml specify:
> use_orm :activerecord
> > merb-gen AR template uses the same syntax as Rails generator.
> merb-gen does not seem to show any help on this. Can you expand more
> here ?
> -Arun
> > -Matt
> > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > michael.s.klis... @gmail.com> wrote:
> > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > run merb-gen without arguments to see generators available on your system.
> > > Additional gems may provide their own generators.
> > > --
> > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Wed, 12 Nov 2008 15:47:12 -0500
Local: Wed, Nov 12 2008 3:47 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
not sure, but merb-gen arguments are comma delimited and without space (yeah, I know it sucks :()
try:
jruby -S merb-gen model --orm activerecord Runner distance:float,minutes:integer
and
jruby -S merb-gen model Runner distance:float,minutes:integer
-Matt
On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu
... @gmail.com> wrote:
> jruby -S merb-gen model --orm activerecord Runner distance:float > minutes:integer
> still showing the same error message.
> Any idea ?
> On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote: > > > merb-gen resource Bird name:string color:string family_id:integer > > > last_location:string last_seen_at:datetime
> > "merb-gen resource" gives the error:
> > FATAL: The file dm-core was not found
> > config/database.yml specify:
> > use_orm :activerecord
> > > merb-gen AR template uses the same syntax as Rails generator.
> > merb-gen does not seem to show any help on this. Can you expand more > > here ?
> > -Arun
> > > -Matt
> > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > michael.s.klis... @gmail.com> wrote:
> > > > 2008/9/26 MyMerb <mym... @gmail.com>: > > > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > > run merb-gen without arguments to see generators available on your > system. > > > > Additional gems may provide their own generators. > > > > -- > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 16:31:50 -0800 (PST)
Local: Wed, Nov 12 2008 7:31 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Subtle ;-)
Anyway, still getting the same error ...
../../../bin/jruby -S merb-gen model --orm activerecord Runner
distance:float,minutes:integer
Loading init file from /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
samples/merb/hello/config/init.rb
Loading /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
hello/config/environments/development.rb
~
~ FATAL: The file dm-core was not found
~
config/init.rb is already configured to use activerecord.
What's missing ?
-Arun
On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> not sure, but merb-gen arguments are comma delimited and without space
> (yeah, I know it sucks :()
> try:
> jruby -S merb-gen model --orm activerecord Runner
> distance:float,minutes:integer
> and
> jruby -S merb-gen model Runner distance:float,minutes:integer
> -Matt
> On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > jruby -S merb-gen model --orm activerecord Runner distance:float
> > minutes:integer
> > still showing the same error message.
> > Any idea ?
> > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > last_location:string last_seen_at:datetime
> > > "merb-gen resource" gives the error:
> > > FATAL: The file dm-core was not found
> > > config/database.yml specify:
> > > use_orm :activerecord
> > > > merb-gen AR template uses the same syntax as Rails generator.
> > > merb-gen does not seem to show any help on this. Can you expand more
> > > here ?
> > > -Arun
> > > > -Matt
> > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > michael.s.klis... @gmail.com> wrote:
> > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > > > run merb-gen without arguments to see generators available on your
> > system.
> > > > > Additional gems may provide their own generators.
> > > > > --
> > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Wed, 12 Nov 2008 19:36:31 -0500
Local: Wed, Nov 12 2008 7:36 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
I'm not sure, you might have some other dependencies requiring dm, can I see
your init.rb/dependencies.rb files please?
-Matt
On Wed, Nov 12, 2008 at 7:31 PM, Arun <arun.gu
... @gmail.com> wrote:
> Subtle ;-)
> Anyway, still getting the same error ...
> ../../../bin/jruby -S merb-gen model --orm activerecord Runner
> distance:float,minutes:integer
> Loading init file from /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
> samples/merb/hello/config/init.rb
> Loading /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
> hello/config/environments/development.rb
> ~
> ~ FATAL: The file dm-core was not found
> ~
> config/init.rb is already configured to use activerecord.
> What's missing ?
> -Arun
> On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > not sure, but merb-gen arguments are comma delimited and without space
> > (yeah, I know it sucks :()
> > try:
> > jruby -S merb-gen model --orm activerecord Runner
> > distance:float,minutes:integer
> > and
> > jruby -S merb-gen model Runner distance:float,minutes:integer
> > -Matt
> > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > minutes:integer
> > > still showing the same error message.
> > > Any idea ?
> > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > > last_location:string last_seen_at:datetime
> > > > "merb-gen resource" gives the error:
> > > > FATAL: The file dm-core was not found
> > > > config/database.yml specify:
> > > > use_orm :activerecord
> > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > merb-gen does not seem to show any help on this. Can you expand more
> > > > here ?
> > > > -Arun
> > > > > -Matt
> > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > > > > run merb-gen without arguments to see generators available on
> your
> > > system.
> > > > > > Additional gems may provide their own generators.
> > > > > > --
> > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 16:48:49 -0800 (PST)
Local: Wed, Nov 12 2008 7:48 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Ah, that explains!
depdencies.rb has:
dependency "dm-core", dm_gems_version
dependency "dm-aggregates", dm_gems_version
dependency "dm-migrations", dm_gems_version
dependency "dm-timestamps", dm_gems_version
dependency "dm-types", dm_gems_version
dependency "dm-validations", dm_gems_version
How do I DRY up my application and specify pluggable ORM once ?
If I comment these lines then the model is correctly generated.
-Arun
On Nov 12, 6:36 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> I'm not sure, you might have some other dependencies requiring dm, can I see
> your init.rb/dependencies.rb files please?
> -Matt
> On Wed, Nov 12, 2008 at 7:31 PM, Arun <arun.gu... @gmail.com> wrote:
> > Subtle ;-)
> > Anyway, still getting the same error ...
> > ../../../bin/jruby -S merb-gen model --orm activerecord Runner
> > distance:float,minutes:integer
> > Loading init file from /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
> > samples/merb/hello/config/init.rb
> > Loading /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
> > hello/config/environments/development.rb
> > ~
> > ~ FATAL: The file dm-core was not found
> > ~
> > config/init.rb is already configured to use activerecord.
> > What's missing ?
> > -Arun
> > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > not sure, but merb-gen arguments are comma delimited and without space
> > > (yeah, I know it sucks :()
> > > try:
> > > jruby -S merb-gen model --orm activerecord Runner
> > > distance:float,minutes:integer
> > > and
> > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > -Matt
> > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > minutes:integer
> > > > still showing the same error message.
> > > > Any idea ?
> > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > > > last_location:string last_seen_at:datetime
> > > > > "merb-gen resource" gives the error:
> > > > > FATAL: The file dm-core was not found
> > > > > config/database.yml specify:
> > > > > use_orm :activerecord
> > > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > > merb-gen does not seem to show any help on this. Can you expand more
> > > > > here ?
> > > > > -Arun
> > > > > > -Matt
> > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > > > > > run merb-gen without arguments to see generators available on
> > your
> > > > system.
> > > > > > > Additional gems may provide their own generators.
> > > > > > > --
> > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Wed, 12 Nov 2008 19:57:13 -0500
Local: Wed, Nov 12 2008 7:57 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
you should have just done:
$ merb-gen core --orm activerecord my_app_name
and just add what you need, using merb-gen app generates a merb stack app
with DM, since you don't want to use DM a core app is better.
-Matt
On Wed, Nov 12, 2008 at 7:48 PM, Arun <arun.gu
... @gmail.com> wrote:
> Ah, that explains!
> depdencies.rb has:
> dependency "dm-core", dm_gems_version
> dependency "dm-aggregates", dm_gems_version
> dependency "dm-migrations", dm_gems_version
> dependency "dm-timestamps", dm_gems_version
> dependency "dm-types", dm_gems_version
> dependency "dm-validations", dm_gems_version
> How do I DRY up my application and specify pluggable ORM once ?
> If I comment these lines then the model is correctly generated.
> -Arun
> On Nov 12, 6:36 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > I'm not sure, you might have some other dependencies requiring dm, can I
> see
> > your init.rb/dependencies.rb files please?
> > -Matt
> > On Wed, Nov 12, 2008 at 7:31 PM, Arun <arun.gu... @gmail.com> wrote:
> > > Subtle ;-)
> > > Anyway, still getting the same error ...
> > > ../../../bin/jruby -S merb-gen model --orm activerecord Runner
> > > distance:float,minutes:integer
> > > Loading init file from /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
> > > samples/merb/hello/config/init.rb
> > > Loading /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
> > > hello/config/environments/development.rb
> > > ~
> > > ~ FATAL: The file dm-core was not found
> > > ~
> > > config/init.rb is already configured to use activerecord.
> > > What's missing ?
> > > -Arun
> > > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > > not sure, but merb-gen arguments are comma delimited and without
> space
> > > > (yeah, I know it sucks :()
> > > > try:
> > > > jruby -S merb-gen model --orm activerecord Runner
> > > > distance:float,minutes:integer
> > > > and
> > > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > > -Matt
> > > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > > minutes:integer
> > > > > still showing the same error message.
> > > > > Any idea ?
> > > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > > merb-gen resource Bird name:string color:string
> family_id:integer
> > > > > > > last_location:string last_seen_at:datetime
> > > > > > "merb-gen resource" gives the error:
> > > > > > FATAL: The file dm-core was not found
> > > > > > config/database.yml specify:
> > > > > > use_orm :activerecord
> > > > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > > > merb-gen does not seem to show any help on this. Can you expand
> more
> > > > > > here ?
> > > > > > -Arun
> > > > > > > -Matt
> > > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > > So far... I have not seen any tutorial on Scaffolding in
> Merb.
> > > > > > > > run merb-gen without arguments to see generators available on
> > > your
> > > > > system.
> > > > > > > > Additional gems may provide their own generators.
> > > > > > > > --
> > > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 17:08:59 -0800 (PST)
Local: Wed, Nov 12 2008 8:08 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Ah excellent, just what I needed :)
Can I specify database at the CLI as well ? For example MySQL instead
of SQLite3.
-Arun
On Nov 12, 6:57 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> you should have just done:
> $ merb-gen core --orm activerecord my_app_name
> and just add what you need, using merb-gen app generates a merb stack app
> with DM, since you don't want to use DM a core app is better.
> -Matt
> On Wed, Nov 12, 2008 at 7:48 PM, Arun <arun.gu... @gmail.com> wrote:
> > Ah, that explains!
> > depdencies.rb has:
> > dependency "dm-core", dm_gems_version
> > dependency "dm-aggregates", dm_gems_version
> > dependency "dm-migrations", dm_gems_version
> > dependency "dm-timestamps", dm_gems_version
> > dependency "dm-types", dm_gems_version
> > dependency "dm-validations", dm_gems_version
> > How do I DRY up my application and specify pluggable ORM once ?
> > If I comment these lines then the model is correctly generated.
> > -Arun
> > On Nov 12, 6:36 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > I'm not sure, you might have some other dependencies requiring dm, can I
> > see
> > > your init.rb/dependencies.rb files please?
> > > -Matt
> > > On Wed, Nov 12, 2008 at 7:31 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > Subtle ;-)
> > > > Anyway, still getting the same error ...
> > > > ../../../bin/jruby -S merb-gen model --orm activerecord Runner
> > > > distance:float,minutes:integer
> > > > Loading init file from /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
> > > > samples/merb/hello/config/init.rb
> > > > Loading /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
> > > > hello/config/environments/development.rb
> > > > ~
> > > > ~ FATAL: The file dm-core was not found
> > > > ~
> > > > config/init.rb is already configured to use activerecord.
> > > > What's missing ?
> > > > -Arun
> > > > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > > > not sure, but merb-gen arguments are comma delimited and without
> > space
> > > > > (yeah, I know it sucks :()
> > > > > try:
> > > > > jruby -S merb-gen model --orm activerecord Runner
> > > > > distance:float,minutes:integer
> > > > > and
> > > > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > > > -Matt
> > > > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > > > minutes:integer
> > > > > > still showing the same error message.
> > > > > > Any idea ?
> > > > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > > > merb-gen resource Bird name:string color:string
> > family_id:integer
> > > > > > > > last_location:string last_seen_at:datetime
> > > > > > > "merb-gen resource" gives the error:
> > > > > > > FATAL: The file dm-core was not found
> > > > > > > config/database.yml specify:
> > > > > > > use_orm :activerecord
> > > > > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > > > > merb-gen does not seem to show any help on this. Can you expand
> > more
> > > > > > > here ?
> > > > > > > -Arun
> > > > > > > > -Matt
> > > > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > > > So far... I have not seen any tutorial on Scaffolding in
> > Merb.
> > > > > > > > > run merb-gen without arguments to see generators available on
> > > > your
> > > > > > system.
> > > > > > > > > Additional gems may provide their own generators.
> > > > > > > > > --
> > > > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 17:14:59 -0800 (PST)
Local: Wed, Nov 12 2008 8:14 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Also, there is no config/database.yml in this case. Where is the
database information specified ? Or specifically what is database.yml
equivalent in this case ?
-Arun
On Nov 12, 6:57 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> you should have just done:
> $ merb-gen core --orm activerecord my_app_name
> and just add what you need, using merb-gen app generates a merb stack app
> with DM, since you don't want to use DM a core app is better.
> -Matt
> On Wed, Nov 12, 2008 at 7:48 PM, Arun <arun.gu... @gmail.com> wrote:
> > Ah, that explains!
> > depdencies.rb has:
> > dependency "dm-core", dm_gems_version
> > dependency "dm-aggregates", dm_gems_version
> > dependency "dm-migrations", dm_gems_version
> > dependency "dm-timestamps", dm_gems_version
> > dependency "dm-types", dm_gems_version
> > dependency "dm-validations", dm_gems_version
> > How do I DRY up my application and specify pluggable ORM once ?
> > If I comment these lines then the model is correctly generated.
> > -Arun
> > On Nov 12, 6:36 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > I'm not sure, you might have some other dependencies requiring dm, can I
> > see
> > > your init.rb/dependencies.rb files please?
> > > -Matt
> > > On Wed, Nov 12, 2008 at 7:31 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > Subtle ;-)
> > > > Anyway, still getting the same error ...
> > > > ../../../bin/jruby -S merb-gen model --orm activerecord Runner
> > > > distance:float,minutes:integer
> > > > Loading init file from /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
> > > > samples/merb/hello/config/init.rb
> > > > Loading /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
> > > > hello/config/environments/development.rb
> > > > ~
> > > > ~ FATAL: The file dm-core was not found
> > > > ~
> > > > config/init.rb is already configured to use activerecord.
> > > > What's missing ?
> > > > -Arun
> > > > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > > > not sure, but merb-gen arguments are comma delimited and without
> > space
> > > > > (yeah, I know it sucks :()
> > > > > try:
> > > > > jruby -S merb-gen model --orm activerecord Runner
> > > > > distance:float,minutes:integer
> > > > > and
> > > > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > > > -Matt
> > > > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > > > minutes:integer
> > > > > > still showing the same error message.
> > > > > > Any idea ?
> > > > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > > > merb-gen resource Bird name:string color:string
> > family_id:integer
> > > > > > > > last_location:string last_seen_at:datetime
> > > > > > > "merb-gen resource" gives the error:
> > > > > > > FATAL: The file dm-core was not found
> > > > > > > config/database.yml specify:
> > > > > > > use_orm :activerecord
> > > > > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > > > > merb-gen does not seem to show any help on this. Can you expand
> > more
> > > > > > > here ?
> > > > > > > -Arun
> > > > > > > > -Matt
> > > > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > > > So far... I have not seen any tutorial on Scaffolding in
> > Merb.
> > > > > > > > > run merb-gen without arguments to see generators available on
> > > > your
> > > > > > system.
> > > > > > > > > Additional gems may provide their own generators.
> > > > > > > > > --
> > > > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Wed, 12 Nov 2008 20:24:56 -0500
Local: Wed, Nov 12 2008 8:24 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
look at the rake task to generate a new database.yml file. The generator
belongs to merb_activerecord
-Matt
On Wed, Nov 12, 2008 at 8:14 PM, Arun <arun.gu
... @gmail.com> wrote:
> Also, there is no config/database.yml in this case. Where is the
> database information specified ? Or specifically what is database.yml
> equivalent in this case ?
> -Arun
> On Nov 12, 6:57 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > you should have just done:
> > $ merb-gen core --orm activerecord my_app_name
> > and just add what you need, using merb-gen app generates a merb stack
> app
> > with DM, since you don't want to use DM a core app is better.
> > -Matt
> > On Wed, Nov 12, 2008 at 7:48 PM, Arun <arun.gu... @gmail.com> wrote:
> > > Ah, that explains!
> > > depdencies.rb has:
> > > dependency "dm-core", dm_gems_version
> > > dependency "dm-aggregates", dm_gems_version
> > > dependency "dm-migrations", dm_gems_version
> > > dependency "dm-timestamps", dm_gems_version
> > > dependency "dm-types", dm_gems_version
> > > dependency "dm-validations", dm_gems_version
> > > How do I DRY up my application and specify pluggable ORM once ?
> > > If I comment these lines then the model is correctly generated.
> > > -Arun
> > > On Nov 12, 6:36 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > > I'm not sure, you might have some other dependencies requiring dm,
> can I
> > > see
> > > > your init.rb/dependencies.rb files please?
> > > > -Matt
> > > > On Wed, Nov 12, 2008 at 7:31 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > > Subtle ;-)
> > > > > Anyway, still getting the same error ...
> > > > > ../../../bin/jruby -S merb-gen model --orm activerecord Runner
> > > > > distance:float,minutes:integer
> > > > > Loading init file from
> /Users/arungupta/samples/jruby/merb/jruby-1.1.5/
> > > > > samples/merb/hello/config/init.rb
> > > > > Loading
> /Users/arungupta/samples/jruby/merb/jruby-1.1.5/samples/merb/
> > > > > hello/config/environments/development.rb
> > > > > ~
> > > > > ~ FATAL: The file dm-core was not found
> > > > > ~
> > > > > config/init.rb is already configured to use activerecord.
> > > > > What's missing ?
> > > > > -Arun
> > > > > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com>
> wrote:
> > > > > > not sure, but merb-gen arguments are comma delimited and without
> > > space
> > > > > > (yeah, I know it sucks :()
> > > > > > try:
> > > > > > jruby -S merb-gen model --orm activerecord Runner
> > > > > > distance:float,minutes:integer
> > > > > > and
> > > > > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > > > > -Matt
> > > > > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com>
> wrote:
> > > > > > > jruby -S merb-gen model --orm activerecord Runner
> distance:float
> > > > > > > minutes:integer
> > > > > > > still showing the same error message.
> > > > > > > Any idea ?
> > > > > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > > > > merb-gen resource Bird name:string color:string
> > > family_id:integer
> > > > > > > > > last_location:string last_seen_at:datetime
> > > > > > > > "merb-gen resource" gives the error:
> > > > > > > > FATAL: The file dm-core was not found
> > > > > > > > config/database.yml specify:
> > > > > > > > use_orm :activerecord
> > > > > > > > > merb-gen AR template uses the same syntax as Rails
> generator.
> > > > > > > > merb-gen does not seem to show any help on this. Can you
> expand
> > > more
> > > > > > > > here ?
> > > > > > > > -Arun
> > > > > > > > > -Matt
> > > > > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > > > > So far... I have not seen any tutorial on Scaffolding
> in
> > > Merb.
> > > > > > > > > > run merb-gen without arguments to see generators
> available on
> > > > > your
> > > > > > > system.
> > > > > > > > > > Additional gems may provide their own generators.
> > > > > > > > > > --
> > > > > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Michael Klishin" <michael.s.klis... @gmail.com>
Date: Thu, 13 Nov 2008 03:32:56 +0200
Local: Wed, Nov 12 2008 8:32 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
> Also, there is no config/database.yml in this case.
This has it's reasoning: in the end teams of developers end up keeping
database.yml ignored in SCM
because it's hard to use absolutely the same set up across different
machines. The most obvious example is
a socket file that is stored in different locations depending on how
you did install MySQL, PostgreSQL or whatever it is.
MacPorts use one path, Debian packages use some other, building from source results in some 3rd location. So it's environment specific. -- MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 20:35:07 -0800 (PST)
Local: Wed, Nov 12 2008 11:35 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
OK, that makes sense, thanks!
On Nov 12, 7:32 pm, "Michael Klishin" <michael.s.klis... @gmail.com>
wrote:
> > Also, there is no config/database.yml in this case.
> This has it's reasoning: in the end teams of developers end up keeping
> database.yml ignored in SCM
> because it's hard to use absolutely the same set up across different
> machines. The most obvious example is
> a socket file that is stored in different locations depending on how
> you did install MySQL, PostgreSQL or whatever it is.
> MacPorts use one path, Debian packages use some other, building from
> source results in some 3rd location. So it's environment specific.
> --
> MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Wed, 12 Nov 2008 21:27:46 -0800 (PST)
Local: Thurs, Nov 13 2008 12:27 am
Subject: Re: Scaffolding in Merb... Any Tutorial available
The generated [index,new,show,edit].html.erb do not seem to have any
code in there.
How can I ensure that the right set of code is generated as well ?
-Arun
On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> not sure, but merb-gen arguments are comma delimited and without space
> (yeah, I know it sucks :()
> try:
> jruby -S merb-gen model --orm activerecord Runner
> distance:float,minutes:integer
> and
> jruby -S merb-gen model Runner distance:float,minutes:integer
> -Matt
> On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > jruby -S merb-gen model --orm activerecord Runner distance:float
> > minutes:integer
> > still showing the same error message.
> > Any idea ?
> > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > last_location:string last_seen_at:datetime
> > > "merb-gen resource" gives the error:
> > > FATAL: The file dm-core was not found
> > > config/database.yml specify:
> > > use_orm :activerecord
> > > > merb-gen AR template uses the same syntax as Rails generator.
> > > merb-gen does not seem to show any help on this. Can you expand more
> > > here ?
> > > -Arun
> > > > -Matt
> > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > michael.s.klis... @gmail.com> wrote:
> > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > > > run merb-gen without arguments to see generators available on your
> > system.
> > > > > Additional gems may provide their own generators.
> > > > > --
> > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Mon, 17 Nov 2008 11:00:43 -0800 (PST)
Local: Mon, Nov 17 2008 2:00 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Added a simple new view as described at:
http://wiki.merbivore.com/howto/simple_new_view
The code looks like:
-- cut here --
<%= form_for(@runner, :action => resource(:runners) ) do %>
<p>
<%= text_field :distance, :label => "Distance" %>
</p>
<p>
<%= text_field :minutes, :label => "Minutes" %>
</p>
<p>
<%= submit "Create" %>
</p>
<% end =%>
<%= link_to 'Back', resource(:runners) %>
-- cut here --
Also added an entry:
resources :runners
in config/router.rb
Still getting the following error:
-- cut here --
No Method Error 500
undefined method `form_for' for #<Runners:0x197a120>
All App Framework Gem Other
app/views/runners/new.html.erb (ERB Template) 5
1<h1>Runners controller, new action</h1> 2 3<p>Edit this file in
<tt>app/views/runners/new.html.erb</tt></p> 4 5<%= form_for
(@runner, :action => resource(:runners) ) do %> 6 7 <p> 8 <%=
text_field :distance, :label => "Distance" %> 9 </p> 10
-- cut here --
What's missing ?
-Arun
On Nov 12, 9:27 pm, Arun <arun.gu... @gmail.com> wrote:
> The generated [index,new,show,edit].html.erb do not seem to have any
> code in there.
> How can I ensure that the right set of code is generated as well ?
> -Arun
> On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > not sure, but merb-gen arguments are comma delimited and without space
> > (yeah, I know it sucks :()
> > try:
> > jruby -S merb-gen model --orm activerecord Runner
> > distance:float,minutes:integer
> > and
> > jruby -S merb-gen model Runner distance:float,minutes:integer
> > -Matt
> > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > minutes:integer
> > > still showing the same error message.
> > > Any idea ?
> > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > > last_location:string last_seen_at:datetime
> > > > "merb-gen resource" gives the error:
> > > > FATAL: The file dm-core was not found
> > > > config/database.yml specify:
> > > > use_orm :activerecord
> > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > merb-gen does not seem to show any help on this. Can you expand more
> > > > here ?
> > > > -Arun
> > > > > -Matt
> > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > So far... I have not seen any tutorial on Scaffolding in Merb.
> > > > > > run merb-gen without arguments to see generators available on your
> > > system.
> > > > > > Additional gems may provide their own generators.
> > > > > > --
> > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Mon, 17 Nov 2008 14:10:54 -0500
Local: Mon, Nov 17 2008 2:10 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
can you show us your controller, I won't what is @runner, in theory it
should be an instance of your Runner class.
-Matt
On Mon, Nov 17, 2008 at 2:00 PM, Arun <arun.gu
... @gmail.com> wrote:
> Added a simple new view as described at:
> http://wiki.merbivore.com/howto/simple_new_view
> The code looks like:
> -- cut here --
> <%= form_for(@runner, :action => resource(:runners) ) do %>
> <p>
> <%= text_field :distance, :label => "Distance" %>
> </p>
> <p>
> <%= text_field :minutes, :label => "Minutes" %>
> </p>
> <p>
> <%= submit "Create" %>
> </p>
> <% end =%>
> <%= link_to 'Back', resource(:runners) %>
> -- cut here --
> Also added an entry:
> resources :runners
> in config/router.rb
> Still getting the following error:
> -- cut here --
> No Method Error 500
> undefined method `form_for' for #<Runners:0x197a120>
> All App Framework Gem Other
> app/views/runners/new.html.erb (ERB Template) 5
> 1<h1>Runners controller, new action</h1> 2 3<p>Edit this file in
> <tt>app/views/runners/new.html.erb</tt></p> 4 5<%= form_for
> (@runner, :action => resource(:runners) ) do %> 6 7 <p> 8 <%=
> text_field :distance, :label => "Distance" %> 9 </p> 10
> -- cut here --
> What's missing ?
> -Arun
> On Nov 12, 9:27 pm, Arun <arun.gu... @gmail.com> wrote:
> > The generated [index,new,show,edit].html.erb do not seem to have any
> > code in there.
> > How can I ensure that the right set of code is generated as well ?
> > -Arun
> > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > not sure, but merb-gen arguments are comma delimited and without space
> > > (yeah, I know it sucks :()
> > > try:
> > > jruby -S merb-gen model --orm activerecord Runner
> > > distance:float,minutes:integer
> > > and
> > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > -Matt
> > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > minutes:integer
> > > > still showing the same error message.
> > > > Any idea ?
> > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > > > last_location:string last_seen_at:datetime
> > > > > "merb-gen resource" gives the error:
> > > > > FATAL: The file dm-core was not found
> > > > > config/database.yml specify:
> > > > > use_orm :activerecord
> > > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > > merb-gen does not seem to show any help on this. Can you expand
> more
> > > > > here ?
> > > > > -Arun
> > > > > > -Matt
> > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > So far... I have not seen any tutorial on Scaffolding in
> Merb.
> > > > > > > run merb-gen without arguments to see generators available on
> your
> > > > system.
> > > > > > > Additional gems may provide their own generators.
> > > > > > > --
> > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Michael Klishin" <michael.s.klis... @gmail.com>
Date: Mon, 17 Nov 2008 21:40:39 +0200
Local: Mon, Nov 17 2008 2:40 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
2008/11/17 Arun <arun.gu
... @gmail.com>:
> No Method Error 500 > undefined method `form_for' for #<Runners:0x197a120> > What's missing ?
Either merb-helpers is not loaded at all, or (for some very weird
reason) default form builder is not set.
--
MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Mon, 17 Nov 2008 14:55:47 -0500
Local: Mon, Nov 17 2008 2:55 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
hmm good catch, if you generated a stack app, merb-helpers and merb-assets
won't be declared as dependencies.
-Matt
On Mon, Nov 17, 2008 at 2:40 PM, Michael Klishin <
michael.s.klis
... @gmail.com> wrote:
> 2008/11/17 Arun <arun.gu... @gmail.com>:
> > No Method Error 500
> > undefined method `form_for' for #<Runners:0x197a120>
> > What's missing ?
> Either merb-helpers is not loaded at all, or (for some very weird
> reason) default form builder is not set.
> --
> MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Mon, 17 Nov 2008 12:25:17 -0800 (PST)
Local: Mon, Nov 17 2008 3:25 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Stock runner generated as:
-- cut here --
class Runners < Application
# provides :xml, :yaml, :js
# GET /runners
def index
@runners = Runner.find(:all)
display @runners
end
# GET /runners/:id
def show
@runner = Runner.find_by_id(params[:id])
raise NotFound unless @runner
display @runner
end
# GET /runners/new
def new
only_provides :html
@runner = Runner.new(params[:runner])
render
end
# POST /runners
def create
@runner = Runner.new(params[:runner])
if @runner.save
redirect url(:runner, @runner)
else
render :new
end
end
# GET /runners/:id/edit
def edit
only_provides :html
@runner = Runner.find_by_id(params[:id])
raise NotFound unless @runner
render
end
# PUT /runners/:id
def update
@runner = Runner.find_by_id(params[:id])
raise NotFound unless @runner
if @runner.update_attributes(params[:runner])
redirect url(:runner, @runner)
else
raise BadRequest
end
end
# DELETE /runners/:id
def destroy
@runner = Runner.find_by_id(params[:id])
raise NotFound unless @runner
if @runner.destroy
redirect url(:runners)
else
raise BadRequest
end
end
end
-- cut here --
-Arun
On Nov 17, 11:10 am, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> can you show us your controller, I won't what is @runner, in theory it
> should be an instance of your Runner class.
> -Matt
> On Mon, Nov 17, 2008 at 2:00 PM, Arun <arun.gu... @gmail.com> wrote:
> > Added a simple new view as described at:
> >http://wiki.merbivore.com/howto/simple_new_view
> > The code looks like:
> > -- cut here --
> > <%= form_for(@runner, :action => resource(:runners) ) do %>
> > <p>
> > <%= text_field :distance, :label => "Distance" %>
> > </p>
> > <p>
> > <%= text_field :minutes, :label => "Minutes" %>
> > </p>
> > <p>
> > <%= submit "Create" %>
> > </p>
> > <% end =%>
> > <%= link_to 'Back', resource(:runners) %>
> > -- cut here --
> > Also added an entry:
> > resources :runners
> > in config/router.rb
> > Still getting the following error:
> > -- cut here --
> > No Method Error 500
> > undefined method `form_for' for #<Runners:0x197a120>
> > All App Framework Gem Other
> > app/views/runners/new.html.erb (ERB Template) 5
> > 1<h1>Runners controller, new action</h1> 2 3<p>Edit this file in
> > <tt>app/views/runners/new.html.erb</tt></p> 4 5<%= form_for
> > (@runner, :action => resource(:runners) ) do %> 6 7 <p> 8 <%=
> > text_field :distance, :label => "Distance" %> 9 </p> 10
> > -- cut here --
> > What's missing ?
> > -Arun
> > On Nov 12, 9:27 pm, Arun <arun.gu... @gmail.com> wrote:
> > > The generated [index,new,show,edit].html.erb do not seem to have any
> > > code in there.
> > > How can I ensure that the right set of code is generated as well ?
> > > -Arun
> > > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > > > not sure, but merb-gen arguments are comma delimited and without space
> > > > (yeah, I know it sucks :()
> > > > try:
> > > > jruby -S merb-gen model --orm activerecord Runner
> > > > distance:float,minutes:integer
> > > > and
> > > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > > -Matt
> > > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com> wrote:
> > > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > > minutes:integer
> > > > > still showing the same error message.
> > > > > Any idea ?
> > > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > > merb-gen resource Bird name:string color:string family_id:integer
> > > > > > > last_location:string last_seen_at:datetime
> > > > > > "merb-gen resource" gives the error:
> > > > > > FATAL: The file dm-core was not found
> > > > > > config/database.yml specify:
> > > > > > use_orm :activerecord
> > > > > > > merb-gen AR template uses the same syntax as Rails generator.
> > > > > > merb-gen does not seem to show any help on this. Can you expand
> > more
> > > > > > here ?
> > > > > > -Arun
> > > > > > > -Matt
> > > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > > So far... I have not seen any tutorial on Scaffolding in
> > Merb.
> > > > > > > > run merb-gen without arguments to see generators available on
> > your
> > > > > system.
> > > > > > > > Additional gems may provide their own generators.
> > > > > > > > --
> > > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Matt Aimonetti" <mattaimone... @gmail.com>
Date: Mon, 17 Nov 2008 15:27:13 -0500
Local: Mon, Nov 17 2008 3:27 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
can you also show us your init.rb or dependencies.rb it should list
merb-helpers and probably merb-assets
-Matt
On Mon, Nov 17, 2008 at 3:25 PM, Arun <arun.gu
... @gmail.com> wrote:
> Stock runner generated as:
> -- cut here --
> class Runners < Application
> # provides :xml, :yaml, :js
> # GET /runners
> def index
> @runners = Runner.find(:all)
> display @runners
> end
> # GET /runners/:id
> def show
> @runner = Runner.find_by_id(params[:id])
> raise NotFound unless @runner
> display @runner
> end
> # GET /runners/new
> def new
> only_provides :html
> @runner = Runner.new(params[:runner])
> render
> end
> # POST /runners
> def create
> @runner = Runner.new(params[:runner])
> if @runner.save
> redirect url(:runner, @runner)
> else
> render :new
> end
> end
> # GET /runners/:id/edit
> def edit
> only_provides :html
> @runner = Runner.find_by_id(params[:id])
> raise NotFound unless @runner
> render
> end
> # PUT /runners/:id
> def update
> @runner = Runner.find_by_id(params[:id])
> raise NotFound unless @runner
> if @runner.update_attributes(params[:runner])
> redirect url(:runner, @runner)
> else
> raise BadRequest
> end
> end
> # DELETE /runners/:id
> def destroy
> @runner = Runner.find_by_id(params[:id])
> raise NotFound unless @runner
> if @runner.destroy
> redirect url(:runners)
> else
> raise BadRequest
> end
> end
> end
> -- cut here --
> -Arun
> On Nov 17, 11:10 am, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> > can you show us your controller, I won't what is @runner, in theory it
> > should be an instance of your Runner class.
> > -Matt
> > On Mon, Nov 17, 2008 at 2:00 PM, Arun <arun.gu... @gmail.com> wrote:
> > > Added a simple new view as described at:
> > >http://wiki.merbivore.com/howto/simple_new_view
> > > The code looks like:
> > > -- cut here --
> > > <%= form_for(@runner, :action => resource(:runners) ) do %>
> > > <p>
> > > <%= text_field :distance, :label => "Distance" %>
> > > </p>
> > > <p>
> > > <%= text_field :minutes, :label => "Minutes" %>
> > > </p>
> > > <p>
> > > <%= submit "Create" %>
> > > </p>
> > > <% end =%>
> > > <%= link_to 'Back', resource(:runners) %>
> > > -- cut here --
> > > Also added an entry:
> > > resources :runners
> > > in config/router.rb
> > > Still getting the following error:
> > > -- cut here --
> > > No Method Error 500
> > > undefined method `form_for' for #<Runners:0x197a120>
> > > All App Framework Gem Other
> > > app/views/runners/new.html.erb (ERB Template) 5
> > > 1<h1>Runners controller, new action</h1> 2 3<p>Edit this file in
> > > <tt>app/views/runners/new.html.erb</tt></p> 4 5<%= form_for
> > > (@runner, :action => resource(:runners) ) do %> 6 7 <p> 8 <%=
> > > text_field :distance, :label => "Distance" %> 9 </p> 10
> > > -- cut here --
> > > What's missing ?
> > > -Arun
> > > On Nov 12, 9:27 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > The generated [index,new,show,edit].html.erb do not seem to have any
> > > > code in there.
> > > > How can I ensure that the right set of code is generated as well ?
> > > > -Arun
> > > > On Nov 12, 2:47 pm, "Matt Aimonetti" <mattaimone... @gmail.com>
> wrote:
> > > > > not sure, but merb-gen arguments are comma delimited and without
> space
> > > > > (yeah, I know it sucks :()
> > > > > try:
> > > > > jruby -S merb-gen model --orm activerecord Runner
> > > > > distance:float,minutes:integer
> > > > > and
> > > > > jruby -S merb-gen model Runner distance:float,minutes:integer
> > > > > -Matt
> > > > > On Wed, Nov 12, 2008 at 3:42 PM, Arun <arun.gu... @gmail.com>
> wrote:
> > > > > > jruby -S merb-gen model --orm activerecord Runner distance:float
> > > > > > minutes:integer
> > > > > > still showing the same error message.
> > > > > > Any idea ?
> > > > > > On Nov 12, 2:26 pm, Arun <arun.gu... @gmail.com> wrote:
> > > > > > > > merb-gen resource Bird name:string color:string
> family_id:integer
> > > > > > > > last_location:string last_seen_at:datetime
> > > > > > > "merb-gen resource" gives the error:
> > > > > > > FATAL: The file dm-core was not found
> > > > > > > config/database.yml specify:
> > > > > > > use_orm :activerecord
> > > > > > > > merb-gen AR template uses the same syntax as Rails
> generator.
> > > > > > > merb-gen does not seem to show any help on this. Can you expand
> > > more
> > > > > > > here ?
> > > > > > > -Arun
> > > > > > > > -Matt
> > > > > > > > On Fri, Sep 26, 2008 at 1:16 AM, Michael Klishin <
> > > > > > > > michael.s.klis... @gmail.com> wrote:
> > > > > > > > > 2008/9/26 MyMerb <mym... @gmail.com>:
> > > > > > > > > > So far... I have not seen any tutorial on Scaffolding in
> > > Merb.
> > > > > > > > > run merb-gen without arguments to see generators available
> on
> > > your
> > > > > > system.
> > > > > > > > > Additional gems may provide their own generators.
> > > > > > > > > --
> > > > > > > > > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Mon, 17 Nov 2008 12:27:22 -0800 (PST)
Local: Mon, Nov 17 2008 3:27 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
I added merb-assets already, now added merb-helpers as well but still
seeing the same error.
MRI and JRuby gives the same result. This app is generated using "core
app" and is using ActiveRecord as ORM.
-Arun
On Nov 17, 11:55 am, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> hmm good catch, if you generated a stack app, merb-helpers and merb-assets
> won't be declared as dependencies.
> -Matt
> On Mon, Nov 17, 2008 at 2:40 PM, Michael Klishin <
> michael.s.klis... @gmail.com> wrote:
> > 2008/11/17 Arun <arun.gu... @gmail.com>:
> > > No Method Error 500
> > > undefined method `form_for' for #<Runners:0x197a120>
> > > What's missing ?
> > Either merb-helpers is not loaded at all, or (for some very weird
> > reason) default form builder is not set.
> > --
> > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
Arun <arun.gu... @gmail.com>
Date: Mon, 17 Nov 2008 12:30:31 -0800 (PST)
Local: Mon, Nov 17 2008 3:30 pm
Subject: Re: Scaffolding in Merb... Any Tutorial available
Ah, figured out.
I created a new file config/dependencies.rb and specified:
dependency "merb-assets", "1.0"
dependency "merb-helpers", "1.0"
If I include these in config/init.rb, then a new runner can be
created.
It seems like dependencies.rb is not picked up for a core app.
-Arun
On Nov 17, 11:55 am, "Matt Aimonetti" <mattaimone... @gmail.com> wrote:
> hmm good catch, if you generated a stack app, merb-helpers and merb-assets
> won't be declared as dependencies.
> -Matt
> On Mon, Nov 17, 2008 at 2:40 PM, Michael Klishin <
> michael.s.klis... @gmail.com> wrote:
> > 2008/11/17 Arun <arun.gu... @gmail.com>:
> > > No Method Error 500
> > > undefined method `form_for' for #<Runners:0x197a120>
> > > What's missing ?
> > Either merb-helpers is not loaded at all, or (for some very weird
> > reason) default form builder is not set.
> > --
> > MK
You must
Sign in before you can post messages.
You do not have the permission required to post.
From:
"Michael Klishin" <michael.s.klis... @gmail.com>
Date: Mon, 17 Nov 2008 22:32:15 +0200
Local: Mon, Nov 17 2008 3:32 pm
Subject: Re: [merb] Re: Scaffolding in Merb... Any Tutorial available
2008/11/17 Arun <arun.gu
... @gmail.com>:
> MRI and JRuby gives the same result. This app is generated using "core > app" and is using ActiveRecord as ORM.
Both should not matter here. What is in your init file?
--
MK
You must
Sign in before you can post messages.
You do not have the permission required to post.