"Vagrant configure ("2") do |config|" doesn't work, throwing "syntax unexpected token')' on Mac

184 views
Skip to first unread message

Jailene Huang

unread,
Sep 4, 2016, 12:16:00 AM9/4/16
to Vagrant
Hi everyone,
I recently get into Vagrant and install latest version of Vagrant and VirtualBox on my Macbook.
When I configure a box as a base, my command is:
vagrant up
Vagrant configure ("2") do |config| 

However, it thrower me an error, saying 
-bash: syntax error near unexpected token `('

I don't know what'wrong here. 
Could any one help me out?
My OS is Mac OS X EI Captian.
Thanks.

Alvaro Miranda Aguilera

unread,
Sep 4, 2016, 1:29:46 PM9/4/16
to vagra...@googlegroups.com
Hello seems you have an error on Vagrantfile.

The easiest way to create one is like this.

rm Vagrantfile (will delete the old one)
vagrant init -m hashicorp/precise64

The -m will put a minimal one, without that will be a very long one with lots of options commented out.

If you share your current one over a Gist I can have a look.

Alvaro.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/d1b70420-b3f6-4974-86e0-9771abc45940%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Jailene Huang

unread,
Sep 4, 2016, 11:24:11 PM9/4/16
to Vagrant
Hi,
thanks. But the error was still there. Here is the log in Gist. Please check. 
https://gist.github.com/JaileneW/8fb4222c88e829b21664bd96ed437f1a 

在 2016年9月3日星期六 UTC-5下午11:16:00,Jailene Huang写道:

Alvaro Miranda Aguilera

unread,
Sep 5, 2016, 2:37:41 AM9/5/16
to vagra...@googlegroups.com
Hello

Between these lines:

There is no error.

So something happen after that

Can you share the Vagrantfile you are using?


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Jailene Huang

unread,
Sep 5, 2016, 7:17:20 PM9/5/16
to Vagrant
Hi,
Thanks for checking my log.

Here is my Vagrantfile. Thanks again.


在 2016年9月3日星期六 UTC-5下午11:16:00,Jailene Huang写道:
Hi everyone,

Alvaro Miranda Aguilera

unread,
Sep 6, 2016, 3:50:28 AM9/6/16
to vagra...@googlegroups.com
Hello,

The file looks good, but can run it on my machine.

so, I will suggest tryh with a new one.

mkdir test
cd test
vagrant init -m hashicorp/precise64
vagrant up

Thanks
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Jailene Huang

unread,
Sep 8, 2016, 9:24:01 PM9/8/16
to Vagrant
Hi,

I tried it, but still get the same error 'unexpected token '(' '.


在 2016年9月3日星期六 UTC-5下午11:16:00,Jailene Huang写道:
Hi everyone,

Alvaro Miranda Aguilera

unread,
Sep 9, 2016, 9:21:53 AM9/9/16
to vagra...@googlegroups.com
can you share the same Vagrantfile you are using over a gist?

Thanks
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Jailene Huang

unread,
Sep 10, 2016, 11:03:36 AM9/10/16
to Vagrant
Hi,
Now  I found out there are more than one Vagrantfile in my system. I am not sure which one should be the right one.
Here attached the file. Please kindly check.

thanks.



在 2016年9月3日星期六 UTC-5下午11:16:00,Jailene Huang写道:
Hi everyone,

Edward Evans

unread,
Sep 10, 2016, 2:16:04 PM9/10/16
to Vagrant
Vagrant will look in the pwd for the Vagrantfile file so that is the one you need to check. You can have many Vagrantfile files on your machine in different folders but only the one in the pwd when you run vagrant matters.
Reply all
Reply to author
Forward
0 new messages