uninitialized constant ApplicationController (NameError)

D

Daniel

Hi,
I am trying to develop a sample application from the below like
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=2. 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/new", 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
 
S

Senthilnayagam

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
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://senthilnayagam.com
 
D

Daniel

I get a prompt like ..Can you add my gmail id so tht we can discuss it over chat?
my id: (e-mail address removed)
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top