first rails app failed

Discussion in 'Ruby' started by Ruby Newbee, Jan 27, 2010.

  1. Ruby Newbee

    Ruby Newbee Guest

    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.
    Ruby Newbee, Jan 27, 2010
    #1
    1. Advertising

  2. 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:]=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.
    THAKUR PRASHANT SINGH, Jan 27, 2010
    #2
    1. Advertising

  3. 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.

    Regards,

    Brian.
    --
    Posted via http://www.ruby-forum.com/.
    Brian Candler, Jan 27, 2010
    #3
  4. Ruby Newbee

    Ruby Newbee Guest

    On Wed, Jan 27, 2010 at 5:31 PM, Brian Candler <> 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.

    Thanks.
    Ruby Newbee, Jan 27, 2010
    #4
  5. On Sun, Jan 31, 2010 at 2:39 PM, James Nathan <> wro=
    te:
    > 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

    > --- On Wed, 1/27/10, Ruby Newbee <> wrote:
    >
    >
    > From: Ruby Newbee <>
    > Subject: Re: first rails app failed
    > To: "ruby-talk ML" <>
    > Date: Wednesday, January 27, 2010, 5:22 AM
    >
    >
    > On Wed, Jan 27, 2010 at 5:31 PM, Brian Candler <> wrot=

    e:
    >> 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.
    >
    > Thanks.
    >
    >
    >
    >
    >
    andrew mcelroy, Jan 31, 2010
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathaniel Brown
    Replies:
    2
    Views:
    126
    gabriele renzi
    Mar 26, 2006
  2. libsfan01
    Replies:
    2
    Views:
    142
    Jan Svitok
    Feb 5, 2007
  3. Corey Haines

    My first rails app

    Corey Haines, Nov 24, 2007, in forum: Ruby
    Replies:
    1
    Views:
    82
    David Chelimsky
    Nov 25, 2007
  4. arjun ghosh
    Replies:
    1
    Views:
    118
    Ryan Davis
    Dec 24, 2007
  5. Xeno Campanoli
    Replies:
    1
    Views:
    129
    Xeno Campanoli
    May 29, 2008
Loading...

Share This Page