Pergunta

I'm building a tablet app and my development environment is rails running ubuntu in a virualbox on windows host. I set a host-name of dev.myapp.com on the windows machine.

I run thin as my web-server, but when I run sudo rails s thin -p 80 I get the error

Could not find multi_json-1.0.4 in any of the sources

installing the gem does not resolve the issue, and I get the same error if I run thin or not.

I think I was starting the server on a different port before, but I can't remember which it was. I've tried 8080, but that isn't working when I try to open dev.myapp.com in the browser on the host machine.

Any suggestions on either using another port (and which port works without needing a port extension), or resolving the multi_json error. Or other suggestions?

Foi útil?

Solução 2

What I ended up doing here was running with just a vanilla rails s thin and then pointing fiddler to redirect the ip address to port 3000

Outras dicas

Drop the sudo and run it like this rails s thin -p 3000. Get this to work and verify that you can browse to http://dev.myapp.com:3000. Once this is working you can re-introduce the sudo bit and revert to port 80. Why sudo isn't finding the gem can't be answered without knowing more about your system. Most likely a path issue, but there's too many variables to guess.

That all said.. what's the harm in running it on an alternate port?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top