[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

uninitialized constant ApplicationController (NameError

Daniel

6/22/2006 7:00:00 AM

Hi,
I am trying to develop a sample application from the below like
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.h.... Im
following the instructions but im connecting to MS SQL Server 2000.
when I brouse to the page "http://127.0.0.1:3000/recipe..., i get a
error as follows.
Error:
Errno::ECONNREFUSED in RecipeController#new
No connection could be made because the target machine actively refused
it. - connect(2)
RAILS_ROOT: ./script/../config/..

If I open the controller in Scite editor and execute it..I get the
following error
>ruby recipe_controller.rb
recipe_controller.rb:1: uninitialized constant ApplicationController
(NameError)
>Exit code: 1

Can anyone please help me out.

Thanks in Advance.
Daniel

2 Answers

senthil.nayagam@gmail.com

6/22/2006 7:10:00 AM

0


> Error:
> Errno::ECONNREFUSED in RecipeController#new
> No connection could be made because the target machine actively refused
> it. - connect(2)
> RAILS_ROOT: ./script/../config/..

probably your DB is refusing connection

check with ruby console if db connection works

ruby script/console


I had faced similar problem with PHP -> SQL server connection few years
back

> >ruby recipe_controller.rb
> recipe_controller.rb:1: uninitialized constant ApplicationController
> (NameError)

rails classes are not included if you try to execute the script
standalone, as there are no includes.



regards
A.Senthil Nayagam
http://senthiln...

Daniel

6/22/2006 8:39:00 AM

0

I get a prompt like ..
>>_
Can you add my gmail id so tht we can discuss it over chat?
my id: dfelix19@gmail.com
Thanks.

Senthilnayagam wrote:
> > Error:
> > Errno::ECONNREFUSED in RecipeController#new
> > No connection could be made because the target machine actively refused
> > it. - connect(2)
> > RAILS_ROOT: ./script/../config/..
>
> probably your DB is refusing connection
>
> check with ruby console if db connection works
>
> ruby script/console
>
>
> I had faced similar problem with PHP -> SQL server connection few years
> back
>
> > >ruby recipe_controller.rb
> > recipe_controller.rb:1: uninitialized constant ApplicationController
> > (NameError)
>
> rails classes are not included if you try to execute the script
> standalone, as there are no includes.
>
>
>
> regards
> A.Senthil Nayagam
> http://senthiln...