merb-gen very_flat problem?

0 views
Skip to first unread message

IndianGuru

unread,
Nov 23, 2008, 10:51:22 PM11/23/08
to merb
I am using the following configuration -

Windows XP with SP2 box
Ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Ruby Gem 1.3.1
Merb 1.0.1
SQLite 3.6.6
do_sqlite3-0.9.7
Mongrel 1.1.5

I created a very_flat app by typing:
C:\> merb-gen very_flat ruby-hello
Generating with very_flat generator:
←[32m [ADDED]←[0m .gitignore
←[32m [ADDED]←[0m merb.thor
←[32m [ADDED]←[0m ruby-hello.rb
←[32m [ADDED]←[0m Rakefile
←[32m [ADDED]←[0m spec
C:\>

To run my app, I did:
E:\ruby-hello>merb -I ruby-hello.rb
Loading init file from ruby-hello.rb
merb : worker (port 4000) ~ Starting Mongrel at port 4000
merb : worker (port 4000) ~ Successfully bound to port 4000

I pointed my web browser to http://localhost:4000/ but that threw a
page full of errors on the browser window. On the Mongrel window, I
got:
merb : worker (port 4000) ~ Started request handling: Mon Nov 24
09:20:39 +0530 2008
merb : worker (port 4000) ~ Controller class not found for controller
`ruby-hello'

What's the solution?

Thanks.

Yehuda Katz

unread,
Nov 23, 2008, 11:47:31 PM11/23/08
to me...@googlegroups.com
very_flat apps use the app name as the controller, so you shouldn't use hyphens in them (because hyphens are not valid in class names).

-- Yehuda

2008/11/23 IndianGuru <satish...@gmail.com>



--
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325

IndianGuru

unread,
Nov 23, 2008, 11:53:28 PM11/23/08
to merb
"because hyphens are not valid in class names" - Obvious. Wonder, what
I was thinking then!!

Thanks Yehuda for the quick reply.

On Nov 24, 9:47 am, "Yehuda Katz" <wyc...@gmail.com> wrote:
> very_flat apps use the app name as the controller, so you shouldn't use
> hyphens in them (because hyphens are not valid in class names).
> -- Yehuda
>
> 2008/11/23 IndianGuru <satish.ta...@gmail.com>
>
>
>
>
>
> > I am using the following configuration -
>
> > Windows XP with SP2 box
> > Ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> > Ruby Gem 1.3.1
> > Merb 1.0.1
> > SQLite 3.6.6
> > do_sqlite3-0.9.7
> > Mongrel 1.1.5
>
> > I created a very_flat app by typing:
> > C:\> merb-gen very_flat ruby-hello
> > Generating with very_flat generator:
> > ←[32m [ADDED]←[0m .gitignore
> > ←[32m [ADDED]←[0m merb.thor
> > ←[32m [ADDED]←[0m ruby-hello.rb
> > ←[32m [ADDED]←[0m Rakefile
> > ←[32m [ADDED]←[0m spec
> > C:\>
>
> > To run my app, I did:
> > E:\ruby-hello>merb -I ruby-hello.rb
> > Loading init file from ruby-hello.rb
> > merb : worker (port 4000) ~ Starting Mongrel at port 4000
> > merb : worker (port 4000) ~ Successfully bound to port 4000
>
> > I pointed my web browser tohttp://localhost:4000/but that threw a
Reply all
Reply to author
Forward
0 new messages