# Need help viewing my first App

**URL:** <https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652>\
**Category:** Rails\
**Created:** [July 24, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652 "2009-07-24T17:31:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![veganopolis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ecae2f/32.png) [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Post date:** [July 24, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652/1 "2009-07-24T17:31:39Z")

</div>

Hi All,  
I am new to ROR and I am experiencing a few problems viewing my first  
app. Can anyone pls help me to get my first app up and running?

I created a rails application called my\_app. I created a controller  
called hello.

It looks something like this.  
class HelloController \< ApplicationController

def display  
end

end

When I type [http://localhost:3000/hello/display](http://localhost:3000/hello/display) it says “we are sorry  
but something went wrong” message. I know it is looking for a view and  
when I created a view called display.rhtml with text “welcome on board”  
without any html tags and reloaded the browser window instead of  
displaying welcome on board in plain text it again is displaying “we are  
sorry but something went wrong”.

can anyone pls let me know where I am going wrong?

---

<div class="post-metadata">

**Author:** ![veganopolis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ecae2f/32.png) [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Post date:** [July 24, 2009, 6:05pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652/2 "2009-07-24T18:05:20Z")

</div>

Invest in the electronic PDF version of Agile Web D. with RoR  
from the Pragmatic Programmer library.

(Assuming you have a database setup, I use MySQL, others use a different  
backend)

In the root folder for your app, enter

ruby script/generate scaffold person first\_name:string last\_name:string

Explore the folder tree for your app and see what Rails has  
auto-generated for you (all sorts of wonderful things… a migration, a  
controller, some views, and an entry in routes.rb). Peruse this folder  
structure and the files to see how things fit together in a ‘vanilla’  
Rails application. Some may disparage the scaffold command, but it is  
an excellent first step to see what Rails does by default. For  
practically zero effort, you have a nice example of Rails written for  
you.

Next steps would typically be something like:

Edit database.yml to talk to your database.

Run the migration (rake db:migrate).

Next, I’d recommend running “rake routes \>routes.lst”, then look at  
routes.lst to see what rails routing is all about.

Rename the default index.html in public to get it out of the way.  
Start your server.  
Navigate to [http://localhost:3000/people](http://localhost:3000/people)

---

<div class="post-metadata">

**Author:** ![veganopolis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ecae2f/32.png) [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Post date:** [July 24, 2009, 6:07pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652/3 "2009-07-24T18:07:16Z")

</div>

On Jul 24, 4:31 pm, Sam M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> def display
> 
> can anyone pls let me know where I am going wrong?

Have a peek inside your app’s development.log for a better explanation  
of what is wrong (I’m guessing its something like that app is set to  
use an sqlite3 database but you don’t have sqlite3 (or its bindings  
for ruby))

---

<div class="post-metadata">

**Author:** ![veganopolis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ecae2f/32.png) [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Post date:** [July 24, 2009, 6:09pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652/4 "2009-07-24T18:09:58Z")

</div>

Alpha B. has been working on a thread that may help you as well:

[http://www.ruby-forum.com/topic/191189#new](http://www.ruby-forum.com/topic/191189#new)

---

<div class="post-metadata">

**Author:** ![veganopolis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ecae2f/32.png) [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Post date:** [July 25, 2009, 4:04am UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652/5 "2009-07-25T04:04:57Z")

</div>

Sam, did you generate a scaffold, or a stand-alone controller?

When you go to localhost, do you see the generic ruby welcome page?  
can you click on the configuration link?

---

<div class="post-metadata">

**Author:** ![veganopolis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/ecae2f/32.png) [@veganopolis](https://www.ruby-forum.com/u/veganopolis)\
**Post date:** [July 28, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/need-help-viewing-my-first-app/172652/6 "2009-07-28T16:33:27Z")

</div>

doudou wrote:

> Sam, did you generate a scaffold, or a stand-alone controller?
> 
> When you go to localhost, do you see the generic ruby welcome page?  
> can you click on the configuration link?

Thanks folks…I was following some online tutorial and I ran into some  
confusing moments…Now that I am following the documentation at  
[rubyonrails.org](http://rubyonrails.org) everything seems to be ok and working now…

I’ll get back if I have any more doubts…

Thanks once again for your inputs…
