Forum: Ruby on Rails ruby on rails tweaks

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.
60c421971b231beb5a28b9ea458cf812?d=identicon&s=25 Delirium tremens (Guest)
on 2008-10-15 17:21
(Received via mailing list)
Is there a way to avoid having to type "ruby script/server" in "C:\www
\myrubysite\"?

Is there a way to eliminate ":3000" from " http://localhost:3000/ "?

Is there a way to add '"myrubysite" to " http://localhost/ "?
5ca17be18ed84b27dc0d9062216e2da8?d=identicon&s=25 Christian Johansen (chrisjoha)
on 2008-10-15 18:12
Delirium tremens wrote:
> Is there a way to avoid having to type "ruby script/server" in "C:\www
> \myrubysite\"?

You mean you want the server to start when windows starts? Just make a
file start_app.bat like this:

c:
cd \www\myrubysite
ruby script\server

and place it in your system startup folder. Or, you can look at some
sort of application as service thing:
http://www.application-as-service.com/ (haven't tested it).

>
> Is there a way to eliminate ":3000" from " http://localhost:3000/ "?

specify the server to run on port 80: ruby script/server -p 80. Try ruby
script/server --help

>
> Is there a way to add '"myrubysite" to " http://localhost/ "?

As a site prefix? IE http://localhost/myrubysite? Or as a host name? IE
http://myrubysite/

The latter can be done through editing
C:\Windows\System32\Drivers\Etc\Hosts and adding a line like

127.0.0.1 myrubysite

Then you can reach your app like http://myrubysite

If you were thinking about the context path I'm not sure. Used to be
this was a real hassle, but I haven't checked in a while, so it might
have been fixed/made easy.
4c438a80fc30661ad619ea177cf9cbd0?d=identicon&s=25 Freddy Andersen (Guest)
on 2008-10-15 19:19
(Received via mailing list)
Or install the thin gem and us that as the "development" server that
can start at boot time. Add a thin.yml in your codes config directory
so you can start the server with thin -C config/thin.yml start... You
can set the port number and stuff in the config file.
This topic is locked and can not be replied to.