Topic: Strange Problem

Hi,

I just deleted my project so I can start over.

Basically, here's what I did to create a new one:

cd public_html
rails blog
cd blog
ruby script/generate admin controller

Now if I go to www.domain.com/admin, I see a blank page. 

In the admin_controller.rb, I added:

    def index
        render_text "Hi"
    end

And I still see a blank page...

When I go to http://www.domain.com/blog/, I see nothing.  The only page that works is the www.domain.com where I see a welcome page.

Last edited by MaxS (2007-01-08 17:39:16)

Re: Strange Problem

I think it's because you created a new folder called 'blog' with the 'rails blog' command that's a subdirectory of your web root.  Try the following:

"cd public_html"
"rails ."
"ruby script/generate admin controller"

Re: Strange Problem

Hi Danger,

Thanks for the response.  When I type "ruby script/generate admin controller" I get the following message: "Couldn't find 'admin' generator".

Thanks for the help!

Re: Strange Problem

Okay, I typed:
"
ruby script/generate controller admin
"
It generated the controller..But even at www.domain.com/admin I see nothing but a blank screen!  I don't know what I did - I think I deleted an index.html from the public_html .. I thought that was just the welcome to rails page, so does it matter?

Re: Strange Problem

Did you run "ruby script/server" to start up the server then trying going to http://localhost:3000/admin/?

Railscasts - Free Ruby on Rails Screencasts

Re: Strange Problem

I have the server running regardless as a background process (assuming that's the proper term).

I think it's because I deleted a needed file.  I would simply terminate/recreate the account in cPanel but I had to have my server admin tweak a few files for it to work originally.

Re: Strange Problem

I got it.  The DB wasn't configured properly and I had to restart rails.

Thanks