HighDots Forums  

***SPAM*** [Rails] First App- Error 500

Ruby On Rails Talk Ruby On Rails programming language mailing list


Discuss ***SPAM*** [Rails] First App- Error 500 in the Ruby On Rails Talk forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
mgpowers
 
Posts: n/a

Default ***SPAM*** [Rails] First App- Error 500 - 08-18-2009 , 08:39 PM






I've created a simple hello world app that doesnt appear to serve up
the view greeting.rhtml. :<
Any ideas ?


The error message is from development.log is...
# Logfile created on Tue Aug 18 16:49:55 -0400 2009/!\ FAILSAFE /!\
Tue Aug 18 16:50:34 -0400 2009
Status: 500 Internal Server Error
unknown error


PS . It does show the default web page ok at http://localhost:3000
just not the app


Here is my controller in c:\ruby\hello\app\controllers
\app_controller.rb
......
class AppController < ApplicationController

def greeting
end

end

Here is my view in c:\ruby\hello\app\views\app\greeting.rhtml

<html>
<head>
Ruby on Rails
</head>
<body>
Yes its working!
</body>
</html>


Here is the URL that I'm trying to access it

http://localhost:3000/App/greeting

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #2  
Old   
Rick
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 07:50 AM






Quote:
PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see at http://localhost:3000. Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #3  
Old   
mgpowers
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 08:44 AM



I followed step by step the instructions for the first application in
the Begining Ruby for Rails book
and checked the online documentation before even posting.

Do you have any suggestions as shown I have a controller and a view
and an application defined but
its not finding it or giving me the error message posted.....any
ideas ?


Thanks!



On Aug 19, 7:50*am, Rick <richard.t.ll... (AT) gmail (DOT) com> wrote:
Quote:
PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see athttp://localhost:3000. *Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. *Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. *Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #4  
Old   
Frederick Cheung
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 09:43 AM



On Aug 19, 1:44*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:
Quote:
I followed step by step the instructions for the first application in
the Begining Ruby for Rails book
and checked the online documentation before even posting.

Do you have any suggestions as shown I have a controller and a view
and an application defined but
its not finding it or giving me the error message posted.....any
ideas ?
Look at the log file in log/development.log It's probably something
like a bad database setup or similar.

fred
Quote:
Thanks!

On Aug 19, 7:50*am, Rick <richard.t.ll... (AT) gmail (DOT) com> wrote:



PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see athttp://localhost:3000. *Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. *Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. *Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #5  
Old   
mgpowers
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 10:17 AM



I did look at the log file and even posted the error message in the
very first post..

see...below...Any ideas ?

The error message is from development.log is...
# Logfile created on Tue Aug 18 16:49:55 -0400 2009/!\ FAILSAFE /!\
Tue Aug 18 16:50:34 -0400 2009
Status: 500 Internal Server Error
unknown error


Status: 500 Internal Server Error
unknown error


PS . It does show the default web page ok at http://localhost:3000
just not the app


Here is my controller in c:\ruby\hello\app\controllers
\app_controller.rb
......
class AppController < ApplicationController


def greeting
end


end


Here is my view in c:\ruby\hello\app\views\app\greeting.rhtml


<html>
<head>
Ruby on Rails
</head>
<body>
Yes its working!
</body>
</html>


Here is the URL that I'm trying to access it


http://localhost:3000/App/greeting






On Aug 19, 9:43*am, Frederick Cheung <frederick.che... (AT) gmail (DOT) com>
wrote:
Quote:
On Aug 19, 1:44*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:

I followed step by step the instructions for the first application in
the Begining Ruby for Rails book
and checked the online documentation before even posting.

Do you have any suggestions as shown I have a controller and a view
and an application defined but
its not finding it or giving me the error message posted.....any
ideas ?

Look at the log file in log/development.log It's probably something
like a bad database setup or similar.

fred





Thanks!

On Aug 19, 7:50*am, Rick <richard.t.ll... (AT) gmail (DOT) com> wrote:

PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see athttp://localhost:3000. *Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. *Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. *Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails- Hide quoted text -

- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #6  
Old   
Rick
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 10:54 AM



Your problem is a missmatch between the controller name and the view
directory name.
If you're going to use application_controller.rb then c:\ruby\hello\app
\views\app\greeting.rhtml should be c:\ruby\hello\app\views
\application\greeting.rhtml.

You can use scaffold to help get more familiar with what goes where.
Try this:

script/generate scaffold User name:string profile:text

Now check for new files in app\controllers, app\views, app\models, and
db\migrations

Then run:
rake db:migrate
And restart your webserver and browse:
http://localhost:3000/users

Rick

On Aug 19, 10:17*am, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:
Quote:
I did look at the log file and even posted the error message in the
very first post..

see...below...Any ideas ?

The error message is from development.log is...
# Logfile created on Tue Aug 18 16:49:55 -0400 2009/!\ FAILSAFE /!\
Tue Aug 18 16:50:34 -0400 2009
* Status: 500 Internal Server Error
* unknown error

* Status: 500 Internal Server Error
* unknown error

PS . It does show the default web page ok athttp://localhost:3000
just not the app

Here is my controller in c:\ruby\hello\app\controllers
\app_controller.rb
.....
class AppController < ApplicationController

* def greeting
* end

end

Here is my view in c:\ruby\hello\app\views\app\greeting.rhtml

html
* * <head
* * * * Ruby on Rails
* * </head
* * <body
* * * * Yes its working!
* * </body
/html

Here is the URL that I'm trying to access it

http://localhost:3000/App/greeting

On Aug 19, 9:43*am, Frederick Cheung <frederick.che... (AT) gmail (DOT) com
wrote:

On Aug 19, 1:44*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:

I followed step by step the instructions for the first application in
the Begining Ruby for Rails book
and checked the online documentation before even posting.

Do you have any suggestions as shown I have a controller and a view
and an application defined but
its not finding it or giving me the error message posted.....any
ideas ?

Look at the log file in log/development.log It's probably something
like a bad database setup or similar.

fred

Thanks!

On Aug 19, 7:50*am, Rick <richard.t.ll... (AT) gmail (DOT) com> wrote:

PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see athttp://localhost:3000. *Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. *Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. *Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails- Hide quoted text -

- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #7  
Old   
Marnen Laibow-Koser
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 12:31 PM



Rick Lloyd wrote:
Quote:
Your problem is a missmatch between the controller name and the view
directory name.
If you're going to use application_controller.rb
But the OP is not using this name; he's using app_controller.rb . And
this should be apps_controller : controller names are always plural.

Quote:
then c:\ruby\hello\app
\views\app\greeting.rhtml should be c:\ruby\hello\app\views
\application\greeting.rhtml.
No. It should be app/views/app/greeting.html.erb , at least in recent
versions of Rails. What version of Rails are you using?

Quote:
You can use scaffold to help get more familiar with what goes where.
Try this:

script/generate scaffold User name:string profile:text
That's a good idea.

Quote:
Rick
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen (AT) marnen (DOT) org
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #8  
Old   
Frederick Cheung
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 12:44 PM



On Aug 19, 3:17*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:
Quote:
I did look at the log file and even posted the error message in the
very first post..

see...below...Any ideas ?
Oops, didn't spot that. You may get a more verbose error if you try to
run

ruby script/console

Fred
Quote:
The error message is from development.log is...
# Logfile created on Tue Aug 18 16:49:55 -0400 2009/!\ FAILSAFE /!\
Tue Aug 18 16:50:34 -0400 2009
* Status: 500 Internal Server Error
* unknown error

* Status: 500 Internal Server Error
* unknown error

PS . It does show the default web page ok athttp://localhost:3000
just not the app

Here is my controller in c:\ruby\hello\app\controllers
\app_controller.rb
.....
class AppController < ApplicationController

* def greeting
* end

end

Here is my view in c:\ruby\hello\app\views\app\greeting.rhtml

html
* * <head
* * * * Ruby on Rails
* * </head
* * <body
* * * * Yes its working!
* * </body
/html

Here is the URL that I'm trying to access it

http://localhost:3000/App/greeting

On Aug 19, 9:43*am, Frederick Cheung <frederick.che... (AT) gmail (DOT) com
wrote:



On Aug 19, 1:44*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:

I followed step by step the instructions for the first application in
the Begining Ruby for Rails book
and checked the online documentation before even posting.

Do you have any suggestions as shown I have a controller and a view
and an application defined but
its not finding it or giving me the error message posted.....any
ideas ?

Look at the log file in log/development.log It's probably something
like a bad database setup or similar.

fred

Thanks!

On Aug 19, 7:50*am, Rick <richard.t.ll... (AT) gmail (DOT) com> wrote:

PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see athttp://localhost:3000. *Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. *Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. *Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails- Hide quoted text -

- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #9  
Old   
mgpowers
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 01:42 PM



Using rails 2.3.3

I've put greeting.rhtml in both

app\views\app

and

app\views\application

SAME result....Any other ideas ?

I've tried starting it in console mode but it just says Load Develope
Env >>

I'm trying to stay positive about Rails but am a little discouraged
that
I can get my first controller/view working :<


On Aug 19, 12:44*pm, Frederick Cheung <frederick.che... (AT) gmail (DOT) com>
wrote:
Quote:
On Aug 19, 3:17*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:

I did look at the log file and even posted the error message in the
very first post..

see...below...Any ideas ?

Oops, didn't spot that. You may get a more verbose error if you try to
run

ruby script/console

Fred





The error message is from development.log is...
# Logfile created on Tue Aug 18 16:49:55 -0400 2009/!\ FAILSAFE /!\
Tue Aug 18 16:50:34 -0400 2009
* Status: 500 Internal Server Error
* unknown error

* Status: 500 Internal Server Error
* unknown error

PS . It does show the default web page ok athttp://localhost:3000
just not the app

Here is my controller in c:\ruby\hello\app\controllers
\app_controller.rb
.....
class AppController < ApplicationController

* def greeting
* end

end

Here is my view in c:\ruby\hello\app\views\app\greeting.rhtml

html
* * <head
* * * * Ruby on Rails
* * </head
* * <body
* * * * Yes its working!
* * </body
/html

Here is the URL that I'm trying to access it

http://localhost:3000/App/greeting

On Aug 19, 9:43*am, Frederick Cheung <frederick.che... (AT) gmail (DOT) com
wrote:

On Aug 19, 1:44*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:

I followed step by step the instructions for the first application in
the Begining Ruby for Rails book
and checked the online documentation before even posting.

Do you have any suggestions as shown I have a controller and a view
and an application defined but
its not finding it or giving me the error message posted.....any
ideas ?

Look at the log file in log/development.log It's probably something
like a bad database setup or similar.

fred

Thanks!

On Aug 19, 7:50*am, Rick <richard.t.ll... (AT) gmail (DOT) com> wrote:

PS . It does show the default web page ok athttp://localhost:3000
just not the app

It doesn't show the app because you don't actually have one.

You should read what you see athttp://localhost:3000. *Specifically,
steps 1, 2, and 3 in the main panel give you some obvious tips on
what's next.

If these tips are too vague you can find more detailed information on
the right panel. *Under "Browse the Documentation" follow "Rails
Guides" to "Getting Started with Rails".

You might also consider picking up a book and working through an
example. *Pay careful attention here, however, to the versions of Ruby
and Rails (and any gems and plugins) used in the book.

Happy tRails- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #10  
Old   
Marnen Laibow-Koser
 
Posts: n/a

Default Re: First App- Error 500 - 08-19-2009 , 01:46 PM



On Aug 19, 1:42*pm, mgpowers <gmichae... (AT) hotmail (DOT) com> wrote:
Quote:
Using rails 2.3.3

I've put greeting.rhtml in both

app\views\app

and

app\views\application

SAME result....Any other ideas ?
As I said before, it should be greeting.html.erb , not
greeting.rhtml . Why are you using .rhtml ? That hasn't been correct
for a long time, and it makes me think that you may be following a
tutorial for an older version.

Quote:
I've tried starting it in console mode but it just says Load Develope
Env
Yes, that's what it should say. What's the problem?

Quote:
I'm trying to stay positive about Rails but am a little discouraged
that
I can get my first controller/view working *:
What documentation have you been using?

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen (AT) marnen (DOT) org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.