# Ruby on rails tweaks

**URL:** <https://www.ruby-forum.com/t/ruby-on-rails-tweaks/150993>\
**Category:** Rails\
**Created:** [October 15, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tweaks/150993 "2008-10-15T17:21:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [October 15, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tweaks/150993/1 "2008-10-15T17:21:03Z")

</div>

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/](http://localhost:3000/) "?

Is there a way to add '“myrubysite” to " [http://localhost/](http://localhost/) "?

---

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [October 15, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tweaks/150993/2 "2008-10-15T19:19:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Delirium\_tremens](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/2acd7d/32.png) [@Delirium\_tremens](https://www.ruby-forum.com/u/Delirium_tremens)\
**Post date:** [October 15, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tweaks/150993/3 "2008-10-15T18:12:19Z")

</div>

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/](http://www.application-as-service.com/) (haven’t tested it).

> Is there a way to eliminate “:3000” from " [http://localhost:3000/](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/](http://localhost/) "?

As a site prefix? IE [http://localhost/myrubysite](http://localhost/myrubysite)? Or as a host name? IE  
[http://myrubysite/](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](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.
