first rails app failed

R

Ruby Newbee

I just started my lesson on rails and followed the steps in the book
"beginning ruby on rails", but sorry I have been getting wrong.
I took the steps to build a new rails application as below:


1. rails hello
2. cd hello; ruby script/generate controller App

3. vi app/controllers/app_controller.rb and put these content in it:
class AppController < ApplicationController
def greeting
end
end

4. vi app/views/app/greeting.rhtml and put these content in it:
<html>
<head>
<title>Ruby on Rails</title>
</head>
<body>
<h1>Yes it=E2=80=99s working!</h1>
</body>
</html>

5. ruby script/server -d


Now open a browser and visit to:
http://localhost:3000/app/greeting

Hmm I got:

We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.


Can you kindly help me? Thanks.
 
T

THAKUR PRASHANT SINGH

Please check your logs most probably its trying to look for some db
connections defined in database.yml and its not able to connect.=20

-----Original Message-----
From: Ruby Newbee [mailto:[email protected]]=20
Sent: Wednesday, January 27, 2010 1:51 PM
To: ruby-talk ML
Subject: first rails app failed

I just started my lesson on rails and followed the steps in the book
"beginning ruby on rails", but sorry I have been getting wrong.
I took the steps to build a new rails application as below:


1. rails hello
2. cd hello; ruby script/generate controller App

3. vi app/controllers/app_controller.rb and put these content in it:
class AppController < ApplicationController
def greeting
end
end

4. vi app/views/app/greeting.rhtml and put these content in it:
<html>
<head>
<title>Ruby on Rails</title>
</head>
<body>
<h1>Yes it's working!</h1>
</body>
</html>

5. ruby script/server -d


Now open a browser and visit to:
http://localhost:3000/app/greeting

Hmm I got:

We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it
shortly.


Can you kindly help me? Thanks.
 
B

Brian Candler

Ruby said:
5. ruby script/server -d

Just drop the -d, and you'll see the full error appear on your console.
But Ruby is not Rails. Rails questions belong on a Rails mailing list.

Regards,

Brian.
 
R

Ruby Newbee

Just drop the -d, and you'll see the full error appear on your console.
But Ruby is not Rails. Rails questions belong on a Rails mailing list.

Thanks Brain, I have resolved it.
I need to install sqlite3 for ruby before starting rails.

Thanks.
 
A

andrew mcelroy

yes and I found out that ruby and ruby on rails are ziped files. this is =
why I could not use them.so I took them off of my computer. I feel that noo=
ne was willing to help me with this problem. So I will try another program =
to use, other than ruby. no that I have put the books up, ruby and ruby on =
rals had failed.
This doesn't make any sense.

Every major operating system is capable of unzipping files. This
includes even most major smartphones, sans iphone (unless jailbroken).

If you are simply trying to learn ruby a good place to start would be
with why's poignant guide to ruby and tryruby.org.

As for building applications, if you can't even unzip a file, python,
php, even c# won't be any eaiser.

Best of luck.

Andrew McElroy
From: Ruby Newbee <[email protected]>
Subject: Re: first rails app failed
To: "ruby-talk ML" <[email protected]>
Date: Wednesday, January 27, 2010, 5:22 AM
 

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,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top