About .html and .rhtml,database

how do i make a .html file in the root directory,for example,there is
a cart project,how do make a index.html file containing the link to
access the files that are in the app directory?
when deploy a project,where the mysql database will be put on the
server?when i develop my project,my database was in the
C:\InstantRails\mysql\data directory.

how do i make a .html file in the root directory,for example,there is
a cart project,how do make a index.html file containing the link to
access the files that are in the app directory?

Normaly you won’t do that. This would require to set at least read
access to the app directory (or create an alias to it, anyway don’t
allow people to read the app dir, since it contains your code)
Plain html goes in the public folder, preferably a subfolder like /docs

link_to(“load”, “/docs/myfile.html”)

But that’s exceptional, normaly you’ll html.erb files and serve them
from your controller/action with the render command

when deploy a project,where the mysql database will be put on the
server?when i develop my project,my database was in the
C:\InstantRails\mysql\data directory.

Whereever you want, the thing must not be on the same server. It’ll run
on any machine and you’ll tell Rails how to access it in the configfile
database.yml

Thorsten M. wrote:

how do i make a .html file in the root directory,for example,there is
a cart project,how do make a index.html file containing the link to
access the files that are in the app directory?

Normaly you won’t do that. This would require to set at least read
access to the app directory (or create an alias to it, anyway don’t
allow people to read the app dir, since it contains your code)
Plain html goes in the public folder, preferably a subfolder like /docs

link_to(“load”, “/docs/myfile.html”)

Thank you a lot! link_to(“load”, “/docs/myfile.html”) tell me how to
access the .html files in the public directory.But i want an index.html
file in the root directory that can access the .rhtml files in the app
directory.I don’t like that,but my server provider ask me to have an
index.html file in the public_html directory that is an folder on the
server.So i have to make an index.html as a home page to access my other
files in the app direcrory.
Can you help me to resolve that?

On Mon, Jun 9, 2008 at 9:21 AM, Guo Y.
[email protected] wrote:

The only way you’ll be able to do this is to setup a specific route
for “index.html” that forwards off to a controller. Any .html files
you put in public/ are static only and not a part of the Rails stack
(aka no Erb). If you have an example we can work with, we can try to
figure out a solution for ya.

Jason

Jason R. wrote:

On Mon, Jun 9, 2008 at 9:21 AM, Guo Y.
[email protected] wrote:

The only way you’ll be able to do this is to setup a specific route
for “index.html” that forwards off to a controller. Any .html files
you put in public/ are static only and not a part of the Rails stack
(aka no Erb). If you have an example we can work with, we can try to
figure out a solution for ya.

Jason

I have attachted my project just containing the app directory.Please
download it.Now i have uploaded my project as a whole in the public_html
directory on the server.My server provider also asks me to make an
index.html in this public_html direcrory so that it is treated as the
home page.So when input the domain www.omega.com,the index.html will be
showed in the browser.As a result ,i have to set the link in the
index.html file to access other actions or .rhtml files. For example ,if
i want access the index action in the store controller,how do i set a
link in the .html file which is in the public_html direcroty to access
that action?

On 10 Jun 2008, at 10:34, Guo Y. wrote:

figure out a solution for ya.
showed in the browser.As a result ,i have to set the link in the
Don’t create an index.html if you don’t want one (you can use map.root
(in routes.rb) to set what controller & action are displayed when the
root of your site is accessed.

Fred