Running Gem Server to View Docs for Ruby Libraries on Localhost
gem server
will boot up documentation on port 8808 by default pass it the -p flag followed by the port number to change.
gem server -p3000
Ruby on Rails: constants deployment development localhost production
by bseanvt
leave a comment
Defining Application Constants for Ruby on Rails Application
The best place to keep application constants which are environment specific is in config/environments directory. For instance…
# in RAILS_ROOT/config/environments/development.rb APP_DOMAIN = "localhost" # in RAILS_ROOT/config/environments/production.rb APP_DOMAIN = "real-domain.com"
…will set the APP_DOMAIN constant to either “localhost” or “real-domain.com” depending on which environment Rails boots up.
Programming: /etc/hosts 127.0.0.1 80 django domain hexxie.com localhost Rails resolve subdomain wildcard
by bseanvt
8 comments
Setup Wildcard Subdomain on Localhost for Development Work without /Etc/hosts TomFoolery
Step 1.
Open up your browser and visit http://www.hexxie.com. You can also go to anything.hexxie.com and everything.hexxie.com, which will resolve to your local machine (assuming it’s localhost at 127.0.0.1).
How it works
Super simple. I just pointed hexxie.com and *.hexxie.com to 127.0.0.1, which is your localhost address. If you’re on Rails just append the port number as usual. http://hexxie.com:3000 or on Django http://hexxie.com:8000. Or you can always fire those guys up on port :80 with sudo ./script/server -p80 for Rails
or sudo django-admin.py runserver 80
To set up your own just configure DNS to point your domain to 127.0.0.1 for the IP address. No more futzing with /etc/hosts
Originally got this tip from http://tbaggery.com/2010/03/04/smack-a-ho-st.html who has created his own service at smackaho.st
The word “Hexe” is German for “Witch”. I have a dog named “Hexxie” after the German word and that is the origin of the domain name hexxie.com, in case you’re wondering.


