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>
Please check your logs most probably its trying to look for some db
connections defined in database.yml and its not able to connect.
···
-----Original Message-----
From: Ruby Newbee [mailto:rubynewbee@gmail.com]
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>
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 noone 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.
···
--- On Wed, 1/27/10, Ruby Newbee <rubynewbee@gmail.com> wrote:
From: Ruby Newbee <rubynewbee@gmail.com>
Subject: Re: first rails app failed
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Date: Wednesday, January 27, 2010, 5:22 AM
On Wed, Jan 27, 2010 at 5:31 PM, Brian Candler <b.candler@pobox.com> wrote:
Ruby Newbee wrote:
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.
Thanks Brain, I have resolved it.
I need to install sqlite3 for ruby before starting rails.
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 noone 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
···
On Sun, Jan 31, 2010 at 2:39 PM, James Nathan <badlands_2004@yahoo.com> wrote:
--- On Wed, 1/27/10, Ruby Newbee <rubynewbee@gmail.com> wrote:
From: Ruby Newbee <rubynewbee@gmail.com>
Subject: Re: first rails app failed
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Date: Wednesday, January 27, 2010, 5:22 AM
On Wed, Jan 27, 2010 at 5:31 PM, Brian Candler <b.candler@pobox.com> wrote:
Ruby Newbee wrote:
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.
Thanks Brain, I have resolved it.
I need to install sqlite3 for ruby before starting rails.