Forum: Ruby on Rails Need help for simple RoR code.

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.
3331bac71517b12fbacdd0e6069353e3?d=identicon&s=25 Mark Sheran (marksh)
on 2006-02-23 23:03
I try a 'hello world' demo here,It only show a 'hello word' on web page

you can see all my codes and structure here

http://www.smtservers.com/demo/

I want to access the ruby app like this

http://www.smtservers.com/demo/say/hello

but I get a 404 error.

Please let me know what problem the code have

I am new for RoR. I am not sure the site structure is ok or not.

Please give me a help

Thanks

Mark
3331bac71517b12fbacdd0e6069353e3?d=identicon&s=25 Mark Sheran (marksh)
on 2006-02-23 23:31
who have a working 'hello world' demo.Please send it to me by zip file.I
can upload to the server to test.it is RoR hosting,but why my code can
not work there.

my email markshen2004@gmail.com

Thanks a lot

Mark

mark sheran wrote:
> I try a 'hello world' demo here,It only show a 'hello word' on web page
>
> you can see all my codes and structure here
>
> http://www.smtservers.com/demo/
>
> I want to access the ruby app like this
>
> http://www.smtservers.com/demo/say/hello
>
> but I get a 404 error.
>
> Please let me know what problem the code have
>
> I am new for RoR. I am not sure the site structure is ok or not.
>
> Please give me a help
>
> Thanks
>
> Mark
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-02-23 23:38
(Received via mailing list)
Hi Mark,
The first problem is your server is pointed to the wrong directory. It
should be pointed to the public directory in your rails app.
After that you need to set up a "demo" controller and then and action
called "say". ex. #ruby script/generate controller demo index say
Cheers,
Eric Goodwin

mark sheran wrote:
> mark sheran wrote:
>>
>> Mark
>>
>
>
>


--
Eric Goodwin
http://www.ericgoodwin.com
3331bac71517b12fbacdd0e6069353e3?d=identicon&s=25 Mark Sheran (marksh)
on 2006-02-23 23:53
Based on my idea,Demo is a folder,say is a application and hello is a
action.
This is a hosting company,I can not access httpd.conf,how to fix this?

Thanks

Eric Goodwin wrote:
> Hi Mark,
> The first problem is your server is pointed to the wrong directory. It
> should be pointed to the public directory in your rails app.
> After that you need to set up a "demo" controller and then and action
> called "say". ex. #ruby script/generate controller demo index say
> Cheers,
> Eric Goodwin
>
> mark sheran wrote:
>> mark sheran wrote:
>>>
>>> Mark
>>>
>>
>>
>>
>
>
> --
> Eric Goodwin
> http://www.ericgoodwin.com
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-02-24 00:02
(Received via mailing list)
Hi Mark,
Who are you hosting with. On Dreamhost you should be able to go to "
Remap a new sub-directory" and map a dir to a certain folder in your
home dir.
On Textdrive you can go to webmin and then apache webserver, your
virtual webserver, alias and redirect and put an alias from /demo to
/home/youraccount/demo/railsapp/public
Cheers,
Eric Goodwin

mark sheran wrote:
>> should be pointed to the public directory in your rails app.
>>>>
>>>>
>>>
>>>
>> --
>> Eric Goodwin
>> http://www.ericgoodwin.com
>>
>
>
>


--
Eric Goodwin
http://www.ericgoodwin.com
3331bac71517b12fbacdd0e6069353e3?d=identicon&s=25 Mark Sheran (marksh)
on 2006-02-24 00:13
I can access the server by telnet.do you think I can do this.but I can
not access Apache settings.

which file I have to change?

Thanks

Mark
Eric Goodwin wrote:
> Hi Mark,
> Who are you hosting with. On Dreamhost you should be able to go to "
> Remap a new sub-directory" and map a dir to a certain folder in your
> home dir.
> On Textdrive you can go to webmin and then apache webserver, your
> virtual webserver, alias and redirect and put an alias from /demo to
> /home/youraccount/demo/railsapp/public
> Cheers,
> Eric Goodwin
>
> mark sheran wrote:
>>> should be pointed to the public directory in your rails app.
>>>>>
>>>>>
>>>>
>>>>
>>> --
>>> Eric Goodwin
>>> http://www.ericgoodwin.com
>>>
>>
>>
>>
>
>
> --
> Eric Goodwin
> http://www.ericgoodwin.com
Ac1da5d66d51a1c3b843221032247b30?d=identicon&s=25 Eric Goodwin (Guest)
on 2006-02-24 00:39
(Received via mailing list)
Hi,
If you can't access your webserver settings then I don't know how you
would do this.
I would talk with your host and get them to set it up for you.
Cheers,
Eric Goodwin

mark sheran wrote:
>> Hi Mark,
>>
>>>> http://www.ericgoodwin.com
>
--
Eric Goodwin
http://www.ericgoodwin.com
3331bac71517b12fbacdd0e6069353e3?d=identicon&s=25 Mark Sheran (marksh)
on 2006-02-24 00:42
Do you mean they have to set this again for different RoR application?

Thanks

Mark
Eric Goodwin wrote:
> Hi,
> If you can't access your webserver settings then I don't know how you
> would do this.
> I would talk with your host and get them to set it up for you.
> Cheers,
> Eric Goodwin
>
> mark sheran wrote:
>>> Hi Mark,
>>>
>>>>> http://www.ericgoodwin.com
>>
> --
> Eric Goodwin
> http://www.ericgoodwin.com
59528506e6297141161afcde91d677c9?d=identicon&s=25 Nicolai Reuschling (codeblogger)
on 2006-02-24 00:45
(Received via mailing list)
How about contacting your hosting provider. It's their job.
3331bac71517b12fbacdd0e6069353e3?d=identicon&s=25 Mark Sheran (marksh)
on 2006-02-24 00:52
Who can make sure my 'hello word' code is correct?I am very new for
RoR.Thanks.

Mark
Nicolai Reuschling wrote:
> How about contacting your hosting provider. It's their job.
4005a47a8f2ceee49670b920593c1d52?d=identicon&s=25 Ben Munat (Guest)
on 2006-02-24 05:38
(Received via mailing list)
Mark, you can't just put a rails app in a web-accesible directory and
expect apache to
know what to do with it. It requires (some would say rather complicated)
configuration
changes to apache.

And why are you trying to deal with the whole issue of connecting a
rails app to apache
and how things will work with your hosting company and all of that
*before* you've even
learned the merest basics about rails and ruby?

Take that app you generated and -- on YOUR computer -- run "ruby
script\server" from the
command line within the app root. That will start the included webrick
server on port
3000. Then you can get to your "hello world" page at
http://localhost:3000/say/hello.

I gave you links to a couple tutorials last week, but it's apparent that
you haven't truly
digested what they said. You should read them again, thoroughly... and
you should probably
order the Agile Web Development with Rails book and follow through the
sample app they
build in the first section of the book.

Rails is getting a lot of buzz because it does a lot of nice things for
developers and has
a lot of cool features. But that doesn't mean it's dead simple to use.
There is plenty to
learn (just look at the volume of questions on this list). Give yourself
the time to learn!

b
5b1c58ca5016a810cc7e54db31bf90ce?d=identicon&s=25 NexusNeo - Niket Patel (Guest)
on 2006-02-24 11:11
(Received via mailing list)
http://www.smtservers.com/demo/public/say/hello/

check above link. your app is works fine

now if u have ssh access try following commands
after login to your account

mv public_html/demo ~/
cd public_html
ln -s ~/demo/public demo

now you can access your app like

http://www.smtservers.com/demo/say/hello/

On 2/24/06, mark sheran <markshen2004@gmail.com> wrote:
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



--
Best Regards,
Niket Patel
For NexusNeo Exim
(A Div of NexusNeo System & Exim Pvt. Ltd)
Tel:  +91 79 23244557
Fax: +91 79 23246531
E-mail: info@nexusneo.com
Web:   www.nexusneo.com
This topic is locked and can not be replied to.