New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"no implicit conversion of Integer into String" error when configuring a proxy site type #910
Comments
Have you tried putting quotes around 8080?
Make sure ports is uncommented, you have a # in front of it.
…--
- Joe Ferguson
JoeFerguson.me
MemphisPHP.org
On Jul 24, 2018, 05:53 -0500, stevegriffiths ***@***.***>, wrote:
Please note that the Homestead issue tracker is reserved for bug reports and enhancements. We are not always able to debug Vagrant, Provider or Operating System issues, but will do our best to help. Thank you!
Versions
• Vagrant: 2.1.1
• Provider: Virtualbox 5.2.16
• Homestead: 7.8.0
Host operating system
Windows 10
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\xx\Documents\Websites
to: /home/vagrant/code
sites:
- map: homestead.phpmyadmin
to: /home/vagrant/code/phpmyadmin
- map: homestead.app1
to: /home/vagrant/code/app1/public
- map: homestead.nodejs1
to: 8080
type: proxy
databases:
- homestead
blackfire:
- id: foo
token: bar
client-id: foo
client-token: bar
#ports:
- send: 8081
to: 8080
protocol: udp
Vagrant destroy & up output
Provide a link to a GitHub Gist containing the complete output of vagrant destroy && vagrant up.
Do NOT paste the debug output in the issue, just paste the link to the Gist.
Expected behavior
Expect vagrant up to run without error, and for one of the sites in the resulting VM to act as a proxy to port 8080 (running a Node.js app) within the machine.
Actual behavior
Vagrant up fails with the following error:
homestead.rb:233:in '+': no implicit conversion of Integer into String (TypeError).
I have narrowed this error down to being the result of this line in the Homestead.yaml file, despite various sources suggesting that this is the correct format for defining a proxy type site in homestead:
to: 8080
Steps to reproduce
1. Create Homestead.yaml file as displayed above.
2. Run vagrant up
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi, I am not using the ports section - I had experimented with it previously but really need to get the application working as a proxy - it's the config in the sites section I am focused on, specifically the block: I did try with quotation marks around the 8080, this started directing traffic into the folder where the node.js app is located but did not actually forward requests to the running node.js process. |
Sounds like the proxy site is working. Do you have an index.js or similar set up to handle the incoming traffic in the node app? That's about as much help as I'm going to be with regards to node. |
This was a node.js configuration issue it seems, as having reset everything (for the 100th time!) it's now all working and serving as it should be. Thanks for your help! |
I'm still having this problem with the Homestead repo at master. It looks like the problem is scripts/homestead.rb:269 if site['zray'] == 'true'
...
else
config.vm.provision 'shell' do |s|
s.inline = 'rm -rf ' + site['to'] + '/ZendServer'
end
end
end Since "to" is only a port number for proxy sites, that doesn't really make sense. |
Fixes #910 by casting the port to a string and therefore allowing string concatenation in [z-ray cleanup](https://github.com/laravel/homestead/blob/master/scripts/homestead.rb#L269) It's probable that this will occur in other places, i will look around, but in the meantime, this fixes the most common scenario that is a fresh installation with its defaults.
Versions
Host operating system
Windows 10
Homestead.yaml
Vagrant destroy & up output
Provide a link to a GitHub Gist containing the complete output of
vagrant destroy && vagrant up
.Do NOT paste the debug output in the issue, just paste the link to the Gist.
Expected behavior
Expect vagrant up to run without error, and for one of the sites in the resulting VM to act as a proxy to port 8080 (running a Node.js app) within the machine.
Actual behavior
Vagrant up fails with the following error:
homestead.rb:233:in '+': no implicit conversion of Integer into String (TypeError).
I have narrowed this error down to being the result of this line in the Homestead.yaml file, despite various sources suggesting that this is the correct format for defining a proxy type site in homestead:
to: 8080
Steps to reproduce
The text was updated successfully, but these errors were encountered: