My development environment details:
Ubuntu 11.10
Rails 2.3.11
Ruby 1.8.7
To use third party tools such as google-analytics I need to give valid domain name.So is there any way to point my rails server port to a dummy domain so that I can use those tools in development mode?
One way to do this would be to set up your application to use Passenger. You could then give it a domain name like http://dummy.com and edit the
/etc/hostsfile to set up domain like this:Another good solution is offered by Tim Pope on his blog. He has bought the domain name smackaho.st and made it a localhost wildcard. One of the people who commented on that blog posting has some something similar with a shorter domain name, lvh.me, and you can use that instead.
If we go to http://lvh.me:3000/ you’ll see the homepage of your application because lvh.me resolves to the IP address 127.0.0.1.