Repository navigation
Closed
Description
Following the directions for the Rails quick start, I get an error running fig:
$ fig run web rails new . --force --database=postgresql --skip-bundle
Traceback (most recent call last):
File "/usr/local/bin/fig", line 9, in <module>
load_entry_point('fig==0.2.0', 'console_scripts', 'fig')()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/main.py", line 39, in main
command.sys_dispatch()
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/docopt_command.py", line 21, in sys_dispatch
self.dispatch(sys.argv[1:], None)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/command.py", line 24, in dispatch
super(Command, self).dispatch(*args, **kwargs)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/docopt_command.py", line 24, in dispatch
self.perform_command(*self.parse(argv, global_options))
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/docopt_command.py", line 27, in perform_command
handler(command_options)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/cli/main.py", line 215, in run
container = service.create_container(one_off=True, **container_options)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 108, in create_container
container_options = self._get_container_options(override_options, one_off=one_off)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 225, in _get_container_options
container_options['name'] = self.next_container_name(one_off)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 199, in next_container_name
return '_'.join(bits + [str(self.next_container_number(one_off=one_off))])
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 202, in next_container_number
numbers = [parse_name(c.name)[2] for c in self.containers(stopped=True, one_off=one_off)]
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/service.py", line 38, in containers
for container in self.client.containers(all=stopped):
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/packages/docker/client.py", line 399, in containers
res = self._result(self._get(u, params=params), True)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/fig/packages/docker/client.py", line 98, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 395, in get
return self.request('GET', url, **kwargs)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 349, in request
prep = self.prepare_request(req)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 287, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 287, in prepare
self.prepare_url(url, params)
File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/models.py", line 338, in prepare_url
"Perhaps you meant http://{0}?".format(url))
requests.exceptions.MissingSchema: Invalid URL u'localhost/v1.6/containers/json': No schema supplied. Perhaps you meant http://localhost/v1.6/containers/json?
It is not at all obvious to me what is causing this or where it is coming from. But I checked all files (and even copied the contents from the directions to make sure I had not fat-fingered anything), and the error persisted. All dependencies appeared to install correctly.
Metadata
Metadata
Assignees
Labels
No labels
Activity
bfirsh commentedon Feb 1, 2014
Looks like your Docker URL might not be in a format Fig is expecting. Are you using docker-osx? Could you run
echo $DOCKER_HOSTand paste the output?zathomas commentedon Feb 1, 2014
I saw this just now, and it was because I ran
docker-osx shellandfig runin two different terminals.bfirsh commentedon Feb 2, 2014
This should be clearer, but it's that this error showed when you didn't run
docker-osx shell. It should be this:Also see #62
bfirsh commentedon Mar 3, 2014
Fixed by #77, ref #126
rusllonrails commentedon Aug 7, 2014
Hi Guys,
Following the directions for the Rails quick start, I get an error running fig:
I have:
Ubuntu 14.04
I found that by default $DOCKER_HOST is missing:
I tried to set some variants and then reload shell:
But this didn't solve my problem.
Thanks for any help )
rusllonrails commentedon Aug 8, 2014
Found the solution. )
NOTE, I have:
Thanks to http://serverascode.com/2014/05/25/docker-shipyard-multihost.html
jonwhittlestone commentedon Oct 21, 2014
Thanks @RuslanHamidullin
JemiloII commentedon Apr 29, 2015
Just do:
export DOCKER_HOST=/path/to/docker.sockSMalchenko commentedon Sep 23, 2015
Thanks @rusllonrails
ashish-arora02 commentedon Dec 11, 2015
thanks @rusllonrails you saved my life.