Forum: Ruby on Rails newbie question - routes.rb on server

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.
Theresa T. (Guest)
on 2006-05-14 03:20
Hello,

I am new to Ruby but not to programming. I have a domain name and server
space with a host who said that ruby on rails should work on the server.
All I want to do is make sure that a test ruby application works online
so that I can begin development on an app. I am able to get the test
program to work locally but not online.

In C:/ruby/projects/test/controllers/TestController.rb:

(path online = www.<mydomain>.net/test/controllers/TestController.rb)
-------------------------------------------------------------
class TestController < ApplicationController

	def index
		render_text "Hello Ruby"
	end
end
-------------------------------------------------------------
In config/routes.rb, i have tried all of the following:

  map.connect '', :controller => 'test', :action => 'index'

  map.connect '', :controller => 'Test', :action => 'index'

  map.connect '', :controller => 'test_controller', :action => 'index'

  map.connect 'test/:controller',:action => 'index'

  map.connect "test", :controller => "Test"
  map.connect "test/:controller/:action/:id"

At both http://127.0.0.1:3000/ and http://127.0.0.1:3000/test/, I can
get the "Hello Ruby" to display. However, I can't get it to work on my
domain, i.e., www.<mydomain>.net/ or www.<mydomain>.net/test/. All that
these respective links display is the index of files and folders in
those links.

Am I missing something here, or is it my host that is missing something?
What do I have to do to get "Hello Ruby" to display at
www.<mydomain>.net?

Thanks,

-TK
Ben R. (Guest)
on 2006-05-14 06:55
(Received via mailing list)
Who is your host?  What Web Server?  The problem is not with your
routes.  It is with the configuration of the server and how it
interacts with your app.

~ Ben

On 5/13/06, Theresa TK <removed_email_address@domain.invalid> wrote:
> (path online = www.<mydomain>.net/test/controllers/TestController.rb)
>   map.connect '', :controller => 'test', :action => 'index'
> At both http://127.0.0.1:3000/ and http://127.0.0.1:3000/test/, I can
>
> -TK
>
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Ben R.
303-947-0446
http://www.benr75.com
This topic is locked and can not be replied to.