Last Updated: September 09, 2019
·
1.93K
· dpaluy

"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

2 Responses
Add your response

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

over 1 year ago ·

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

over 1 year ago ·