# Vagrant

Instale [Vagrant](https://www.vagrantup.com/) y configure una máquina virtual con [Linux](/tech_docs/spanish-6/introduction/local_installation/prerequisites.md)

Vagrant es compatible para [Debian](/tech_docs/spanish-6/introduction/local_installation/debian.md) y [Ubuntu](/tech_docs/spanish-6/introduction/local_installation/ubuntu.md).

## Browser configuration

Para acceder a la aplicación a través del navegador en la url `localhost:3000` debe enrutar el puerto de la aplicación y ejectuar el servidor de la aplicación con la opción `-b`:

## Enrutar el puerto de la aplicación

Abra el archivo de configuración de Vagrant:

```bash
nano Vagranfile
```

Encuentre esta línea:

```ruby
# config.vm.network "forwarded_port", guest: 80, host: 8080
```

Cámbiela por esta:

```ruby
config.vm.network "forwarded_port", guest: 3000, host: 3000
```

Recargue la máquina virtual:

```bash
vagrant reload
```

## Ejecutar el servidor

En su máquina virtual, debe ejecutar la aplicación enlanzándola a su IP local:

```bash
bin/rails s -b 0.0.0.0
```

Ahora debería ver la aplicación desde el navegardor en la url `localhost:3000` :tada:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.consuldemocracy.org/tech_docs/spanish-6/introduction/local_installation/vagrant.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
