RoR Apache setting?
This is a simple 'hello word' application.
code structure is here
I can access it here
But the url is so long and other people can see my source code
I want to access the same code like this
I ask the hosting company,he told me change .htaccess.
Please give me a idea how to change the setting in .htaccess
My question is like how to map ruby public folder to a url.
I can not access httpd.conf.the hosting limited my function.
Your problem is that your DocumentRoot needs to be set to your 'public' directory.
It is actually your host who will need to add /demo/public to the VirtualHost setting in the Apache config since I doubt you have access to this.
Alternatively if they won't do this for you you could create an .htaccess file in the root directory containing the following.....
Redirect 301 / /demo/public
You should be creating/uploading your app in a web-inaccessible area! The way you have it right now is incredibly insecure as anyone could access your code and database settings.
Create your app in your home directory, then sym-link your htdocs folder (may well be called something else) to your apps public folder. After that all you have to do is add a default route to routes.rb so that yourdomain.com will go straight to your default page.
Sounds like your host doesnt have good support for ruby on rails...
There are lot's of hosts that do it well, you can see a list at http://wiki.rubyonrails.org/rails/pages/RailsWebHosts
I like textdrive