1

I am running a Ruby on Rails server on an Ubuntu VirtualBox guest machine. I can access the local server from my host machine by setting the Ubuntu network adapter to bridged. My app's hmtl is loading OK, but the assets e.g. the images are not.

1

In your config/environments/development.rb file, you need to set the config variable, asset_host, that tells the app where to load the assets. For example if your ip address of your local host is http://10.0.2.15:3000 then

config.asset_host = 'http://10.0.2.15:3000'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.