_mq90g
Last Updated: February 25, 2016
·
1.383K
· dpaluy
3129de6b479cc965513311f1ddcc268a

"Pow like" development in Ubuntu with Rails

If your other team members use MacOS Pow for development.
But you develop with Ubuntu.

Suppose, the development domain name is: coderwall.dev

To work with Pow like environment in Ubuntu you need the following:

Add the following to /etc/hosts:

127.0.0.1   coderwall.dev
127.0.0.1   api.coderwall.dev
127.0.0.1   www.coderwall.dev
127.0.0.1   assets.coderwall.dev

and any other subdomain you will need

In your Rails config (example: config/environments/development.rb ) define:

PRIMARY_DOMAIN = "coderwall.dev:3000"

and add it to ASSETS_DOMAIN and other

config.action_controller.asset_host = "//assets.#{PRIMARY_DOMAIN}"

Start your rails s

Verify your app works correctly from: http://coderwall.dev

Say Thanks
Respond

2 Responses
Add your response

8523
Befunky snowlp

where to put "PRIMARY_DOMAIN = "coderwall.dev:3000""?
I mean the file name. Thanks

over 1 year ago ·
8540
3129de6b479cc965513311f1ddcc268a

You should add PRIMARY_DOMAIN const to config/environments/development.rb .

over 1 year ago ·