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 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.
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 ?
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.
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
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
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.
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?
I'm trying to stay positive about Rails but am a little discouraged
that
I can get my first controller/view working :<
When your http://localhost:3000 comes up, what do you see if you
follow the link "About_your_application's_environment"?
I get:
Ruby version 1.8.7 (powerpc-darwin9.7.0)
RubyGems version 1.3.4
Rack version 1.0
Rails version 2.3.3
Active Record version 2.3.3
Action Pack version 2.3.3
Active Resource version 2.3.3
Action Mailer version 2.3.3
Active Support version 2.3.3
Application root /Users/rick/hello
Environment development
Database adapter sqlite3
Database schema version 0
Also, using your app_controller.rb and views/app/greeting.rhtml in
this environment does the right thing in response to http://localhost:3000/app/greeting.
The log says
!\ FAILSAFE /!\ Fri Aug 21 08:06:58 -0400 2009
Status: 500- Internal Server Error
unknown error
Unfortunately its not telling much more which is a little frustrating.
I even downloaded ruby again , reinstalled rails . Then as before
it failed initially because of sqlite3 not being there which I
installed
but then I still get the same error message...
Thanks for all the support....I am really trying to hang in there
especially since there appears to be
many good things with Rails but it is hard not knowing exactly why its
failing.....Here is what happened
when I tired creating the contollter...
C:\Ruby\mgp>ruby script/create controller myfirst greeting
ruby: No such file or directory -- script/create (LoadError)
C:\Ruby\mgp>ruby script\create controller myfirst greeting
ruby: No such file or directory -- script/create (LoadError)
C:\Ruby\mgp>dir
Volume in drive C has no label.
Volume Serial Number is 0C3F-B4D3
Directory of C:\Ruby\mgp
08/21/2009 10:13 AM <DIR> .
08/21/2009 10:13 AM <DIR> ..
08/21/2009 10:13 AM <DIR> app
08/21/2009 10:13 AM <DIR> config
08/21/2009 10:13 AM <DIR> db
08/21/2009 10:13 AM <DIR> doc
08/21/2009 10:13 AM <DIR> lib
08/21/2009 10:13 AM <DIR> log
08/21/2009 10:13 AM <DIR> public
08/21/2009 10:13 AM 307 Rakefile
Thanks for all the support....I am really trying to hang in there
especially since there appears to be
many good things with Rails but it is hard not knowing exactly why its
failing.....Here is what happened
when I tired creating the contollter...
C:\Ruby\mgp>ruby script/create controller myfirst greeting
ruby: No such file or directory -- script/create (LoadError)
I think that was a typo in Rails List's post, it should have been
ruby script/generate controller myfirst greeting
yes...but I still got the same result when I ran the application
myfirst ....
any way to get Ruby , rails to tell us what it really doesnt like vs.
unknown error