Forum: Ruby cant run my Rails app!

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B22fe9692a13804391c0477b52587ff4?d=identicon&s=25 Jadzien Cardths (jadzien)
on 2006-04-07 19:21
(Received via mailing list)
Boy, this is a very weird feeling. Excitement mixed with frustration! Am
really excited to learn Ruby and was following the examples of Ruby For
Rails e-book (manning) and finally, after getting all the coding and
settings bits done, I cant get it to work!

  The example (chapter 2), after creating the Rails app, coding the show
and welcome methods, setting the route, database, layouts, ...etc, the
instruction was to start webrick using ./script/server [-b domain] [-p
port] and then point the browser to http://localhost:3000

  Did that and i only get the "Welcome Aboard Ruby on Rails" web page.
Tried to use 127.0.0.1 and get prompted by windows for user id and
password which does not seem to like my login credentials and tells me
that i'm unauthorized to view the page!

  Installed the complete bundle of rails which came with mysql, php,
apache...hope someone out there can help me get through this stage!

  Cheers
  jadzien
Cff9eed5d8099e4c2d34eae663aae87e?d=identicon&s=25 Jacob Fugal (Guest)
on 2006-04-07 19:27
(Received via mailing list)
On 4/7/06, jadzien caruthas <rubyjadz@yahoo.com> wrote:
>   The example (chapter 2), after creating the Rails app, coding the show and welcome
> methods, setting the route, database, layouts, ...etc, the instruction was to start 
webrick
> using ./script/server [-b domain] [-p port] and then point the browser to
> http://localhost:3000
>
>   Did that and i only get the "Welcome Aboard Ruby on Rails" web page. Tried to use
> 127.0.0.1 and get prompted by windows for user id and password which does not seem
> to like my login credentials and tells me that i'm unauthorized to view the page!

Jadzien,

Generally, these questions are better directed at the Rails mailing
list[1]. In this case, what it's looking like is that you're still
pulling up the public/index.html file for your application. There are
several ways to get around this (changing the .htaccess file, removing
the public/index.html file, etc.) but for now the simplest solution
would be to just access the correct controller directly rather than
relying on the default route. For example, if you have a
WelcomeController, try this url:

  http://localhost:3000/welcome

Jacob Fugal

[1] http://lists.rubyonrails.org/mailman/listinfo/rails
3ccecc71b9fb0a3d7f00a0bef6f0a63a?d=identicon&s=25 Kent Sibilev (Guest)
on 2006-04-07 19:30
(Received via mailing list)
Read more careful. For http://localhost:3000 url webrick will render
public/index.html page. You need to specify a controller an action name
in
your url.

Kent.
B22fe9692a13804391c0477b52587ff4?d=identicon&s=25 Jadzien Cardths (jadzien)
on 2006-04-08 13:41
(Received via mailing list)
Thanks Jacob, especially for pointing me to the rails mailing
list...very helpful for a newbie like me! Turns out my problems was that
i did not run MySQL service before i tried to run my app. Well...looks
like i'm on my way!



Jacob Fugal <lukfugl@gmail.com> wrote:
  On 4/7/06, jadzien caruthas wrote:
> The example (chapter 2), after creating the Rails app, coding the show and welcome
> methods, setting the route, database, layouts, ...etc, the instruction was to start 
webrick
> using ./script/server [-b domain] [-p port] and then point the browser to
> http://localhost:3000
>
> Did that and i only get the "Welcome Aboard Ruby on Rails" web page. Tried to use
> 127.0.0.1 and get prompted by windows for user id and password which does not seem
> to like my login credentials and tells me that i'm unauthorized to view the page!

Jadzien,

Generally, these questions are better directed at the Rails mailing
list[1]. In this case, what it's looking like is that you're still
pulling up the public/index.html file for your application. There are
several ways to get around this (changing the .htaccess file, removing
the public/index.html file, etc.) but for now the simplest solution
would be to just access the correct controller directly rather than
relying on the default route. For example, if you have a
WelcomeController, try this url:

http://localhost:3000/welcome

Jacob Fugal

[1] http://lists.rubyonrails.org/mailman/listinfo/rails
This topic is locked and can not be replied to.